diff options
author | pnshiralkar | 2020-05-14 16:26:01 +0530 |
---|---|---|
committer | pnshiralkar | 2020-05-14 16:26:01 +0530 |
commit | c23bbd34b4f31002c47ef6167144f104b74b5b71 (patch) | |
tree | c0a33682ef7478ab2e8f78b7ca56f265a2d12d84 /cms/admin.py | |
parent | 778a1d2d8100ad0e2bfc2ce98bf610c9961f4a5e (diff) | |
download | workshop_booking-c23bbd34b4f31002c47ef6167144f104b74b5b71.tar.gz workshop_booking-c23bbd34b4f31002c47ef6167144f104b74b5b71.tar.bz2 workshop_booking-c23bbd34b4f31002c47ef6167144f104b74b5b71.zip |
Improved Adminsite view, changed CDN to static files
Diffstat (limited to 'cms/admin.py')
-rw-r--r-- | cms/admin.py | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/cms/admin.py b/cms/admin.py index 8918797..595793e 100644 --- a/cms/admin.py +++ b/cms/admin.py @@ -1,9 +1,30 @@ from django.contrib import admin + from cms.models import * + # Register your models here. -admin.site.register(Nav) -admin.site.register(SubNav) -admin.site.register(Page) -admin.site.register(StaticFile) +class NavAdmin(admin.ModelAdmin): + list_display = ['name', 'link', 'position'] + ordering = ['position'] + + +class SubNavAdmin(admin.ModelAdmin): + list_display = ['name', 'nav', 'link', 'position'] + ordering = ['nav', 'position'] + list_filter = ['nav'] + + +class PageAdmin(admin.ModelAdmin): + list_display = ['title', 'permalink', 'pub_date'] + + +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) |