stalker.models.mixins.CodeMixin

Inheritance diagram of stalker.models.mixins.CodeMixin
class stalker.models.mixins.CodeMixin(code=None, **kwargs)[source]

Bases: object

Adds code info to the mixed in class.

New in version 0.2.0: The code attribute of the SimpleEntity is now introduced as a separate mixin. To let it be used by the classes it is really needed.

The CodeMixin just adds a new field called code. It is a very simple attribute and is used for simplifying long names (like Project.name etc.).

Contrary to previous implementations the code attribute is not formatted in anyway, so care needs to be taken if the code attribute is going to be used in filesystem as file and directory names.

Parameters:code (str) – The code attribute is a string, can not be empty or can not be None.
__init__(code=None, **kwargs)[source]

Methods

__init__([code])

Attributes

code