django_auxilium.models.base module¶
Collection of simple abstract base models with a few additional attributes which don’t require much logic.
-
class
django_auxilium.models.base.BaseModel(*args, **kwargs)[source]¶ Bases:
django_auxilium.models.base.CreatedModel,django_auxilium.models.base.ModifiedModelThis model adds date created and last date modified attributes
-
get_next_by_created(**morekwargs)¶
-
get_next_by_modified(**morekwargs)¶
-
get_previous_by_created(**morekwargs)¶
-
get_previous_by_modified(**morekwargs)¶
-
-
class
django_auxilium.models.base.CreatedModel(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelThis model adds date created attribute
-
created¶ DateTimeField – The datetime when the model instance is created
-
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(**morekwargs)¶
-
get_previous_by_created(**morekwargs)¶
-
-
class
django_auxilium.models.base.ModifiedModel(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelThis model adds the last date modified attribute
-
modified¶ DateTimeField – The datetime when the model was last modified and saved
-
get_next_by_modified(**morekwargs)¶
-
get_previous_by_modified(**morekwargs)¶
-
modified A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
django_auxilium.models.base.NoteModel(*args, **kwargs)[source]¶ Bases:
django_auxilium.models.base.BaseModelThis model adds a notes field
-
notes¶ TextField – Text field for storing notes
-
get_next_by_created(**morekwargs)¶
-
get_next_by_modified(**morekwargs)¶
-
get_previous_by_created(**morekwargs)¶
-
get_previous_by_modified(**morekwargs)¶
-
notes A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
django_auxilium.models.base.TitleDescriptionModel(*args, **kwargs)[source]¶ Bases:
django_auxilium.models.base.BaseModelThis model adds a title and description fields
-
title¶ CharField – Maximum length is 256 character
-
description¶ TextField
-
description 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(**morekwargs)¶
-
get_next_by_modified(**morekwargs)¶
-
get_previous_by_created(**morekwargs)¶
-
get_previous_by_modified(**morekwargs)¶
-
title A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
django_auxilium.models.base.UserModel(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelThis model adds a foreign key to a user attribute
-
user¶ User – The user associated with the model
-
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¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-