From 9fafb5afeba99e7b21ecb7a84c34ea489441fb25 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)