Skip to content

Commit 97d6f6d

Browse files
committed
Apply Django upgrade for Django 2.2+
1 parent 82866e3 commit 97d6f6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

example/simpleshop/admin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
from simpleshop.models import Product, ProductCategory
33

44

5+
@admin.register(ProductCategory)
56
class ProductCategoryAdmin(admin.ModelAdmin):
67
prepopulated_fields = {"slug": ("title",)}
78

89

10+
@admin.register(Product)
911
class ProductAdmin(admin.ModelAdmin):
1012
"""
1113
A simple admin interface for the product administration.
@@ -16,5 +18,3 @@ class ProductAdmin(admin.ModelAdmin):
1618
prepopulated_fields = {"slug": ("title",)}
1719

1820

19-
admin.site.register(Product, ProductAdmin)
20-
admin.site.register(ProductCategory, ProductCategoryAdmin)

0 commit comments

Comments
 (0)