summaryrefslogtreecommitdiffstats
path: root/news/admin.py
blob: 562c16d4b3217c42f3d6286704a6b0503f1ea2f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from django.contrib import admin

from .models import News


class NewsAdmin(admin.ModelAdmin):
    list_display = ('title', 'author', 'postdate', 'last_modified', 'safe_mode')
    list_filter = ('postdate', 'author', 'safe_mode')
    search_fields = ('title', 'content')
    date_hierarchy = 'postdate'


admin.site.register(News, NewsAdmin)

# vim: set ts=4 sw=4 et: