From c6e04295846da4d1ac9b5a6457762f20f856a579 Mon Sep 17 00:00:00 2001 From: guanghongwei Date: Sat, 10 Jan 2015 13:35:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=84=E7=AE=A1=E7=90=86mo?= =?UTF-8?q?del?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jasset/models.py | 6 +++--- juser/models.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jasset/models.py b/jasset/models.py index 2a5aab178..99f435f96 100644 --- a/jasset/models.py +++ b/jasset/models.py @@ -1,6 +1,6 @@ import datetime from django.db import models -from juser.models import Group as UserGroup +from juser.models import UserGroup class IDC(models.Model): @@ -11,7 +11,7 @@ class IDC(models.Model): return self.name -class Group(models.Model): +class BisGroup(models.Model): name = models.CharField(max_length=80, unique=True) comment = models.CharField(max_length=160, blank=True, null=True) @@ -30,7 +30,7 @@ class Asset(models.Model): port = models.SmallIntegerField(max_length=5) idc = models.ForeignKey(IDC) user_group = models.ManyToManyField(UserGroup) - bis_group = models.ManyToManyField(Group) + bis_group = models.ManyToManyField(BisGroup) login_type = models.CharField(max_length=1, choices=LOGIN_TYPE_CHOICES, default='L') username_common = models.CharField(max_length=20, blank=True, null=True) password_common = models.CharField(max_length=80, blank=True, null=True) diff --git a/juser/models.py b/juser/models.py index 3e2c9a529..25bc2c055 100644 --- a/juser/models.py +++ b/juser/models.py @@ -1,7 +1,7 @@ from django.db import models -class Group(models.Model): +class UserGroup(models.Model): name = models.CharField(max_length=80, unique=True) comment = models.CharField(max_length=160, blank=True, null=True) @@ -20,7 +20,7 @@ class User(models.Model): name = models.CharField(max_length=80) email = models.EmailField(max_length=75, null=True, blank=True) role = models.CharField(max_length=2, choices=USER_ROLE_CHOICES, default='CU') - group = models.ManyToManyField(Group) + user_group = models.ManyToManyField(UserGroup) ldap_pwd = models.CharField(max_length=100) ssh_key_pwd1 = models.CharField(max_length=100) ssh_key_pwd2 = models.CharField(max_length=100)