summaryrefslogtreecommitdiff
path: root/cms/admin.py
blob: d0b76260ea2c876af2b685aa35d2d626a3f41ebf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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)