Rearrange source to src dir.
[redakcja.git] / src / toolbar / templatetags / toolbar_tags.py
1 # -*- coding: utf-8 -*-
2 #
3 # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
4 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 #
6 from django import template
7 from toolbar import models
8
9 register = template.Library()
10
11
12 @register.inclusion_tag('toolbar/toolbar.html')
13 def toolbar():
14     return {'toolbar_groups': models.ButtonGroup.objects.all().select_related()}
15
16
17 @register.inclusion_tag('toolbar/button.html')
18 def toolbar_button(b):
19     return {'button': b}