stalker.models.mixins.ProjectMixin¶
-
class
stalker.models.mixins.
ProjectMixin
(project=None, **kwargs)[source]¶ Bases:
object
Allows connecting a
Project
to the mixed in object.This also forces a
all, delete-orphan
cascade, so when a :class:.Project
instance is deleted then all the class instances that are inherited fromProjectMixin
will also be deleted. Meaning that, a class which also derives fromProjectMixin
will not be able to exists without a project (delete-orphan
case).Parameters: project ( Project
) – AProject
instance holding the project which this object is related to. It can not be None, or anything other than aProject
instance.Methods
__init__
([project])Attributes
ProjectMixin.project
project_id