2014/09/15

Django series: About django-admin.py

Following documents what I have walked through from here
  • Relationship between django-admin.py and manage.py
manage.py is a wrapper of django-admin.py which take cares the following before delegated to django-admin.py:
* It puts your project’s package on sys.path.
* It sets the DJANGO_SETTINGS_MODULE environment variable so that it points to your project’s settings.py file.
* It calls django.setup() to initialize various internals of Django.
  • List of helpful commands
    • dumpdata, output all data in database related to the given apps
    • inspectdb, create a model for each table inside the database
    • loaddata, load data from fixture to the database
    • flush, erase all data from the database

沒有留言:

張貼留言