data-cycle-pause-on-hover="true"
>
- <div class="cycle-prev"></div>
- <div class="cycle-next"></div>
- <div class="cycle-pager"></div>
+ {% if banners|length > 1 %}
+ <div class="cycle-prev"></div>
+ <div class="cycle-next"></div>
+ <div class="cycle-pager"></div>
+ {% endif %}
{% for banner in banners %}
{% if banner %}
carousel = Carousel.objects.get(slug=slug)
except Carousel.DoesNotExist:
# TODO: add sanity check for install.
- carousel = None
+ carousel = Carousel.objects.create(slug=slug)
banners = [
item.get_banner()
for item in carousel.carouselitem_set.all().select_related('banner')