diff options
Diffstat (limited to 'app/pages/admin.py')
-rw-r--r-- | app/pages/admin.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/app/pages/admin.py b/app/pages/admin.py index 5cd2b23..4b4dcce 100644 --- a/app/pages/admin.py +++ b/app/pages/admin.py @@ -1,10 +1,11 @@ from django.contrib import admin +from utils.widgets import LGEntryForm from django import forms from django.forms import Textarea from django.db import models -from pages.models import Page +from pages.models import Page, HomePage class PageEntryForm(forms.ModelForm): @@ -16,6 +17,7 @@ class PageEntryForm(forms.ModelForm): } +@admin.register(Page) class PageAdmin(admin.ModelAdmin): form = PageEntryForm list_display = ('title', 'slug', 'path', 'app', 'build') @@ -32,4 +34,14 @@ class PageAdmin(admin.ModelAdmin): }) ) -admin.site.register(Page, PageAdmin) + +@admin.register(HomePage) +class HomePageAdmin(admin.ModelAdmin): + form = LGEntryForm + filter_horizontal = ('popular',) + + class Media: + js = ('image-loader.js', 'next-prev-links.js') + css = { + "all": ("my_styles.css",) + } |