Skip to content

Commit

Permalink
Merge 05d78ca into 4aba1b5
Browse files Browse the repository at this point in the history
  • Loading branch information
BlauFeuer committed Mar 30, 2017
2 parents 4aba1b5 + 05d78ca commit b2913bb
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions evennia/objects/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,21 @@ class Meta(object):
fields = '__all__'
db_key = forms.CharField(label="Name/Key",
widget=forms.TextInput(attrs={'size': '78'}),
help_text="Main identifier, like 'apple', 'strong guy', 'Elizabeth' etc. If creating a Character, check so the name is unique among characters!",)
help_text="Main identifier, like 'apple', 'strong guy', 'Elizabeth' etc. "
"If creating a Character, check so the name is unique among characters!",)
db_typeclass_path = forms.CharField(label="Typeclass",
initial=settings.BASE_OBJECT_TYPECLASS,
widget=forms.TextInput(attrs={'size': '78'}),
help_text="This defines what 'type' of entity this is. This variable holds a Python path to a module with a valid Evennia Typeclass. If you are creating a Character you should use the typeclass defined by settings.BASE_CHARACTER_TYPECLASS or one derived from that.")
help_text="This defines what 'type' of entity this is. This variable holds a "
"Python path to a module with a valid Evennia Typeclass. If you are "
"creating a Character you should use the typeclass defined by "
"settings.BASE_CHARACTER_TYPECLASS or one derived from that.")
db_cmdset_storage = forms.CharField(label="CmdSet",
initial="",
required=False,
widget=forms.TextInput(attrs={'size': '78'}),
help_text="Most non-character objects don't need a cmdset and can leave this field blank.")
help_text="Most non-character objects don't need a cmdset"
" and can leave this field blank.")
raw_id_fields = ('db_destination', 'db_location', 'db_home')


Expand All @@ -63,8 +68,10 @@ class Meta(object):
fields = '__all__'
db_lock_storage = forms.CharField(label="Locks",
required=False,
widget=forms.Textarea(attrs={'cols':'100', 'rows':'2'}),
help_text="In-game lock definition string. If not given, defaults will be used. This string should be on the form <i>type:lockfunction(args);type2:lockfunction2(args);...")
widget=forms.Textarea(attrs={'cols': '100', 'rows': '2'}),
help_text="In-game lock definition string. If not given, defaults will be used. "
"This string should be on the form "
"<i>type:lockfunction(args);type2:lockfunction2(args);...")


class ObjectDBAdmin(admin.ModelAdmin):
Expand All @@ -90,15 +97,15 @@ class ObjectDBAdmin(admin.ModelAdmin):
form = ObjectEditForm
fieldsets = (
(None, {
'fields': (('db_key','db_typeclass_path'), ('db_lock_storage', ),
('db_location', 'db_home'), 'db_destination','db_cmdset_storage'
'fields': (('db_key', 'db_typeclass_path'), ('db_lock_storage', ),
('db_location', 'db_home'), 'db_destination', 'db_cmdset_storage'
)}),
)

add_form = ObjectCreateForm
add_fieldsets = (
(None, {
'fields': (('db_key','db_typeclass_path'),
'fields': (('db_key', 'db_typeclass_path'),
('db_location', 'db_home'), 'db_destination', 'db_cmdset_storage'
)}),
)
Expand Down

0 comments on commit b2913bb

Please sign in to comment.