start wally
This commit is contained in:
@@ -35,6 +35,7 @@ INSTALLED_APPS = [
|
||||
'physics',
|
||||
'rapids',
|
||||
'longs',
|
||||
'wally',
|
||||
"reversion",
|
||||
"django_tables2",
|
||||
"django_filters",
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from .models import Question, Response, Candidate, Specialty
|
||||
# Register your models here.
|
||||
|
||||
admin.site.register(Question)
|
||||
admin.site.register(Response)
|
||||
admin.site.register(Candidate)
|
||||
admin.site.register(Specialty)
|
||||
@@ -0,0 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class WallyConfig(AppConfig):
|
||||
name = 'wally'
|
||||
@@ -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()
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
Reference in New Issue
Block a user