Finally got around to creating admin.py files for all of the apps. This will prevent some really weird import errors and fixes an issue with the Attribute model's admin display. May also cut resource usage slightly for MUD server instances. Needs more testing!
This commit is contained in:
parent
1da2179ee6
commit
573d1b6e88
9 changed files with 49 additions and 62 deletions
15
src/config/admin.py
Normal file
15
src/config/admin.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from src.config.models import CommandAlias, ConfigValue, ConnectScreen
|
||||
from django.contrib import admin
|
||||
|
||||
class CommandAliasAdmin(admin.ModelAdmin):
|
||||
list_display = ('user_input', 'equiv_command')
|
||||
admin.site.register(CommandAlias, CommandAliasAdmin)
|
||||
|
||||
class ConfigValueAdmin(admin.ModelAdmin):
|
||||
list_display = ('conf_key', 'conf_value')
|
||||
admin.site.register(ConfigValue, ConfigValueAdmin)
|
||||
|
||||
class ConnectScreenAdmin(admin.ModelAdmin):
|
||||
list_display = ('id', 'name', 'is_active')
|
||||
list_display_links = ('id', 'name')
|
||||
admin.site.register(ConnectScreen, ConnectScreenAdmin)
|
||||
Loading…
Add table
Add a link
Reference in a new issue