summaryrefslogtreecommitdiff
path: root/objectapp
diff options
context:
space:
mode:
authorNikita Karetnikov <nikita.karetnikov@gmail.com>2012-08-04 04:58:44 +0400
committerNikita Karetnikov <nikita.karetnikov@gmail.com>2012-08-04 04:58:44 +0400
commit2651f29410b212021544893d7e967c52fa6dae65 (patch)
tree260f371cffc9801c2b6312da16acb6ce7710d803 /objectapp
parente08547938d44b756fd1af529429f208214c36522 (diff)
downloadgnowsys-2651f29410b212021544893d7e967c52fa6dae65.tar.gz
Class identifiers
Diffstat (limited to 'objectapp')
-rw-r--r--objectapp/models.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/objectapp/models.py b/objectapp/models.py
index 77643a2b..d402c162 100644
--- a/objectapp/models.py
+++ b/objectapp/models.py
@@ -128,6 +128,12 @@ attr_counter = -1
class Author(User):
"""Proxy Model around User"""
+ def __init__(self):
+ self.identifier = models.CharField(("identifier"),
+ default="Author",
+ help_text=("class' id"),
+ max_length=255)
+
objects = models.Manager()
published = AuthorPublishedManager()
@@ -155,6 +161,11 @@ class Gbobject(Node):
base. System and Process classes also inherit this class.
"""
+ def __init__(self):
+ self.identifier = models.CharField(("identifier"),
+ default="Gbobject",
+ help_text=("class' id"),
+ max_length=255)
STATUS_CHOICES = ((DRAFT, _('draft')),
(HIDDEN, _('hidden')),
@@ -879,6 +890,13 @@ class Process(Gbobject):
"""
A store processes, events or changes described as changes in attributes and relations
"""
+
+ def __init__(self):
+ self.identifier = models.CharField(("identifier"),
+ default="Process",
+ help_text=("class' id"),
+ max_length=255)
+
processtypes = models.ManyToManyField(Processtype, verbose_name=_('member of process type'),
related_name='member_processes',
blank=True, null=True)
@@ -931,6 +949,12 @@ class System(Gbobject):
instance of a Systemtype
"""
+ def __init__(self):
+ self.identifier = models.CharField(("identifier"),
+ default="System",
+ help_text=("class' id"),
+ max_length=255)
+
systemtypes = models.ManyToManyField(Systemtype, verbose_name=_('member of systemtype'),
related_name='member_systems',
blank=True, null=True)