From 0d697114cf3e3975cd2b0cbd2330d1ba8cc1e383 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sun, 18 Feb 2018 18:37:21 +0100 Subject: [PATCH] remove the inline pictures from the Article admin page I've removed the inline pictures because when you upload more than the maximum allowed pictures at once it still works. Only if you upload them one after the other the check works. Therefor it's safer to only allow the upload through the Picture admin page. This way the check works every time. --- django/didgeridoo/webshop/admin.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/django/didgeridoo/webshop/admin.py b/django/didgeridoo/webshop/admin.py index e3d5f74..e0a8803 100644 --- a/django/didgeridoo/webshop/admin.py +++ b/django/didgeridoo/webshop/admin.py @@ -53,10 +53,6 @@ class UserAdmin(BaseUserAdmin): inlines = (PersonInline,) -class ArticleAdmin(admin.ModelAdmin): - inlines = (PictureInline,) - - class OrderPositionInline(admin.StackedInline): model = OrderPosition can_delete = False @@ -81,7 +77,7 @@ class OrderOfGoodsAdmin(admin.ModelAdmin): admin.site.unregister(User) admin.site.register(User, UserAdmin) -admin.site.register(Article, ArticleAdmin) +admin.site.register(Article) admin.site.register(Order, OrderAdmin) admin.site.register(Picture, PictureAdmin) admin.site.register(City)