Guest User

Untitled

a guest
Feb 15th, 2016
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. class User(models.Model):
  2.     id = models.AutoField(primary_key=True)
  3.     username = models.CharField(unique=True, max_length=120,blank=False)
  4.     password = models.CharField(max_length=120, blank=True, null=False)
  5.  
  6. class Record(models.Model):
  7.  
  8.     id = models.AutoField(primary_key=True)
  9.     name = models.CharField(max_length=120, unique=True, blank=True)
  10.     followers = models.ManyToManyField(User, through='Follow')
  11.  
  12. class Record(models.Model):
  13.  
  14.     id = models.AutoField(primary_key=True)
  15.     record = models.ForeignKey(Record)
  16.     user = models.ForeignKey(User)
  17.     date_followed = models.DateField(null=True, blank=True)
Add Comment
Please, Sign In to add comment