2008-07-19 07:54:34 +08:00
|
|
|
from django.contrib import admin
|
2015-01-28 20:35:27 +08:00
|
|
|
from django.contrib.flatpages.forms import FlatpageForm
|
2008-07-19 07:54:34 +08:00
|
|
|
from django.contrib.flatpages.models import FlatPage
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
2008-08-11 12:28:33 +08:00
|
|
|
|
2013-10-31 23:42:28 +08:00
|
|
|
|
2015-08-31 08:00:39 +08:00
|
|
|
@admin.register(FlatPage)
|
2008-07-19 07:54:34 +08:00
|
|
|
class FlatPageAdmin(admin.ModelAdmin):
|
2008-08-11 12:28:33 +08:00
|
|
|
form = FlatpageForm
|
2008-07-19 07:54:34 +08:00
|
|
|
fieldsets = (
|
|
|
|
(None, {'fields': ('url', 'title', 'content', 'sites')}),
|
2015-08-29 03:13:41 +08:00
|
|
|
(_('Advanced options'), {
|
|
|
|
'classes': ('collapse',),
|
|
|
|
'fields': ('registration_required', 'template_name'),
|
|
|
|
}),
|
2008-07-19 07:54:34 +08:00
|
|
|
)
|
|
|
|
list_display = ('url', 'title')
|
2015-08-29 03:13:41 +08:00
|
|
|
list_filter = ('sites', 'registration_required')
|
2008-07-19 07:54:34 +08:00
|
|
|
search_fields = ('url', 'title')
|