From 812cc0b9c8348b4b3e072e0ad5b729008ff91eb5 Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Wed, 6 Apr 2016 16:45:54 +1000 Subject: [PATCH] =?UTF-8?q?Resolves=20#6=20=E2=80=94=20Help=20text=20for?= =?UTF-8?q?=20items=20without=20a=20description=20is=20much=20much=20nicer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- registrasion/forms.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/registrasion/forms.py b/registrasion/forms.py index f1527aa5..7a1e1f12 100644 --- a/registrasion/forms.py +++ b/registrasion/forms.py @@ -47,7 +47,10 @@ class _QuantityBoxProductsForm(_ProductsForm): @classmethod def set_fields(cls, category, products): for product in products: - help_text = "$%d -- %s" % (product.price, product.description) + if product.description: + help_text = "$%d each -- %s" % (product.price, product.description) + else: + help_text = "$%d each" % product.price field = forms.IntegerField( label=product.name,