From 2363362202926ba6cd7157088d4a4ba276002425 Mon Sep 17 00:00:00 2001 From: Ilkka Oksanen Date: Thu, 16 Nov 2017 12:50:04 +0200 Subject: [PATCH] Add structure for new ilmotunkki --- ilmotunkki/README.md | 45 +++++++++++++++++++++++++++++++ ilmotunkki/__init__.py | 0 ilmotunkki/admin.py | 3 +++ ilmotunkki/apps.py | 5 ++++ ilmotunkki/migrations/__init__.py | 0 ilmotunkki/models.py | 17 ++++++++++++ ilmotunkki/tests.py | 3 +++ ilmotunkki/views.py | 3 +++ 8 files changed, 76 insertions(+) create mode 100644 ilmotunkki/README.md create mode 100644 ilmotunkki/__init__.py create mode 100644 ilmotunkki/admin.py create mode 100644 ilmotunkki/apps.py create mode 100644 ilmotunkki/migrations/__init__.py create mode 100644 ilmotunkki/models.py create mode 100644 ilmotunkki/tests.py create mode 100644 ilmotunkki/views.py diff --git a/ilmotunkki/README.md b/ilmotunkki/README.md new file mode 100644 index 0000000..1801c67 --- /dev/null +++ b/ilmotunkki/README.md @@ -0,0 +1,45 @@ +# Ilmotunkki + +## Terms +- Signup, Form with collection of questions +- Response, One answer to some signup +- Quota, Amount of people allowed to respond with some option selected. + - In generic case there is no option and quota is just max number of people. + +## Requirements + +- Officials may generate signups forms +- Officials may see results from signups +- Officials may see some stats from their signups + - for example distributions of multiple choice answers +- Officials should be able to edit signups wherever possible + - Propably not possible to edit after first response +- Officials should be able to delete responses +- Officials should be able to embed payment information to the signup? + - TODO: is there need for unique reference numbers for every response? +- Officials should be able to save a signup to a reusable template. + +- Signup may be attached to an event + - multiple signups to a single event? + +- Signup should support custom quotas + - Atleast quotas from multiple choices and checkboxes + - Text quotas are risky (typos everywhere!!) +- Signup should have start and end times +- signup should support atleast following questiontypes + - Text + - multiple choice (select one) + - checkbox (boolean yes/no) + +- Signup should support reserve slots. + TODO: quota based reserves or generic? or both? + +- Responding should send confirm email +- Response should be editable by responder and only by the responder until the closing of the signup + - TODO: is there need to custom edit period or disable? + +- Responders should see amount of quotas left. +- Responders should see some information about other responses + - TODO: names? should this be editable by officials? + - NOTE: Quota related info is exposed if any info is printed + diff --git a/ilmotunkki/__init__.py b/ilmotunkki/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ilmotunkki/admin.py b/ilmotunkki/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/ilmotunkki/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/ilmotunkki/apps.py b/ilmotunkki/apps.py new file mode 100644 index 0000000..c5dcacb --- /dev/null +++ b/ilmotunkki/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class IlmotunkkiConfig(AppConfig): + name = 'ilmotunkki' diff --git a/ilmotunkki/migrations/__init__.py b/ilmotunkki/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ilmotunkki/models.py b/ilmotunkki/models.py new file mode 100644 index 0000000..5084f45 --- /dev/null +++ b/ilmotunkki/models.py @@ -0,0 +1,17 @@ +from django.db import models +from django.utils import timezone + +# Create your models here. + +class + +class Signup(models.Model): + start = models.DateTimeField() + end = models.DateTimeField() + +class Question(models.Model): + +class Answer(models.Model): + signup = models.ForeignKey(Signup, on_delete=models.CASCADE) + question = models.ForeignKey(Question, on_delete=models.PROTECT) + answer = diff --git a/ilmotunkki/tests.py b/ilmotunkki/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/ilmotunkki/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/ilmotunkki/views.py b/ilmotunkki/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/ilmotunkki/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here.