evennia.objects.admin¶
-
class
evennia.objects.admin.
ObjectAttributeInline
(parent_model, admin_site)[source]¶ Bases:
evennia.typeclasses.admin.AttributeInline
Defines inline descriptions of Attributes (experimental)
-
model
¶ alias of
evennia.objects.models.ObjectDB_db_attributes
-
property
media
¶
-
-
class
evennia.objects.admin.
ObjectTagInline
(parent_model, admin_site)[source]¶ Bases:
evennia.typeclasses.admin.TagInline
Defines inline descriptions of Tags (experimental)
-
model
¶ alias of
evennia.objects.models.ObjectDB_db_tags
-
property
media
¶
-
-
class
evennia.objects.admin.
ObjectCreateForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.models.ModelForm
This form details the look of the fields.
-
class
Meta
[source]¶ Bases:
object
-
model
¶ alias of
evennia.objects.models.ObjectDB
-
fields
= '__all__'¶
-
-
raw_id_fields
= ('db_destination', 'db_location', 'db_home')¶
-
base_fields
= {'db_account': <django.forms.models.ModelChoiceField object>, 'db_attributes': <django.forms.models.ModelMultipleChoiceField object>, 'db_cmdset_storage': <django.forms.fields.CharField object>, 'db_destination': <django.forms.models.ModelChoiceField object>, 'db_home': <django.forms.models.ModelChoiceField object>, 'db_key': <django.forms.fields.CharField object>, 'db_location': <django.forms.models.ModelChoiceField object>, 'db_lock_storage': <django.forms.fields.CharField object>, 'db_sessid': <django.forms.fields.CharField object>, 'db_tags': <django.forms.models.ModelMultipleChoiceField object>, 'db_typeclass_path': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'db_cmdset_storage': <django.forms.fields.CharField object>, 'db_key': <django.forms.fields.CharField object>, 'db_typeclass_path': <django.forms.fields.CharField object>}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
class
-
class
evennia.objects.admin.
ObjectEditForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
evennia.objects.admin.ObjectCreateForm
Form used for editing. Extends the create one with more fields
-
base_fields
= {'db_cmdset_storage': <django.forms.fields.CharField object>, 'db_key': <django.forms.fields.CharField object>, 'db_lock_storage': <django.forms.fields.CharField object>, 'db_typeclass_path': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'db_cmdset_storage': <django.forms.fields.CharField object>, 'db_key': <django.forms.fields.CharField object>, 'db_lock_storage': <django.forms.fields.CharField object>, 'db_typeclass_path': <django.forms.fields.CharField object>}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
-
class
evennia.objects.admin.
ObjectDBAdmin
(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin
Describes the admin page for Objects.
-
inlines
= [<class 'evennia.objects.admin.ObjectTagInline'>, <class 'evennia.objects.admin.ObjectAttributeInline'>]¶
-
list_display
= ('id', 'db_key', 'db_account', 'db_typeclass_path')¶
-
list_display_links
= ('id', 'db_key')¶
-
ordering
= ['db_account', 'db_typeclass_path', 'id']¶
-
search_fields
= ['=id', '^db_key', 'db_typeclass_path', '^db_account__db_key']¶
-
raw_id_fields
= ('db_destination', 'db_location', 'db_home')¶
-
save_as
= True¶
-
save_on_top
= True¶
-
list_filter
= ('db_typeclass_path',)¶
-
form
¶ alias of
ObjectEditForm
-
fieldsets
= ((None, {'fields': (('db_key', 'db_typeclass_path'), ('db_lock_storage',), ('db_location', 'db_home'), 'db_destination', 'db_cmdset_storage')}),)¶
-
add_form
¶ alias of
ObjectCreateForm
-
add_fieldsets
= ((None, {'fields': (('db_key', 'db_typeclass_path'), ('db_location', 'db_home'), 'db_destination', 'db_cmdset_storage')}),)¶
-
get_fieldsets
(request, obj=None)[source]¶ Return fieldsets.
- Parameters
request (Request) – Incoming request.
obj (ObjectDB, optional) – Database object.
-
get_form
(request, obj=None, **kwargs)[source]¶ Use special form during creation.
- Parameters
request (Request) – Incoming request.
obj (Object, optional) – Database object.
-
save_model
(request, obj, form, change)[source]¶ Model-save hook.
- Parameters
request (Request) – Incoming request.
obj (Object) – Database object.
form (Form) – Form instance.
change (bool) – If this is a change or a new object.
-
response_add
(request, obj, post_url_continue=None)[source]¶ Determine the HttpResponse for the add_view stage.
-
property
media
¶
-