Commit 9c76c6a2 authored by stef's avatar stef
parents f77565ae ccef0c48
......@@ -22,14 +22,23 @@ def country(code):
status_map=dict(STATUS)
@register.filter(name='status')
def status(code):
return status_map[code]
try:
return status_map[code]
except:
return code
type_map=dict(TYPES)
@register.filter(name='type')
def type(code):
return type_map[code]
try:
return type_map[code]
except:
return code
media_map=dict(MEDIA)
@register.filter(name='media')
def media(code):
return media_map[code]
try:
return media_map[code]
except:
return code
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment