it/itf/pages/admin.py

16 lines
407 B
Python
Raw Normal View History

2011-12-27 13:05:42 +00:00
from django.contrib import admin
from models import *
2011-12-27 13:09:11 +00:00
from markitup.widgets import MarkItUpWidget
2011-12-27 13:05:42 +00:00
# from forms import ArticleForm
class PageAdmin(admin.ModelAdmin):
2011-12-27 13:09:11 +00:00
formfield_overrides = {models.TextField: {'widget': MarkItUpWidget}}
2011-12-27 13:05:42 +00:00
prepopulated_fields = {'slug': ('title',)}
2011-12-27 13:09:11 +00:00
2011-12-27 13:05:42 +00:00
# search_fields = ('title', 'synopsis',),
# list_display = ('title', 'date',)
admin.site.register(Page, PageAdmin)