misc: replace assignment tags by simple tags
This commit is contained in:
parent
c77f8286cb
commit
6aaf492877
|
@ -249,7 +249,7 @@ def parse_valid_through(spec):
|
|||
return valid_through
|
||||
|
||||
|
||||
@register.assignment_tag
|
||||
@register.simple_tag
|
||||
def get_mairie_opening_hours(mairie_data):
|
||||
"""Process Mairie Geojson to extract data of each day's opening hours
|
||||
"""
|
||||
|
@ -414,7 +414,7 @@ def is_place_page(page):
|
|||
return page.template_name == 'place'
|
||||
|
||||
|
||||
@register.assignment_tag
|
||||
@register.simple_tag
|
||||
def get_tile_picture_size(page):
|
||||
if is_place_page(page):
|
||||
return '1300'
|
||||
|
@ -530,7 +530,7 @@ def as_commune(user_data):
|
|||
return None
|
||||
|
||||
|
||||
@register.assignment_tag
|
||||
@register.simple_tag
|
||||
def get_suggestions(request, user_data, places_data):
|
||||
# fill initial dashboard based on this layout:
|
||||
## au quotidien
|
||||
|
@ -668,13 +668,13 @@ def get_suggestions(request, user_data, places_data):
|
|||
|
||||
return tiles
|
||||
|
||||
@register.assignment_tag
|
||||
@register.simple_tag
|
||||
def get_gnm_portal_url():
|
||||
if '_interco_portal' in settings.KNOWN_SERVICES['combo']:
|
||||
return settings.KNOWN_SERVICES['combo']['_interco_portal'].get('url')
|
||||
return settings.KNOWN_SERVICES['combo']['portal'].get('url')
|
||||
|
||||
@register.assignment_tag
|
||||
@register.simple_tag
|
||||
def get_gnm_collectivities():
|
||||
collectivities = []
|
||||
for key in settings.KNOWN_SERVICES['combo']:
|
||||
|
@ -726,7 +726,7 @@ def json_script(value, element_id):
|
|||
element_id, mark_safe(json_str)
|
||||
)
|
||||
|
||||
@register.assignment_tag
|
||||
@register.simple_tag
|
||||
def get_goto_cell(page, request):
|
||||
try:
|
||||
cell = ConfigJsonCell.objects.get(id=request.GET['to'])
|
||||
|
@ -741,7 +741,7 @@ def get_goto_cell(page, request):
|
|||
cell.save()
|
||||
return cell
|
||||
|
||||
@register.assignment_tag
|
||||
@register.simple_tag
|
||||
def get_collectivity_slugs():
|
||||
return list(settings.COLLECTIVITY_LABELS.keys())
|
||||
|
||||
|
|
Loading…
Reference in New Issue