Django 1.6.
[prawokultury.git] / prawokultury / menu_items.py
1 # -*- coding: utf-8
2 from migdal.models import Category, Entry
3 from menu.helpers import ObjectMenuItem, MenuItem, ModelMenuItem
4 from django.core.urlresolvers import reverse_lazy
5 from django.utils.translation import ugettext_lazy as _
6
7
8 ITEMS = []
9
10 ITEMS.append(ObjectMenuItem(
11     obj_get=lambda:Entry.published_objects.get(slug_pl='o-nas')
12 ))
13
14 ITEMS.append(ModelMenuItem(Entry, reverse_lazy('migdal_entry_list_publications'),
15         field_lookups={'type': 'publications'}, title=_('Publications')))
16
17 ITEMS.append(MenuItem(reverse_lazy('events'), _('Events')))
18
19 ITEMS.append(ObjectMenuItem(
20     obj_get=lambda:Category.objects.get(slug_pl='stanowisko'),
21     rev_lookups={Entry: 'categories'},
22     title=_('Positions')
23 ))
24
25 ITEMS.append(MenuItem(reverse_lazy('questions'), _('First aid')))
26
27 ITEMS.append(ObjectMenuItem(
28     obj_get=lambda:Entry.published_objects.get(slug_pl='pierwsza-pomoc'),
29     title=_('Guide')
30 ))