diff --git a/.gitignore b/.gitignore index fa0aec3..ebb7a09 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ *.pyo *.log .idea -manage.py \ No newline at end of file +manage.py +migrations \ No newline at end of file diff --git a/checkin/models.py b/checkin/models.py index b9bbf23..e746cce 100644 --- a/checkin/models.py +++ b/checkin/models.py @@ -22,7 +22,6 @@ def __unicode__(self): return "%d %d" % (self.id, self.lesson.id) class Meta: - managed = False db_table = 'Checkin' @@ -41,7 +40,6 @@ def __unicode__(self): return "%d %d" % (self.id, self.lesson.id) class Meta: - managed = False db_table = 'CheckinRecord' @@ -57,7 +55,6 @@ class Ask(models.Model): student = models.ManyToManyField('school.Student', through='Asktostudent', through_fields=('ask', 'student')) class Meta: - managed = False db_table = 'Ask' @@ -66,5 +63,4 @@ class Asktostudent(models.Model): ask = models.ForeignKey(Ask, models.DO_NOTHING, db_column='askid', blank=True, null=True) class Meta: - managed = False db_table = 'AsktoStudent' \ No newline at end of file diff --git a/course/models.py b/course/models.py index af81594..0d8bf82 100644 --- a/course/models.py +++ b/course/models.py @@ -78,7 +78,6 @@ def __unicode__(self): return u"%s" % (self.title) class Meta: - managed = False db_table = 'Course' @@ -222,7 +221,6 @@ def __unicode__(self): return "%d %s-%d-%d-%d-%d" % (self.id, self.term, self.year, self.week, self.day, self.time) class Meta: - managed = False db_table = 'Lesson' @@ -232,5 +230,4 @@ class Studentcourse(models.Model): related_name='courses') class Meta: - managed = False db_table = 'StudentCourse' diff --git a/rbac/models.py b/rbac/models.py index 6519efd..61c2a76 100644 --- a/rbac/models.py +++ b/rbac/models.py @@ -10,7 +10,6 @@ class Resourcejurisdiction(models.Model): related_name="children") class Meta: - managed = False db_table = 'ResourceJurisdiction' @@ -20,5 +19,4 @@ class Roletoresourcejurisdiction(models.Model): db_column='resourcejurisdictionid', blank=True, null=True) class Meta: - managed = False db_table = 'RoletoResourceJurisdiction' diff --git a/school/models.py b/school/models.py index 7622af4..35cedaa 100644 --- a/school/models.py +++ b/school/models.py @@ -16,7 +16,6 @@ def teachernumber(self): return self.teacher_set.count() class Meta: - managed = False db_table = 'Administration' @@ -30,7 +29,6 @@ def __unicode__(self): return u"%s" % (self.name) class Meta: - managed = False db_table = 'Class' @@ -40,7 +38,6 @@ class Classtime(models.Model): endtime = models.TimeField(blank=True, null=True) class Meta: - managed = False db_table = 'ClassTime' @@ -52,7 +49,6 @@ def __unicode__(self): return u"%s" % (self.location) class Meta: - managed = False db_table = 'Classroom' @@ -72,7 +68,6 @@ def __unicode__(self): return u"%s" % (self.name) class Meta: - managed = False db_table = 'Department' @@ -92,7 +87,6 @@ def classamount(self): return self.class_set.count() class Meta: - managed = False db_table = 'Major' @@ -107,7 +101,6 @@ def __unicode__(self): return u"%s" % (self.description) class Meta: - managed = False db_table = 'SchoolTerm' @@ -120,7 +113,6 @@ def __unicode__(self): return "%d" % (self.seattype) class Meta: - managed = False db_table = 'Seat' @@ -141,7 +133,6 @@ def __unicode__(self): return u"%s" % (self.name) class Meta: - managed = False db_table = 'Student' @@ -160,7 +151,6 @@ def __unicode__(self): return u"%s" % (self.name) class Meta: - managed = False db_table = 'Teacher' @@ -170,7 +160,6 @@ class Teachertoadministration(models.Model): null=True) class Meta: - managed = False db_table = 'TeachertoAdministration' @@ -179,7 +168,6 @@ class Teachertodepartment(models.Model): department = models.ForeignKey(Department, models.DO_NOTHING, db_column='departmentid', blank=True, null=True) class Meta: - managed = False db_table = 'TeachertoDepartment' diff --git a/user/models.py b/user/models.py index cb83396..4e2e643 100644 --- a/user/models.py +++ b/user/models.py @@ -16,7 +16,6 @@ def __unicode__(self): return u"%s" % (self.name) class Meta: - managed = False db_table = 'Role' @@ -25,7 +24,7 @@ class User(models.Model): openid = models.CharField(max_length=28, blank=True, null=True) password = models.CharField(max_length=32, blank=True, null=True) sex = models.IntegerField(blank=True, null=True) - ip = models.TextField(blank=True, null=True) # This field type is a guess. + ip = models.GenericIPAddressField(protocol='IPv4', blank=True, null=True) registertime = models.DateTimeField(blank=True, null=True) lastlogintime = models.DateTimeField(blank=True, null=True) email = models.CharField(max_length=40, blank=True, null=True) @@ -48,7 +47,6 @@ def __unicode__(self): return u"%s" % (self.username) class Meta: - managed = False db_table = 'User' @@ -57,5 +55,4 @@ class Usertorole(models.Model): role = models.ForeignKey(Role, models.DO_NOTHING, db_column='roleid', blank=True, null=True) class Meta: - managed = False db_table = 'UsertoRole' diff --git a/wechat/models.py b/wechat/models.py index 4c3a38b..98e7ca5 100644 --- a/wechat/models.py +++ b/wechat/models.py @@ -8,7 +8,6 @@ class Wechatkeyword(models.Model): data = models.CharField(max_length=255, blank=True, null=True) class Meta: - managed = False db_table = 'WechatKeyword' @@ -28,5 +27,4 @@ class Wechatuser(models.Model): accuracy = models.FloatField(blank=True, null=True) class Meta: - managed = False db_table = 'WechatUser' \ No newline at end of file