evennia.web.admin.scripts

class evennia.web.admin.scripts.ScriptForm(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

base_fields = {'db_interval': <django.forms.fields.IntegerField object>, 'db_key': <django.forms.fields.CharField object>, 'db_lock_storage': <django.forms.fields.CharField object>, 'db_persistent': <django.forms.fields.BooleanField object>, 'db_repeats': <django.forms.fields.IntegerField object>, 'db_start_delay': <django.forms.fields.BooleanField object>, 'db_typeclass_path': <django.forms.fields.ChoiceField object>}
declared_fields = {'db_interval': <django.forms.fields.IntegerField object>, 'db_key': <django.forms.fields.CharField object>, 'db_lock_storage': <django.forms.fields.CharField object>, 'db_persistent': <django.forms.fields.BooleanField object>, 'db_repeats': <django.forms.fields.IntegerField object>, 'db_start_delay': <django.forms.fields.BooleanField object>, 'db_typeclass_path': <django.forms.fields.ChoiceField object>}
property media

Return all media required to render the widgets on this form.

class evennia.web.admin.scripts.ScriptTagInline(parent_model, admin_site)[source]

Bases: evennia.web.admin.tags.TagInline

Inline script tags.

model

alias of evennia.scripts.models.ScriptDB_db_tags

related_field = 'scriptdb'
property media
class evennia.web.admin.scripts.ScriptAttributeInline(parent_model, admin_site)[source]

Bases: evennia.web.admin.attributes.AttributeInline

Inline attribute tags.

model

alias of evennia.scripts.models.ScriptDB_db_attributes

related_field = 'scriptdb'
property media
class evennia.web.admin.scripts.ScriptAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

Displaying the main Script page.

list_display = ('id', 'db_key', 'db_typeclass_path', 'db_obj', 'db_interval', 'db_repeats', 'db_persistent', 'db_date_created')
ordering = ['-db_date_created', '-id']
search_fields = ['=id', '^db_key', 'db_typeclass_path']
readonly_fields = ['serialized_string']
form

alias of ScriptForm

save_as = True
save_on_top = True
view_on_site = False
raw_id_fields = ('db_obj',)
fieldsets = ((None, {'fields': (('db_key', 'db_typeclass_path'), ('db_interval', 'db_repeats', 'db_start_delay', 'db_persistent'), 'db_obj', 'db_lock_storage', 'serialized_string')}),)
inlines = [<class 'evennia.web.admin.scripts.ScriptTagInline'>, <class 'evennia.web.admin.scripts.ScriptAttributeInline'>]
serialized_string(obj)[source]

Get the serialized version of the object.

get_form(request, obj=None, **kwargs)[source]

Overrides help texts.

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.

property media