From eb1c166c4ebbaf21303d67792e6782615446a502 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 5 Oct 2015 23:41:37 +0200 Subject: [PATCH] Removed long_description field --- .../migrations/0020_auto_20151005_2119.py | 30 +++++++++++++++++++ src/pretix/base/models.py | 8 ++--- .../templates/pretixcontrol/item/index.html | 3 +- .../templates/pretixpresale/event/index.html | 2 +- 4 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 src/pretix/base/migrations/0020_auto_20151005_2119.py diff --git a/src/pretix/base/migrations/0020_auto_20151005_2119.py b/src/pretix/base/migrations/0020_auto_20151005_2119.py new file mode 100644 index 000000000..86d03417d --- /dev/null +++ b/src/pretix/base/migrations/0020_auto_20151005_2119.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + +import pretix.base.i18n + + +class Migration(migrations.Migration): + dependencies = [ + ('pretixbase', '0019_auto_20151004_1233'), + ] + + operations = [ + migrations.RemoveField( + model_name='item', + name='long_description', + ), + migrations.RenameField( + model_name='item', + old_name='short_description', + new_name='description' + ), + migrations.AlterField( + model_name='item', + name='description', + field=pretix.base.i18n.I18nTextField(null=True, verbose_name='Description', blank=True, + help_text='This is shown below the product name in lists.'), + ), + ] diff --git a/src/pretix/base/models.py b/src/pretix/base/models.py index a606f9404..ca43350f5 100644 --- a/src/pretix/base/models.py +++ b/src/pretix/base/models.py @@ -773,15 +773,11 @@ class Item(Versionable): default=True, verbose_name=_("Active"), ) - short_description = I18nTextField( - verbose_name=_("Short description"), + description = I18nTextField( + verbose_name=_("Description"), help_text=_("This is shown below the product name in lists."), null=True, blank=True, ) - long_description = I18nTextField( - verbose_name=_("Long description"), - null=True, blank=True, - ) default_price = models.DecimalField( verbose_name=_("Default price"), max_digits=7, decimal_places=2, null=True diff --git a/src/pretix/control/templates/pretixcontrol/item/index.html b/src/pretix/control/templates/pretixcontrol/item/index.html index b043f8a35..b2ce0be7e 100644 --- a/src/pretix/control/templates/pretixcontrol/item/index.html +++ b/src/pretix/control/templates/pretixcontrol/item/index.html @@ -10,8 +10,7 @@ {% bootstrap_field form.active layout="horizontal" %} {% bootstrap_field form.category layout="horizontal" %} {% bootstrap_field form.admission layout="horizontal" %} - {% bootstrap_field form.short_description layout="horizontal" %} - {% bootstrap_field form.long_description layout="horizontal" %} + {% bootstrap_field form.description layout="horizontal" %} {% bootstrap_field form.picture layout="horizontal" %}
diff --git a/src/pretix/presale/templates/pretixpresale/event/index.html b/src/pretix/presale/templates/pretixpresale/event/index.html index e207a4111..6cc5c6604 100644 --- a/src/pretix/presale/templates/pretixpresale/event/index.html +++ b/src/pretix/presale/templates/pretixpresale/event/index.html @@ -72,7 +72,7 @@ {{ item.name }} - {% if item.short_description %}

{{ item.short_description }}

{% endif %} + {% if item.description %}

{{ item.description }}

{% endif %}
{% if item.min_price != item.max_price %}