feat: allow free form text answers

see #52
This commit is contained in:
James Graham
2021-01-22 17:15:18 +00:00
parent 6dc4bd770f
commit 94b2ee9d70
4 changed files with 59 additions and 2 deletions

View File

@@ -1,2 +1,3 @@
from .person import *
from .question import *
from .relationship import *

View File

@@ -4,6 +4,11 @@ import typing
from django.db import models
from django.utils.text import slugify
__all__ = [
'Question',
'QuestionChoice',
]
class Question(models.Model):
"""Questions from which a survey form can be created."""
@@ -27,6 +32,11 @@ class Question(models.Model):
blank=False,
null=False)
#: Should people be able to add their own answers?
allow_free_text = models.BooleanField(default=False,
blank=False,
null=False)
#: Position of this question in the list
order = models.SmallIntegerField(default=0, blank=False, null=False)