Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class User(BaseModel):
- username = models.CharField(max_length=20)
- password = models.CharField(max_length=20)
- groups = models.ManyToManyField('Group', related_name='groups', db_table='USERS_TO_GROUPS')
- class Group(BaseModel):
- name = models.CharField(max_length=20)
- users = ManyToManyField(User, related_name='users', db_table=u'USERS_TO_GROUPS')
Add Comment
Please, Sign In to add comment