Commit 538b8c8a authored by guanghongwei's avatar guanghongwei

修改model表结构

parent 78d72551
......@@ -6,6 +6,7 @@ class Assets(models.Model):
id = models.AutoField(primary_key=True)
ip = models.CharField(max_length=20)
port = models.IntegerField(max_length=5)
idc = models.CharField(max_length=50)
comment = models.CharField(max_length=100, blank=True, null=True)
def __unicode__(self):
......
......@@ -5,7 +5,18 @@ class User(models.Model):
username = models.CharField(max_length=50)
password = models.CharField(max_length=100)
name = models.CharField(max_length=50)
email = models.EmailField(max_length=50)
group = models.ManyToManyField(Group)
is_admin = models.BooleanField()
is_superuser = models.BooleanField()
ldap_password = models.CharField(max_length=100, null=False)
email = models.EmailField(max_length=50, null=True, blank=True)
def __unicode__(self):
return self.username
\ No newline at end of file
return self.username
class Group(models.Model):
name = models.CharField(max_length=50)
def __unicode__(self):
return self.name
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment