Commit 6bd4e15a authored by fred's avatar fred
Browse files

misc: add template tag to get all tags

parent 20554216
......@@ -15,6 +15,8 @@ from django.utils.six.moves.urllib import parse as urlparse
from datetime import datetime, timedelta
from taggit.models import Tag
from emissions.models import Emission, Episode, NewsItem, SoundFile, Focus
from emissions.utils import period_program
......@@ -367,6 +369,11 @@ def random_emissions(count=6):
return Emission.objects.filter(archived=False).order_by('?')[:count]
def get_tags():
return Tag.objects.all()
@register.inclusion_tag('includes/topik.html', takes_context=True)
def topik(context, topik):
return {'page': topik}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment