From ed08e54a55355661e67d3d41cd478189ab23e59f Mon Sep 17 00:00:00 2001 From: rscnt Date: Mon, 8 Feb 2016 02:43:08 -0600 Subject: [PATCH] added digital glarus admin --- digitalglarus/admin.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/digitalglarus/admin.py b/digitalglarus/admin.py index 31bd8c97..62a2dc89 100644 --- a/digitalglarus/admin.py +++ b/digitalglarus/admin.py @@ -1,5 +1,12 @@ from django.contrib import admin -from .models import Message, Supporter +from .models import Message, Supporter, DGGallery, DGPicture +class DGPictureInline(admin.StackedInline): + model = DGPicture + +class DGGalleryAdmin(admin.ModelAdmin): + inlines = [DGPictureInline] + +admin.site.register(DGGallery, DGGalleryAdmin) admin.site.register(Message) admin.site.register(Supporter)