Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Get rid of `RemovedInDjango110Warning` warnings
Adam Bogdał85d1ac43303e
diff --git a/saleor/core/templatetags/bootstrap.py b/saleor/core/templatetags/bootstrap.pyindex b6557ef160..67ab240677 100644--- a/saleor/core/templatetags/bootstrap.py+++ b/saleor/core/templatetags/bootstrap.py@@ -1,7 +1,7 @@from django import formsfrom django.forms.forms import BoundField, BaseFormfrom django.forms.utils import ErrorList-from django.template import Library, Context, TemplateSyntaxError+from django.template import Library, TemplateSyntaxErrorfrom django.template.loader import render_to_stringfrom django.utils.safestring import mark_safe@@ -16,8 +16,8 @@ TEMPLATE_PAGINATION = 'bootstrap/_pagination.html'def render_non_field_errors(errors):if not errors:return ''- context = Context({'errors': errors})- return render_to_string(TEMPLATE_ERRORS, context_instance=context)+ context = {'errors': errors}+ return render_to_string(TEMPLATE_ERRORS, context=context)def render_field(bound_field, show_label, template):@@ -36,10 +36,11 @@ def render_field(bound_field, show_label, template):else:input_type = 'input'- context = Context({'bound_field': bound_field,- 'input_type': input_type,- 'show_label': show_label})- return render_to_string(template, context_instance=context)+ context = {+ 'bound_field': bound_field,+ 'input_type': input_type,+ 'show_label': show_label}+ return render_to_string(template, context=context)def as_bootstrap(obj, show_label, template):@@ -76,5 +77,5 @@ def render_widget(obj, **attrs):@register.filterdef as_pagination(items):- context = Context({'items': items})- return render_to_string(TEMPLATE_PAGINATION, context_instance=context)+ context = {'items': items}+ return render_to_string(TEMPLATE_PAGINATION, context=context)diff --git a/saleor/urls.py b/saleor/urls.pyindex 7c80fabe28..0f3d9c8070 100644--- a/saleor/urls.py+++ b/saleor/urls.py@@ -2,7 +2,7 @@ from django.conf import settingsfrom django.conf.urls import url, includefrom django.contrib import adminfrom django.contrib.sitemaps.views import sitemap-+from django.views.static import servefrom .cart.urls import urlpatterns as cart_urlsfrom .checkout.urls import urlpatterns as checkout_urls@@ -18,7 +18,7 @@ from .dashboard.urls import urlpatterns as dashboard_urlsadmin.autodiscover()urlpatterns = [- url(r'^$', include(core_urls), name='home'),+ url(r'^', include(core_urls)),url(r'^account/', include(registration_urls, namespace='registration')),url(r'^admin/', include(admin.site.urls)),url(r'^cart/', include(cart_urls, namespace='cart')),@@ -36,5 +36,5 @@ urlpatterns = [if settings.DEBUG:# static files (images, css, javascript, etc.)urlpatterns += [- url(r'^media/(?P<path>.*)$', 'django.views.static.serve',+ url(r'^media/(?P<path>.*)$', serve,{'document_root': settings.MEDIA_ROOT})]