Django app demo, part 1

  1. Database setup
  2. Creating models: define the class and relationships
  3. Activating models:
    • add a reference to its configuration class in the INSTALLED_APPS (../settings.py) setting
    • three step guide to making model changes:
      a. Change your models (in models.py).
      b. Run python manage.py makemigrations to create migrations for those changes
      c. Run python manage.py migrate to apply those changes to the database.
  4. Playing with the API
    Command: py manage.py shell
  5. Introducing the Django Admin

Reference:
1. Tutorial
2. Related objects reference
3. Field-lookups

你可能感兴趣的:(web,Django)