autowisp.browser_interface.core.models module
Class Inheritance Diagram

Shared base class for the browser interface’s database models.
- class autowisp.browser_interface.core.models.BuiModelBase(*args, **kwargs)[source]
Bases:
Model
Base for browser-interface models, recording when each row changed.
Every model in the browser-interface database should derive from this, so that a row can always be placed in time when something needs unpicking after the fact. It is the counterpart of the project database’s
autowisp.database.data_model.base.DataModelSubBase, which carries the same information in a column namedtimestamp.auto_nowalone would not be enough to keepmodifiedhonest. It fires onModel.save()andbulk_create(), but not onQuerySet.update(),bulk_update()or raw SQL – andbulk_updateis worse than a simple omission, since it reads the in-memory value rather than callingpre_saveand so writes back whatever was loaded, preserving a stale timestamp. A database trigger covers whatauto_nowcannot; seeautowisp.browser_interface.core.timestamp_triggers. Both are kept: the trigger is the guarantee,auto_nowis what leaves the in-memory object correct after asave()without re-reading it.- class Meta[source]
Bases:
objectContribute the fields to subclasses without creating a table.
- abstract = False
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)
- modified
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.