Some refinements to the admin interface for objects and players.
This commit is contained in:
parent
40ff9eaa67
commit
fbd1b5223b
2 changed files with 2 additions and 2 deletions
|
|
@ -64,6 +64,7 @@ class ObjectDBAdmin(admin.ModelAdmin):
|
||||||
list_display_links = ('id', 'db_key')
|
list_display_links = ('id', 'db_key')
|
||||||
ordering = ['db_player', 'db_typeclass_path', 'id']
|
ordering = ['db_player', 'db_typeclass_path', 'id']
|
||||||
search_fields = ['^db_key', 'db_typeclass_path']
|
search_fields = ['^db_key', 'db_typeclass_path']
|
||||||
|
raw_id_fields = ('db_destination', 'db_location', 'db_home')
|
||||||
|
|
||||||
save_as = True
|
save_as = True
|
||||||
save_on_top = True
|
save_on_top = True
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,6 @@ class PlayerDBAdmin(BaseUserAdmin):
|
||||||
inlines = [PlayerInline]
|
inlines = [PlayerInline]
|
||||||
add_form_template = "admin/players/add_form.html"
|
add_form_template = "admin/players/add_form.html"
|
||||||
change_form_template = "admin/players/change_form.html"
|
change_form_template = "admin/players/change_form.html"
|
||||||
change_list_template = "admin/players/change_list.html"
|
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
(None, {'fields': ('username', 'password', 'email')}),
|
(None, {'fields': ('username', 'password', 'email')}),
|
||||||
('Website profile', {'fields': ('first_name', 'last_name'),
|
('Website profile', {'fields': ('first_name', 'last_name'),
|
||||||
|
|
@ -167,4 +166,4 @@ class PlayerDBAdmin(BaseUserAdmin):
|
||||||
typeclass=typeclass,
|
typeclass=typeclass,
|
||||||
player_dbobj=playerobj)
|
player_dbobj=playerobj)
|
||||||
|
|
||||||
admin.site.register(PlayerDB, PlayerDBAdmin)
|
admin.site.register(PlayerDB, PlayerDBAdmin)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue