Tidying up the admin interface by adding more verbose and helpful names to database fields as well as adding more help texts. The ObjectAdmin still gives tracebacks.

This commit is contained in:
Griatch 2011-10-02 01:21:03 +02:00
parent 6ae1123421
commit 7f2e6dd4fa
11 changed files with 137 additions and 80 deletions

View file

@ -2,11 +2,17 @@ from django.contrib import admin
from src.help.models import HelpEntry
class HelpEntryAdmin(admin.ModelAdmin):
list_display = ('id', 'db_key', 'db_help_category')
list_display = ('id', 'db_key', 'db_help_category', 'db_lock_storage')
list_display_links = ('id', 'db_key')
search_fields = ['^db_key', 'db_entrytext']
ordering = ['db_help_category', 'db_key']
save_as = True
save_on_top = True
list_select_related = True
fieldsets = (
(None, {'fields':(('db_key', 'db_help_category'), 'db_entrytext', 'db_lock_storage'),
'description':"Sets a Help entry. Set lock to <i>view:all()</I> unless you want to restrict it."}),)
admin.site.register(HelpEntry, HelpEntryAdmin)