Update HaProxy document, move server/admin to correct place
This commit is contained in:
parent
d4f61f1a14
commit
59dd0b007a
9 changed files with 266 additions and 83 deletions
|
|
@ -12,3 +12,4 @@ from .scripts import ScriptAdmin
|
|||
from .comms import ChannelAdmin, MsgAdmin
|
||||
from .help import HelpEntryAdmin
|
||||
from .tags import TagAdmin
|
||||
from .server import ServerConfigAdmin
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class HelpTagInline(TagInline):
|
|||
class HelpEntryForm(forms.ModelForm):
|
||||
"Defines how to display the help entry"
|
||||
|
||||
class Meta(object):
|
||||
class Meta:
|
||||
model = HelpEntry
|
||||
fields = "__all__"
|
||||
|
||||
|
|
@ -29,9 +29,11 @@ class HelpEntryForm(forms.ModelForm):
|
|||
required=False,
|
||||
widget=forms.Textarea(attrs={"cols": "100", "rows": "2"}),
|
||||
help_text="Set lock to view:all() unless you want it to only show to certain users."
|
||||
"<BR>Use the `edit:` limit if wanting to limit who can edit from in-game. By default it's only "
|
||||
"limited to who can use the `sethelp` command (Builders).")
|
||||
"<BR>Use the `edit:` limit if wanting to limit who can edit from in-game. By default it's "
|
||||
"only limited to who can use the `sethelp` command (Builders).")
|
||||
|
||||
|
||||
@admin.register(HelpEntry)
|
||||
class HelpEntryAdmin(admin.ModelAdmin):
|
||||
"Sets up the admin manaager for help entries"
|
||||
inlines = [HelpTagInline]
|
||||
|
|
@ -59,5 +61,3 @@ class HelpEntryAdmin(admin.ModelAdmin):
|
|||
},
|
||||
),
|
||||
)
|
||||
|
||||
admin.site.register(HelpEntry, HelpEntryAdmin)
|
||||
|
|
|
|||
25
evennia/web/admin/server.py
Normal file
25
evennia/web/admin/server.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
"""
|
||||
|
||||
This sets up how models are displayed
|
||||
in the web admin interface.
|
||||
|
||||
"""
|
||||
|
||||
from django.contrib import admin
|
||||
from evennia.server.models import ServerConfig
|
||||
|
||||
|
||||
@admin.register(ServerConfig)
|
||||
class ServerConfigAdmin(admin.ModelAdmin):
|
||||
"""
|
||||
Custom admin for server configs
|
||||
|
||||
"""
|
||||
|
||||
list_display = ("db_key", "db_value")
|
||||
list_display_links = ("db_key",)
|
||||
ordering = ["db_key", "db_value"]
|
||||
search_fields = ["db_key"]
|
||||
save_as = True
|
||||
save_on_top = True
|
||||
list_select_related = True
|
||||
Loading…
Add table
Add a link
Reference in a new issue