evennia.web.admin.accounts¶
-
class
evennia.web.admin.accounts.AccountChangeForm(*args, **kwargs)[源代码]¶ 基类:
django.contrib.auth.forms.UserChangeFormModify the accountdb class.
-
base_fields= {'date_joined': <django.forms.fields.DateTimeField object>, 'db_attributes': <django.forms.models.ModelMultipleChoiceField object>, 'db_cmdset_storage': <django.forms.fields.CharField object>, 'db_is_bot': <django.forms.fields.BooleanField object>, 'db_is_connected': <django.forms.fields.BooleanField object>, 'db_key': <django.forms.fields.CharField object>, 'db_lock_storage': <django.forms.fields.CharField object>, 'db_tags': <django.forms.models.ModelMultipleChoiceField object>, 'db_typeclass_path': <django.forms.fields.ChoiceField object>, 'email': <django.forms.fields.EmailField object>, 'first_name': <django.forms.fields.CharField object>, 'groups': <django.forms.models.ModelMultipleChoiceField object>, 'is_active': <django.forms.fields.BooleanField object>, 'is_staff': <django.forms.fields.BooleanField object>, 'is_superuser': <django.forms.fields.BooleanField object>, 'last_login': <django.forms.fields.DateTimeField object>, 'last_name': <django.forms.fields.CharField object>, 'password': <django.contrib.auth.forms.ReadOnlyPasswordHashField object>, 'user_permissions': <django.forms.models.ModelMultipleChoiceField object>, 'username': <django.forms.fields.RegexField object>}¶
-
declared_fields= {'db_cmdset_storage': <django.forms.fields.CharField object>, 'db_lock_storage': <django.forms.fields.CharField object>, 'db_typeclass_path': <django.forms.fields.ChoiceField object>, 'is_superuser': <django.forms.fields.BooleanField object>, 'password': <django.contrib.auth.forms.ReadOnlyPasswordHashField object>, 'username': <django.forms.fields.RegexField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
evennia.web.admin.accounts.AccountCreationForm(*args, **kwargs)[源代码]¶ 基类:
django.contrib.auth.forms.UserCreationFormCreate a new AccountDB instance.
-
base_fields= {'date_joined': <django.forms.fields.DateTimeField object>, 'db_attributes': <django.forms.models.ModelMultipleChoiceField object>, 'db_cmdset_storage': <django.forms.fields.CharField object>, 'db_is_bot': <django.forms.fields.BooleanField object>, 'db_is_connected': <django.forms.fields.BooleanField object>, 'db_key': <django.forms.fields.CharField object>, 'db_lock_storage': <django.forms.fields.CharField object>, 'db_tags': <django.forms.models.ModelMultipleChoiceField object>, 'db_typeclass_path': <django.forms.fields.CharField object>, 'email': <django.forms.fields.EmailField object>, 'first_name': <django.forms.fields.CharField object>, 'groups': <django.forms.models.ModelMultipleChoiceField object>, 'is_active': <django.forms.fields.BooleanField object>, 'is_staff': <django.forms.fields.BooleanField object>, 'is_superuser': <django.forms.fields.BooleanField object>, 'last_login': <django.forms.fields.DateTimeField object>, 'last_name': <django.forms.fields.CharField object>, 'password': <django.forms.fields.CharField object>, 'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>, 'user_permissions': <django.forms.models.ModelMultipleChoiceField object>, 'username': <django.forms.fields.RegexField object>}¶
-
declared_fields= {'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>, 'username': <django.forms.fields.RegexField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
class
evennia.web.admin.accounts.AccountTagInline(parent_model, admin_site)[源代码]¶ 基类:
evennia.web.admin.tags.TagInlineInline Account Tags.
-
model¶ evennia.accounts.models.AccountDB_db_tags的别名
-
property
media¶
-
-
class
evennia.web.admin.accounts.AccountAttributeInline(parent_model, admin_site)[源代码]¶ 基类:
evennia.web.admin.attributes.AttributeInlineInline Account Attributes.
-
model¶ evennia.accounts.models.AccountDB_db_attributes的别名
-
property
media¶
-
-
class
evennia.web.admin.accounts.ObjectPuppetInline(parent_model, admin_site)[源代码]¶ 基类:
django.contrib.admin.options.StackedInlineInline creation of puppet-Object in Account.
-
class
ObjectCreateForm(*args, **kwargs)¶ 基类:
django.forms.models.ModelFormThis form details the look of the fields.
-
__init__(*args, **kwargs)¶ Tweak some fields dynamically.
-
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.ChoiceField object>}¶
-
declared_fields= {'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_typeclass_path': <django.forms.fields.ChoiceField object>}¶
-
property
media¶ Return all media required to render the widgets on this form.
-
-
verbose_name= 'Puppeted Object'¶
-
model¶
-
view_on_site= False¶
-
show_change_link= True¶
-
fieldsets= ((None, {'fields': (('db_key', 'db_typeclass_path'), ('db_location', 'db_home', 'db_destination'), 'db_cmdset_storage', 'db_lock_storage'), 'description': 'Object currently puppeted by the account (note that this will go away if account logs out or unpuppets)'}),)¶
-
extra= 0¶
-
readonly_fields= ('db_key', 'db_typeclass_path', 'db_destination', 'db_location', 'db_home', 'db_account', 'db_cmdset_storage', 'db_lock_storage')¶
-
has_add_permission(request, obj=None)[源代码]¶ Return True if the given request has permission to add an object. Can be overridden by the user in subclasses.
-
has_delete_permission(request, obj=None)[源代码]¶ Return True if the given request has permission to delete the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
-
property
media¶
-
class
-
class
evennia.web.admin.accounts.AccountAdmin(model, admin_site)[源代码]¶ 基类:
django.contrib.auth.admin.UserAdminThis is the main creation screen for Users/accounts
-
list_display= ('id', 'username', 'is_staff', 'is_superuser', 'db_typeclass_path', 'db_date_created')¶
-
list_display_links= ('id', 'username')¶
-
form¶
-
add_form¶
-
search_fields= ['=id', '^username', 'db_typeclass_path']¶
-
ordering= ['-db_date_created', 'id']¶
-
list_filter= ['is_superuser', 'is_staff', 'db_typeclass_path']¶
-
inlines= [<class 'evennia.web.admin.accounts.AccountTagInline'>, <class 'evennia.web.admin.accounts.AccountAttributeInline'>]¶
-
readonly_fields= ['db_date_created', 'serialized_string', 'puppeted_objects']¶
-
view_on_site= False¶
-
fieldsets= ((None, {'fields': (('username', 'db_typeclass_path'), 'password', 'email', 'db_date_created', 'db_lock_storage', 'db_cmdset_storage', 'puppeted_objects', 'serialized_string')}), ('Admin/Website properties', {'fields': (('first_name', 'last_name'), 'last_login', 'date_joined', 'is_active', 'is_staff', 'is_superuser', 'user_permissions', 'groups'), 'description': '<i>Used by the website/Django admin. Except for `superuser status`, the permissions are not used in-game.</i>'}))¶
-
add_fieldsets= ((None, {'fields': ('username', 'password1', 'password2', 'email'), 'description': '<i>These account details are shared by the admin system and the game.</i>'}),)¶
-
save_model(request, obj, form, change)[源代码]¶ Custom save actions.
- 参数
request (Request) – Incoming request.
obj (Object) – Object to save.
form (Form) – Related form instance.
change (bool) – False if this is a new save and not an update.
-
response_add(request, obj, post_url_continue=None)[源代码]¶ Determine the HttpResponse for the add_view stage. It mostly defers to its superclass implementation but is customized because the User model has a slightly different workflow.
-
property
media¶
-