tardis.apps.eventlog package¶
Subpackages¶
Submodules¶
tardis.apps.eventlog.admin module¶
- class tardis.apps.eventlog.admin.LogAdmin(model, admin_site)¶
Bases:
django.contrib.admin.options.ModelAdmin- list_display = ['timestamp', 'user', 'action', 'extra']¶
- list_filter = ['action__name', 'timestamp']¶
- property media¶
- raw_id_fields = ['user']¶
- search_fields = ['user__username', 'user__email', 'extra']¶
tardis.apps.eventlog.default_settings module¶
tardis.apps.eventlog.fields module¶
- class tardis.apps.eventlog.fields.JSONField(verbose_name=None, name=None, primary_key=False, max_length=None, unique=False, blank=False, null=False, db_index=False, rel=None, default=<class 'django.db.models.fields.NOT_PROVIDED'>, editable=True, serialize=True, unique_for_date=None, unique_for_month=None, unique_for_year=None, choices=None, help_text='', db_column=None, db_tablespace=None, auto_created=False, validators=(), error_messages=None)¶
Bases:
django.db.models.fields.FieldSimple class to make JSONField available to sqlite backends.
- db_type(connection)¶
Return the database column data type for this field, for the provided connection.
- from_db_value(value, expression, connection)¶
- get_prep_value(value)¶
Perform preliminary non-db specific value checks and conversions.
- to_python(value)¶
Convert the input value into the expected Python data type, raising django.core.exceptions.ValidationError if the data can’t be converted. Return the converted value. Subclasses should override this.
- value_to_string(obj)¶
Return a string value of this field from the passed obj. This is used by the serialization framework.
tardis.apps.eventlog.models module¶
- class tardis.apps.eventlog.models.Action(id, name)¶
Bases:
django.db.models.base.Model- exception DoesNotExist¶
- exception MultipleObjectsReturned¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- log_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- class tardis.apps.eventlog.models.Log(id, timestamp, action, user, content_type, object_id, extra)¶
Bases:
django.db.models.base.Model- exception DoesNotExist¶
- exception MultipleObjectsReturned¶
- action¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- action_id¶
- content_type¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- content_type_id¶
- extra¶
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_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)¶
- get_previous_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- obj¶
Provide a generic many-to-one relation through the
content_typeandobject_idfields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
- object_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- timestamp¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- user_id¶
tardis.apps.eventlog.signals module¶
tardis.apps.eventlog.urls module¶
tardis.apps.eventlog.utils module¶
- tardis.apps.eventlog.utils.get_request_data(request)¶
- tardis.apps.eventlog.utils.log(action, user=None, obj=None, extra=None, request=None)¶