21 lines
675 B
Python
21 lines
675 B
Python
from django.contrib import admin
|
|
from django.contrib.flatpages.forms import FlatpageForm
|
|
from django.contrib.flatpages.models import FlatPage
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
|
class FlatPageAdmin(admin.ModelAdmin):
|
|
form = FlatpageForm
|
|
fieldsets = (
|
|
(None, {'fields': ('url', 'title', 'content', 'sites')}),
|
|
(_('Advanced options'), {
|
|
'classes': ('collapse',),
|
|
'fields': ('registration_required', 'template_name'),
|
|
}),
|
|
)
|
|
list_display = ('url', 'title')
|
|
list_filter = ('sites', 'registration_required')
|
|
search_fields = ('url', 'title')
|
|
|
|
admin.site.register(FlatPage, FlatPageAdmin)
|