Add extra tages
This commit is contained in:
parent
646845e44d
commit
38b56deeec
1 changed files with 13 additions and 0 deletions
13
main/templatetags/extra_tags.py
Normal file
13
main/templatetags/extra_tags.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
from django import template
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@register.filter
|
||||
def to_range(start, end):
|
||||
return range(start, end + 1)
|
||||
|
||||
|
||||
@register.filter
|
||||
def dict_get(dictionary, key):
|
||||
return dictionary.get(key, '')
|
Loading…
Add table
Add a link
Reference in a new issue