Close to working version
This commit is contained in:
1 parent
e94bef33f2
commit
28482b680b
10 files changed
+158
-15
No files matched your search
+17
-1
@@ -1,3 +1,19 @@
|
||||
from django.contrib.auth.models import Group
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
||||
class OrgUnit(models.Model):
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
||||
name = models.CharField(max_length=500)
|
||||
prefix = models.CharField(max_length=256, blank=True, null=True)
|
||||
is_active = models.BooleanField(default=True)
|
||||
admin_groups = models.ManyToManyField(Group, null=True, blank=True, related_name='admin_orgunits')
|
||||
member_groups = models.ManyToManyField(Group, null=True, blank=True, related_name='member_orgunits')
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
update = models.DateTimeField(auto_now=True)
|
||||
inside_id = models.IntegerField(null=True, blank=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ['name']
|
||||
Reference in new issue
Block a user