From 17523d3483f430e91d5c846e2318b049e2950f3e Mon Sep 17 00:00:00 2001 From: marscj Date: Sun, 28 Jan 2018 15:30:34 +0400 Subject: [PATCH 1/6] Update admin.py --- suit/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suit/admin.py b/suit/admin.py index ebf056ed..70a2ce30 100644 --- a/suit/admin.py +++ b/suit/admin.py @@ -1,6 +1,6 @@ from django.contrib import admin from django.db import models -from django.core.urlresolvers import reverse_lazy +from django.urls import reverse_lazy """ Adapted by using following examples: From ec364f9dfbe042149b2878d65a6193340cc6b634 Mon Sep 17 00:00:00 2001 From: marscj Date: Sun, 28 Jan 2018 15:32:13 +0400 Subject: [PATCH 2/6] Update suit_forms.py --- suit/templatetags/suit_forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suit/templatetags/suit_forms.py b/suit/templatetags/suit_forms.py index 1befd81a..2583ebac 100644 --- a/suit/templatetags/suit_forms.py +++ b/suit/templatetags/suit_forms.py @@ -102,7 +102,7 @@ def suit_form_field_widget_class(field): return '' -@register.assignment_tag(takes_context=True) +@register.simple_tag(takes_context=True) def suit_form_conf(context, param_name, inline_admin_formset=None): """ Get form config param From f813533724bb7a6c7430dbe296c5f051c489c56e Mon Sep 17 00:00:00 2001 From: marscj Date: Sun, 28 Jan 2018 15:33:35 +0400 Subject: [PATCH 3/6] Update suit_menu.py --- suit/templatetags/suit_menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suit/templatetags/suit_menu.py b/suit/templatetags/suit_menu.py index 3cb14250..22789f1e 100644 --- a/suit/templatetags/suit_menu.py +++ b/suit/templatetags/suit_menu.py @@ -2,7 +2,7 @@ from django import template from django.contrib.admin import AdminSite from django.http import HttpRequest -from django.core.urlresolvers import reverse, resolve +from django.urls import reverse, resolve from suit.menu import MenuManager register = template.Library() From 9bf1295156fe3f324133ee278d4002842a95dccc Mon Sep 17 00:00:00 2001 From: marscj Date: Sun, 28 Jan 2018 15:34:11 +0400 Subject: [PATCH 4/6] Update suit_menu.py --- suit/templatetags/suit_menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suit/templatetags/suit_menu.py b/suit/templatetags/suit_menu.py index 22789f1e..caa9954c 100644 --- a/suit/templatetags/suit_menu.py +++ b/suit/templatetags/suit_menu.py @@ -8,7 +8,7 @@ register = template.Library() -@register.assignment_tag(takes_context=True) +@register.simple_tag(takes_context=True) def get_menu(context, request): """ :type request: WSGIRequest From 47442839b703bd428b1b4b96dd97e77348de9438 Mon Sep 17 00:00:00 2001 From: marscj Date: Sun, 28 Jan 2018 15:34:56 +0400 Subject: [PATCH 5/6] Update suit_tags.py --- suit/templatetags/suit_tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suit/templatetags/suit_tags.py b/suit/templatetags/suit_tags.py index 884fdd37..0084d1fe 100644 --- a/suit/templatetags/suit_tags.py +++ b/suit/templatetags/suit_tags.py @@ -24,7 +24,7 @@ def suit_body_class(value, request): return ' '.join(css_classes) -@register.assignment_tag +@register.simple_tag def suit_conf_value(name, model_admin=None): if model_admin: value_by_ma = getattr(model_admin, 'suit_%s' % name.lower(), None) From 919139aed7b89213a2e99a5cc1f4ba4385e4c474 Mon Sep 17 00:00:00 2001 From: marscj Date: Sun, 28 Jan 2018 15:40:24 +0400 Subject: [PATCH 6/6] Update menu.py --- suit/menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suit/menu.py b/suit/menu.py index 2c9d7e3c..23d6f620 100644 --- a/suit/menu.py +++ b/suit/menu.py @@ -220,7 +220,7 @@ def handle_user_url(self, menu_item): return menu_item if '/' in menu_item.url: return menu_item - from django.core.urlresolvers import reverse, NoReverseMatch + from django.urls import reverse, NoReverseMatch try: menu_item.url = reverse(menu_item.url, current_app=self.current_app) menu_item._url_name = menu_item.url