Add optional help_text to Question objects. Closes #574. (#579)

This commit is contained in:
Tobias Kunze
2017-07-31 10:54:57 +02:00
committed by Raphael Michel
parent 5f607cc034
commit 8ede492cba
5 changed files with 41 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-29 16:16
from __future__ import unicode_literals
import i18nfield.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pretixbase', '0070_auto_20170719_0910'),
]
operations = [
migrations.AddField(
model_name='question',
name='help_text',
field=i18nfield.fields.I18nTextField(blank=True, help_text='If the question needs to be explained or clarified, do it here!', null=True, verbose_name='Help text'),
),
migrations.AlterField(
model_name='invoiceaddress',
name='vat_id',
field=models.CharField(blank=True, help_text='Only for business customers within the EU.', max_length=255, verbose_name='VAT ID'),
),
]

View File

@@ -545,6 +545,11 @@ class Question(LoggedModel):
question = I18nTextField(
verbose_name=_("Question")
)
help_text = I18nTextField(
verbose_name=_("Help text"),
help_text=_("If the question needs to be explained or clarified, do it here!"),
null=True, blank=True,
)
type = models.CharField(
max_length=5,
choices=TYPE_CHOICES,