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 _
12 entry = Entry.objects.get(**qs)
13 except Entry.DoesNotExist:
15 if not entry.published:
17 ITEMS.append(ObjectMenuItem(entry))
19 add_entry(slug_pl='o-nas')
21 ITEMS.append(ModelMenuItem(Entry, reverse_lazy('migdal_entry_list_publications'),
22 field_lookups={'type': 'publications'}, title=_('Publications')))
24 ITEMS.append(MenuItem(reverse_lazy('events'), _('Events'),
25 more_urls=(reverse_lazy('events_past'),)))
27 ITEMS.append(ObjectMenuItem(Category.objects.get(slug_pl='stanowisko'),
28 rev_lookups={Entry: 'categories'}, title=_('Positions')))
29 #CategoryMenuItem(Category.objects.get(slug_pl='stanowisko'),
30 # title=_('Positions')),
32 ITEMS.append(ObjectMenuItem(Entry.objects.get(slug_pl='pierwsza-pomoc'),
33 title=_('First aid in copyright')))