diff options
Diffstat (limited to 'cms/admin.py')
-rw-r--r-- | cms/admin.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cms/admin.py b/cms/admin.py new file mode 100644 index 0000000..d0b7626 --- /dev/null +++ b/cms/admin.py @@ -0,0 +1,30 @@ +from django.contrib import admin + +from cms.models import * + + +# Register your models here. + +class NavAdmin(admin.ModelAdmin): + list_display = ['name', 'link', 'position', 'active'] + ordering = ['position'] + + +class SubNavAdmin(admin.ModelAdmin): + list_display = ['name', 'nav', 'link', 'position', 'active'] + ordering = ['nav', 'position'] + list_filter = ['nav'] + + +class PageAdmin(admin.ModelAdmin): + list_display = ['title', 'permalink', 'pub_date', 'active'] + + +class StaticFileAdmin(admin.ModelAdmin): + list_display = ['filename', 'file'] + + +admin.site.register(Nav, NavAdmin) +admin.site.register(SubNav, SubNavAdmin) +admin.site.register(Page, PageAdmin) +admin.site.register(StaticFile, StaticFileAdmin) |