diff options
author | Nikita Karetnikov <nikita.karetnikov@gmail.com> | 2012-08-04 04:58:44 +0400 |
---|---|---|
committer | Nikita Karetnikov <nikita.karetnikov@gmail.com> | 2012-08-04 04:58:44 +0400 |
commit | 2651f29410b212021544893d7e967c52fa6dae65 (patch) | |
tree | 260f371cffc9801c2b6312da16acb6ce7710d803 /objectapp | |
parent | e08547938d44b756fd1af529429f208214c36522 (diff) | |
download | gnowsys-2651f29410b212021544893d7e967c52fa6dae65.tar.gz |
Class identifiers
Diffstat (limited to 'objectapp')
-rw-r--r-- | objectapp/models.py | 24 |
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) |