0001-misc-add-assignment-tag-to-get-a-specific-page-28626.patch
combo/public/templatetags/combo.py | ||
---|---|---|
29 | 29 |
from django.template.defaultfilters import stringfilter |
30 | 30 |
from django.utils import dateparse |
31 | 31 | |
32 |
from combo.data.models import Placeholder |
|
32 |
from combo.data.models import Page, Placeholder
|
|
33 | 33 |
from combo.public.menu import get_menu_context |
34 | 34 |
from combo.utils import NothingInCacheException, flatten_context |
35 | 35 |
from combo.apps.dashboard.models import DashboardCell, Tile |
... | ... | |
251 | 251 |
# it is important to raise this so get_templated_url is aborted and no call |
252 | 252 |
# is tried with a missing user argument. |
253 | 253 |
raise VariableDoesNotExist('name_id') |
254 | ||
255 |
@register.assignment_tag |
|
256 |
def get_page(page_slug): |
|
257 |
return Page.objects.get(slug=page_slug) |
|
254 |
- |