|
Revision 68, 0.8 kB
(checked in by nobu, 8 months ago)
|
pluggable-contents:
|
| Line | |
|---|
| 1 |
# vim: fileencoding=utf-8 : |
|---|
| 2 |
|
|---|
| 3 |
from django.contrib import admin |
|---|
| 4 |
from django.utils.translation import ugettext_lazy as _ |
|---|
| 5 |
|
|---|
| 6 |
from common.models import FlatPage |
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
class FlatPageAdmin(admin.ModelAdmin): |
|---|
| 10 |
fieldsets = ( |
|---|
| 11 |
(_(u"Normal parameters"), { |
|---|
| 12 |
'fields': ('url', 'title', 'content', 'navigation_enabled', 'is_published'), |
|---|
| 13 |
}), |
|---|
| 14 |
(_(u"Advanced options"), { |
|---|
| 15 |
'classes': ('collapse',), |
|---|
| 16 |
'fields': ('template_name', 'is_active'), |
|---|
| 17 |
}), |
|---|
| 18 |
) |
|---|
| 19 |
list_display = ('title', 'url', 'created_at', 'updated_at', |
|---|
| 20 |
'navigation_enabled', 'is_published', 'is_active') |
|---|
| 21 |
list_filter = ('navigation_enabled', 'is_published', 'is_active') |
|---|
| 22 |
list_per_page = 50 |
|---|
| 23 |
search_fields = ('url', '^title') |
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
admin.site.register(FlatPage, FlatPageAdmin) |
|---|