<li style="background-image: url(/static/carousel/img1.jpg); z-index: 100;">
<a href="{{ jak }}" class="catalogue-carousel-link">
<div class="catalogue-carousel-note">
- <p><strong>74</strong> <em>kompletne lekcje</em> - zobacz jak wykorzystać</p>
+ <p><strong>{{ lessons_count }}</strong> <em>{{ lessons_desc }}</em>
+ - zobacz jak wykorzystać</p>
</div>
</a>
</li>
@register.inclusion_tag("catalogue/snippets/carousel.html")
def catalogue_carousel():
- return {
- }
+ lessons_count = Lesson.objects.filter(type__in=('course', 'synthetic')).count()
+ if 1 < lessons_count % 10 < 5 and lessons_count / 10 % 10 != 1:
+ lessons_desc = u'kompletne lekcje'
+ else:
+ lessons_desc = u'kompletnych lekcji'
+ return locals()
@register.inclusion_tag("catalogue/snippets/section_buttons.html")
def catalogue_section_buttons():