Test coverage report: hero_slider.templatetags.hero_slider_tags

# hero_slider.templatetags.hero_slider_tags: 7 total statements, 100.0% covered

Generated: Tue 2013-05-21 16:43 CEST

Source file: /home/dkaufhold/projects/django-hero-slider/src/hero_slider/templatetags/hero_slider_tags.py

Stats: 5 executed, 0 missed, 2 excluded, 13 ignored

1. `"""Templatetags for the ``hero_slider`` app."""`
2. `from django import template`
3. ``
4. `from hero_slider.models import SliderItem`
5. ``
6. ``
7. `register = template.Library()`
8. ``
9. ``
10. `@register.inclusion_tag('hero_slider/carousel.html', takes_context=True)`
11. `def render_hero_slider(context):`
12. `"""`
13. `Renders the hero slider.`
14. ``
15. `"""`
16. `req = context.get('request')`
17. `qs = SliderItem.objects.published(req).order_by('position')`
18. `return {`
19. `'slider_items': qs,`
20. `}`