File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -84,17 +84,6 @@ Add ingredients as INSTALLED_APPS:
8484 ' cookbook.ingredients' ,
8585 ]
8686
87- Register models with admin panel:
88-
89- .. code :: python
90-
91- # cookbook/ingredients/admin.py
92- from django.contrib import admin
93- from cookbook.ingredients.models import Category, Ingredient
94-
95- admin.site.register(Category)
96- admin.site.register(Ingredient)
97-
9887
9988 Don't forget to create & run migrations:
10089
@@ -124,6 +113,18 @@ Alternatively you can use the Django admin interface to create some data
124113yourself. You'll need to run the development server (see below), and
125114create a login for yourself too (``./manage.py createsuperuser ``).
126115
116+ Register models with admin panel:
117+
118+ .. code :: python
119+
120+ # cookbook/ingredients/admin.py
121+ from django.contrib import admin
122+ from cookbook.ingredients.models import Category, Ingredient
123+
124+ admin.site.register(Category)
125+ admin.site.register(Ingredient)
126+
127+
127128 Hello GraphQL - Schema and Object Types
128129---------------------------------------
129130
You can’t perform that action at this time.
0 commit comments