template tags: add list of collectivity slugs (#26692)
This commit is contained in:
parent
c563711810
commit
49e1497698
|
@ -396,6 +396,9 @@ PRODUCER_LABELS = {
|
|||
'tcl': u'TCL',
|
||||
'toodego': u'Toodego',
|
||||
'velov': u"Velo'v",
|
||||
}
|
||||
|
||||
COLLECTIVITY_LABELS = {
|
||||
"albigny-sur-saone": u"Albigny-sur-Saône",
|
||||
"bron": u"Bron",
|
||||
"cailloux-sur-fontaines": u"Cailloux-sur-Fontaines",
|
||||
|
@ -457,6 +460,8 @@ PRODUCER_LABELS = {
|
|||
"villeurbanne": u"Villeurbanne",
|
||||
}
|
||||
|
||||
PRODUCER_LABELS.update(COLLECTIVITY_LABELS)
|
||||
|
||||
@register.filter
|
||||
def as_producer(slug):
|
||||
if isinstance(slug, dict):
|
||||
|
@ -707,3 +712,7 @@ def get_goto_cell(page, request):
|
|||
cell.page = page
|
||||
cell.save()
|
||||
return cell
|
||||
|
||||
@register.assignment_tag
|
||||
def get_collectivity_slugs():
|
||||
return COLLECTIVITY_LABELS.keys()
|
||||
|
|
Loading…
Reference in New Issue