-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(form): add question for static content (#396)
* feat(form): add question for static content This adds a question type that can be used for inserting static content like subheadings, additional text, images, videos, links etc. inside forms (it will be rendered as markdown in the frontend). Since it is not an actual question, no corresponding answer type is required. * Fix merge conflict in migrations
- Loading branch information
Showing
10 changed files
with
216 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.20 on 2019-04-29 09:10 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
import localized_fields.fields.text_field | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [("form", "0013_auto_20190418_0733")] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="question", | ||
name="static_content", | ||
field=localized_fields.fields.text_field.LocalizedTextField( | ||
blank=True, null=True, required=[] | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="question", | ||
name="type", | ||
field=models.CharField( | ||
choices=[ | ||
("multiple_choice", "multiple_choice"), | ||
("integer", "integer"), | ||
("float", "float"), | ||
("date", "date"), | ||
("choice", "choice"), | ||
("textarea", "textarea"), | ||
("text", "text"), | ||
("table", "table"), | ||
("form", "form"), | ||
("file", "file"), | ||
("dynamic_choice", "dynamic_choice"), | ||
("dynamic_multiple_choice", "dynamic_multiple_choice"), | ||
("static", "static"), | ||
], | ||
max_length=23, | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.