We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82866e3 commit 97d6f6dCopy full SHA for 97d6f6d
example/simpleshop/admin.py
@@ -2,10 +2,12 @@
2
from simpleshop.models import Product, ProductCategory
3
4
5
+@admin.register(ProductCategory)
6
class ProductCategoryAdmin(admin.ModelAdmin):
7
prepopulated_fields = {"slug": ("title",)}
8
9
10
+@admin.register(Product)
11
class ProductAdmin(admin.ModelAdmin):
12
"""
13
A simple admin interface for the product administration.
@@ -16,5 +18,3 @@ class ProductAdmin(admin.ModelAdmin):
16
18
17
19
20
-admin.site.register(Product, ProductAdmin)
-admin.site.register(ProductCategory, ProductCategoryAdmin)
0 commit comments