Advertisement
Guest User

models.py

a guest
Jun 17th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. from django.db import models
  2.  
  3. class User(models.Model):
  4.     name = models.CharField(max_length=30)
  5.    
  6. class Question(models.Model):
  7.     name = models.CharField(max_length=30)
  8.     guy = models.TextField()
  9.     girl = models.TextField()
  10.     description = models.TextField()
  11.    
  12. class Response(models.Model):
  13.     user = models.ForeignKey('User')
  14.     question = models.ForeignKey('Question')
  15.     response = models.IntField()
  16.    
  17. class Results(models.Model):
  18.     question = models.ForeignKey('Question')
  19.     gy_response = models.IntField()
  20.     gi_response = models.IntField()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement