From 02f2cd4025ae1368a56016cb1756e1275645ad41 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 15 Feb 2012 20:11:07 +0100 Subject: added image_enabled flag to show diff --git a/program/models.py b/program/models.py index 2818c5a..0b78347 100644 --- a/program/models.py +++ b/program/models.py @@ -88,6 +88,7 @@ class Show(models.Model): name = models.CharField(_("Name"), max_length=255) slug = models.CharField(_("Slug"), max_length=255, unique=True) image = models.ImageField(_("Image"), blank=True, null=True, upload_to='show_images') + image_enabled = models.BooleanField(_("show Image"), default=True ) short_description = models.CharField(_("Short description"), max_length=64) description = tinymce_models.HTMLField(_("Description")) email = models.EmailField(_("E-Mail"), blank=True, null=True) diff --git a/templates/program/show_detail.html b/templates/program/show_detail.html index 661a2b5..b5c5f91 100644 --- a/templates/program/show_detail.html +++ b/templates/program/show_detail.html @@ -39,7 +39,7 @@
{{ show.description|safe }}
- {% if show.image %} + {% if show.image and show.image_enabled %}
image
{% endif %} -- cgit v0.10.2