<spanid="evennia-accounts-models"></span><h1>evennia.accounts.models<aclass="headerlink"href="#module-evennia.accounts.models"title="Permalink to this headline">¶</a></h1>
<p>Account</p>
<p>The account class is an extension of the default Django user class,
and is customized for the needs of Evennia.</p>
<p>We use the Account to store a more mud-friendly style of permission
system as well as to allow the admin more flexibility by storing
attributes on the Account. Within the game we should normally use the
Account manager’s methods to create users so that permissions are set
correctly.</p>
<p>To make the Account model more flexible for your own game, it can also
persistently store attributes of its own. This is ideal for extra
account info and OOC account configuration variables etc.</p>
<dlclass="py class">
<dtid="evennia.accounts.models.AccountDB">
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.accounts.models.</code><codeclass="sig-name descname">AccountDB</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o">*</span><spanclass="n">args</span></em>, <emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/accounts/models.html#AccountDB"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.accounts.models.AccountDB"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">db_is_connected</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.db_is_connected"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
<codeclass="sig-name descname">db_cmdset_storage</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.db_cmdset_storage"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
<codeclass="sig-name descname">db_is_bot</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.db_is_bot"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
<codeclass="sig-name descname">objects</code><emclass="property"> = <evennia.accounts.manager.AccountDBManager object></em><aclass="headerlink"href="#evennia.accounts.models.AccountDB.objects"title="Permalink to this definition">¶</a></dt>
<emclass="property">property </em><codeclass="sig-name descname">cmdset_storage</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.cmdset_storage"title="Permalink to this definition">¶</a></dt>
<dd><p>Getter. Allows for value = self.name. Returns a list of cmdset_storage.</p>
</dd></dl>
<dlclass="py method">
<dtid="evennia.accounts.models.AccountDB.name">
<emclass="property">property </em><codeclass="sig-name descname">name</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.name"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py method">
<dtid="evennia.accounts.models.AccountDB.key">
<emclass="property">property </em><codeclass="sig-name descname">key</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.key"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py method">
<dtid="evennia.accounts.models.AccountDB.uid">
<emclass="property">property </em><codeclass="sig-name descname">uid</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.uid"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="sig-name descname">DoesNotExist</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.DoesNotExist"title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="sig-name descname">MultipleObjectsReturned</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.MultipleObjectsReturned"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">account_subscription_set</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.account_subscription_set"title="Permalink to this definition">¶</a></dt>
<dd><p>Accessor to the related objects manager on the forward and reverse sides of
<codeclass="sig-name descname">date_joined</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.date_joined"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
<codeclass="sig-name descname">db_attributes</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.db_attributes"title="Permalink to this definition">¶</a></dt>
<dd><p>Accessor to the related objects manager on the forward and reverse sides of
<codeclass="sig-name descname">db_date_created</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.db_date_created"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.</p>
</dd></dl>
<dlclass="py attribute">
<dtid="evennia.accounts.models.AccountDB.db_key">
<codeclass="sig-name descname">db_key</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.db_key"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
<codeclass="sig-name descname">db_lock_storage</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.db_lock_storage"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
<codeclass="sig-name descname">db_tags</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.db_tags"title="Permalink to this definition">¶</a></dt>
<dd><p>Accessor to the related objects manager on the forward and reverse sides of
<codeclass="sig-name descname">db_typeclass_path</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.db_typeclass_path"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.</p>
</dd></dl>
<dlclass="py attribute">
<dtid="evennia.accounts.models.AccountDB.email">
<codeclass="sig-name descname">email</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.email"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
<codeclass="sig-name descname">first_name</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.first_name"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
<codeclass="sig-name descname">get_next_by_date_joined</code><spanclass="sig-paren">(</span><emclass="sig-param">*</em>, <emclass="sig-param">field=<django.db.models.fields.DateTimeField: date_joined></em>, <emclass="sig-param">is_next=True</em>, <emclass="sig-param">**kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#evennia.accounts.models.AccountDB.get_next_by_date_joined"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">get_next_by_db_date_created</code><spanclass="sig-paren">(</span><emclass="sig-param">*</em>, <emclass="sig-param">field=<django.db.models.fields.DateTimeField: db_date_created></em>, <emclass="sig-param">is_next=True</em>, <emclass="sig-param">**kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#evennia.accounts.models.AccountDB.get_next_by_db_date_created"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">get_previous_by_date_joined</code><spanclass="sig-paren">(</span><emclass="sig-param">*</em>, <emclass="sig-param">field=<django.db.models.fields.DateTimeField: date_joined></em>, <emclass="sig-param">is_next=False</em>, <emclass="sig-param">**kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#evennia.accounts.models.AccountDB.get_previous_by_date_joined"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">get_previous_by_db_date_created</code><spanclass="sig-paren">(</span><emclass="sig-param">*</em>, <emclass="sig-param">field=<django.db.models.fields.DateTimeField: db_date_created></em>, <emclass="sig-param">is_next=False</em>, <emclass="sig-param">**kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#evennia.accounts.models.AccountDB.get_previous_by_db_date_created"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py attribute">
<dtid="evennia.accounts.models.AccountDB.groups">
<codeclass="sig-name descname">groups</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.groups"title="Permalink to this definition">¶</a></dt>
<dd><p>Accessor to the related objects manager on the forward and reverse sides of
<codeclass="sig-name descname">hide_from_accounts_set</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.hide_from_accounts_set"title="Permalink to this definition">¶</a></dt>
<dd><p>Accessor to the related objects manager on the forward and reverse sides of
<p><strong>**Pizza.toppings**</strong> and <strong>**Topping.pizzas**</strong> are <strong>**ManyToManyDescriptor**</strong>
instances.</p>
<p>Most of the implementation is delegated to a dynamically defined manager
class built by <strong>**create_forward_many_to_many_manager()**</strong> defined below.</p>
</dd></dl>
<dlclass="py attribute">
<dtid="evennia.accounts.models.AccountDB.id">
<codeclass="sig-name descname">id</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.id"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
<codeclass="sig-name descname">is_active</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.is_active"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.</p>
</dd></dl>
<dlclass="py method">
<dtid="evennia.accounts.models.AccountDB.is_bot">
<emclass="property">property </em><codeclass="sig-name descname">is_bot</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.is_bot"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for getting database field <strong>db_is_bot</strong>.</p>
<emclass="property">property </em><codeclass="sig-name descname">is_connected</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.is_connected"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for getting database field <strong>db_is_connected</strong>.</p>
<codeclass="sig-name descname">is_staff</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.is_staff"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
<codeclass="sig-name descname">is_superuser</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.is_superuser"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
<codeclass="sig-name descname">last_login</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.last_login"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
<codeclass="sig-name descname">last_name</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.last_name"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
<codeclass="sig-name descname">logentry_set</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.logentry_set"title="Permalink to this definition">¶</a></dt>
<dd><p>Accessor to the related objects manager on the reverse side of a
<codeclass="sig-name descname">objectdb_set</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.objectdb_set"title="Permalink to this definition">¶</a></dt>
<dd><p>Accessor to the related objects manager on the reverse side of a
<codeclass="sig-name descname">password</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.password"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.</p>
</dd></dl>
<dlclass="py attribute">
<dtid="evennia.accounts.models.AccountDB.path">
<codeclass="sig-name descname">path</code><emclass="property"> = 'evennia.accounts.models.AccountDB'</em><aclass="headerlink"href="#evennia.accounts.models.AccountDB.path"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">receiver_account_set</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.receiver_account_set"title="Permalink to this definition">¶</a></dt>
<dd><p>Accessor to the related objects manager on the forward and reverse sides of
<codeclass="sig-name descname">scriptdb_set</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.scriptdb_set"title="Permalink to this definition">¶</a></dt>
<dd><p>Accessor to the related objects manager on the reverse side of a
<codeclass="sig-name descname">sender_account_set</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.sender_account_set"title="Permalink to this definition">¶</a></dt>
<dd><p>Accessor to the related objects manager on the forward and reverse sides of
<codeclass="sig-name descname">typename</code><emclass="property"> = 'SharedMemoryModelBase'</em><aclass="headerlink"href="#evennia.accounts.models.AccountDB.typename"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">user_permissions</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.user_permissions"title="Permalink to this definition">¶</a></dt>
<dd><p>Accessor to the related objects manager on the forward and reverse sides of
<codeclass="sig-name descname">username</code><aclass="headerlink"href="#evennia.accounts.models.AccountDB.username"title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper for a deferred-loading field. When the value is read from this