summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauréline Guérin <zebuline@entrouvert.com>2019-10-14 12:27:34 (GMT)
committerLauréline Guérin <zebuline@entrouvert.com>2019-10-29 07:36:17 (GMT)
commit7087aa3849c7186ebd4fe020c230f802bda8698e (patch)
tree1047ba0a4aff3b3f87837569a3da5ecf888e5e7b
parent3244864c36f98a3b15bd3773ce50104cf5090771 (diff)
downloadcombo-7087aa3849c7186ebd4fe020c230f802bda8698e.zip
combo-7087aa3849c7186ebd4fe020c230f802bda8698e.tar.gz
combo-7087aa3849c7186ebd4fe020c230f802bda8698e.tar.bz2
dj2: assignment_tag is deprecated (#36895)wip/36895-remove-dj20warnings
remove RemovedInDjango20Warning: assignment_tag() is deprecated. Use simple_tag() instead
-rw-r--r--combo/apps/assets/templatetags/assets.py2
-rw-r--r--combo/apps/calendar/templatetags/calendar.py2
-rw-r--r--combo/public/templatetags/combo.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/combo/apps/assets/templatetags/assets.py b/combo/apps/assets/templatetags/assets.py
index 62283fa..5d7d569 100644
--- a/combo/apps/assets/templatetags/assets.py
+++ b/combo/apps/assets/templatetags/assets.py
@@ -71,7 +71,7 @@ def asset_css_url(*args, **kwargs):
return 'none'
-@register.assignment_tag
+@register.simple_tag
def get_asset(key):
try:
return Asset.objects.get(key=key)
diff --git a/combo/apps/calendar/templatetags/calendar.py b/combo/apps/calendar/templatetags/calendar.py
index 7d5d6b1..d7acca6 100644
--- a/combo/apps/calendar/templatetags/calendar.py
+++ b/combo/apps/calendar/templatetags/calendar.py
@@ -21,7 +21,7 @@ from django import template
register = template.Library()
-@register.assignment_tag
+@register.simple_tag
def get_day_slot(cal, *args, **kwargs):
day = kwargs.get('day')
slot = kwargs.get('slot')
diff --git a/combo/public/templatetags/combo.py b/combo/public/templatetags/combo.py
index fa09d66..9688eea 100644
--- a/combo/public/templatetags/combo.py
+++ b/combo/public/templatetags/combo.py
@@ -261,6 +261,6 @@ def name_id(user):
# is tried with a missing user argument.
raise VariableDoesNotExist('name_id')
-@register.assignment_tag
+@register.simple_tag
def get_page(page_slug):
return Page.objects.get(slug=page_slug)