start wally
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user