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.ModifiedModel

This model adds date created and last date modified attributes

class Meta[source]

Bases: object

abstract = False
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.Model

This model adds date created attribute

created

DateTimeField – The datetime when the model instance is created

class Meta[source]

Bases: object

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(**morekwargs)
get_previous_by_created(**morekwargs)
class django_auxilium.models.base.ModifiedModel(*args, **kwargs)[source]

Bases: django.db.models.base.Model

This model adds the last date modified attribute

modified

DateTimeField – The datetime when the model was last modified and saved

class Meta[source]

Bases: object

abstract = False
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.BaseModel

This model adds a notes field

notes

TextField – Text field for storing notes

class Meta[source]
abstract = False
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.BaseModel

This model adds a title and description fields

title

CharField – Maximum length is 256 character

description

TextField

class Meta[source]
abstract = False
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.Model

This model adds a foreign key to a user attribute

user

User – The user associated with the model

class Meta[source]

Bases: object

abstract = False
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.parent is a ForwardManyToOneDescriptor instance.

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.