Ticket #9779: tutorial-db-introspection.diff
File tutorial-db-introspection.diff, 1.6 KB (added by , 16 years ago) |
---|
-
.py
old new 17 17 18 18 class AuthGroupPermissions(models.Model): 19 19 id = models.IntegerField(primary_key=True) 20 group _id = models.IntegerField()21 permission _id = models.IntegerField()20 group = models.ForeignKey(AuthGroup) 21 permission = models.ForeignKey(AuthPermission) 22 22 class Meta: 23 23 db_table = u'auth_group_permissions' 24 24 25 25 class AuthMessage(models.Model): 26 26 id = models.IntegerField(primary_key=True) 27 user _id = models.IntegerField()27 user = models.ForeignKey(AuthUser) 28 28 message = models.TextField() 29 29 class Meta: 30 30 db_table = u'auth_message' … … 54 54 55 55 class AuthUserGroups(models.Model): 56 56 id = models.IntegerField(primary_key=True) 57 user _id = models.IntegerField()58 group _id = models.IntegerField()57 user = models.ForeignKey(AuthUser) 58 group = models.ForeignKey(AuthGroup) 59 59 class Meta: 60 60 db_table = u'auth_user_groups' 61 61 62 62 class AuthUserUserPermissions(models.Model): 63 63 id = models.IntegerField(primary_key=True) 64 user _id = models.IntegerField()65 permission _id = models.IntegerField()64 user = models.ForeignKey(AuthUser) 65 permission = models.ForeignKey(AuthPermission) 66 66 class Meta: 67 67 db_table = u'auth_user_user_permissions' 68 68 … … 90 90 91 91 class PollsChoice(models.Model): 92 92 id = models.IntegerField(primary_key=True) 93 poll _id = models.IntegerField()93 poll = models.ForeignKey(PollsPoll) 94 94 choice = models.CharField(max_length=200) 95 95 votes = models.IntegerField() 96 96 class Meta: