start wally

This commit is contained in:
Ross
2021-03-30 22:51:34 +01:00
parent a9df8445b2
commit 845ab6c377
8 changed files with 44 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
from django.db import models
def image_directory_path(instance, filename):
return u"wally/picture/{0}".format(filename)
class Specialty(models.Model):
specialty = models.CharField()
# Create your models here.
class Candidate(models.Model):
age = models.PositiveIntegerField()
specialty = models.ForeignKey(Specialty)
class Response(models.Model):
question = models.ForeignKey("Question")
time_to_find = models.FloatField()
hit_point_x = models.FloatField()
hit_point_y = models.FloatField()
class Question(models.Model):
image = models.ImageField(upload_to=image_directory_path)
hit_box = models.TextField()