Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. from django.db import models
  2. from django.contrib.auth.models import User
  3.  
  4.  
  5. # Create your models here.
  6.  
  7.  
  8. class MatchQuestions(models.Model):
  9. question = models.CharField(max_length=350)
  10. weight = models.SmallIntegerField()
  11. order = models.SmallIntegerField()
  12. howImportant = models.CharField(max_length=350)
  13.  
  14.  
  15. class Choice(models.Model):
  16. question = models.ForeignKey(MatchQuestions)
  17. choice = models.CharField(max_length=350)
  18.  
  19.  
  20. class Answer(models.Model):
  21. user = models.ForeignKey(User)
  22. question = models.ForeignKey(MatchQuestions)
  23. choice = models.ForeignKey(Choice)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement