block tags, bleh (migdal compatibility)
[prawokultury.git] / prawokultury / menu_items.py
1 from migdal.models import Entry
2 from menu.helpers import ObjectMenuItem, MenuItem
3 from django.core.urlresolvers import reverse_lazy
4 from django.utils.translation import ugettext_lazy as _
5
6
7 ITEMS = []
8
9 def add_entry(**qs):
10     try:
11         entry = Entry.objects.get(**qs)
12     except Entry.DoesNotExist:
13         return
14     if not entry.published:
15         return
16     ITEMS.append(ObjectMenuItem(entry))
17
18 add_entry(slug_pl='co')
19 add_entry(slug_pl='gdzie')
20 add_entry(pk=25)
21 #add_entry(slug_pl='program')
22 #add_entry(slug_pl='faq')
23 add_entry(slug_pl='wyszehrad')
24 #add_entry(slug_pl='wez-udzial')
25 add_entry(slug_pl='materialy')
26 #add_entry(pk=25)
27 #add_entry(slug_pl='warsztaty')
28 add_entry(slug_pl='poprzednie')
29 add_entry(slug_pl='kontakt')
30 add_entry(slug_pl='faq')
31
32