aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2017-08-10 23:01:42 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2017-08-10 23:01:42 +0300
commitd2a295f9bd96a6317173f1d38f79907a8373ef52 (patch)
tree96b08fc05147395cf00adae66dbf2b99360109cb /main
parentc2c616e5b0ba47f2936116cfc41ba270a1e4170b (diff)
downloadaports-d2a295f9bd96a6317173f1d38f79907a8373ef52.tar.bz2
aports-d2a295f9bd96a6317173f1d38f79907a8373ef52.tar.xz
main/py-django-oscar: upgrade to 1.5
Diffstat (limited to 'main')
-rw-r--r--main/py-django-oscar/0001-Use-Django-1.11-compatible-django-webtest-version.patch25
-rw-r--r--main/py-django-oscar/0002-Don-t-use-django.template.Context-for-template-rende.patch119
-rw-r--r--main/py-django-oscar/0003-Update-the-custom-form-widgets-for-Django-1.11.patch131
-rw-r--r--main/py-django-oscar/0004-Add-template_name-attribute-to-RemoteSelect-widget.patch25
-rw-r--r--main/py-django-oscar/0005-Fix-RemoteSelect-widget-for-Django-1.10-1.11.patch43
-rw-r--r--main/py-django-oscar/0006-Fix-EmailBackend.authenticate-signature-for-Django-1.patch56
-rw-r--r--main/py-django-oscar/0007-Fix-widgets.ImageInput-for-Django-1.11.patch31
-rw-r--r--main/py-django-oscar/0008-Allow-latest-django-haystack-release-for-Django-1.11.patch25
-rw-r--r--main/py-django-oscar/0009-Fix-the-render_promotion-template-tag.patch55
-rw-r--r--main/py-django-oscar/0010-Syntax-improvements-sort-imports-with-isort.patch60
-rw-r--r--main/py-django-oscar/0011-Fix-deprecated-use-of-RequestContext-in-render_promo.patch41
-rw-r--r--main/py-django-oscar/APKBUILD28
12 files changed, 3 insertions, 636 deletions
diff --git a/main/py-django-oscar/0001-Use-Django-1.11-compatible-django-webtest-version.patch b/main/py-django-oscar/0001-Use-Django-1.11-compatible-django-webtest-version.patch
deleted file mode 100644
index 7cef1f7fe6..0000000000
--- a/main/py-django-oscar/0001-Use-Django-1.11-compatible-django-webtest-version.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 82c92e467540a5d2e77690d43ca871bc92f05b27 Mon Sep 17 00:00:00 2001
-From: Michael van Tellingen <michael@mvantellingen.nl>
-Date: Tue, 4 Apr 2017 23:26:22 +0200
-Subject: [PATCH 1/8] Use Django 1.11 compatible django-webtest version
-
----
- setup.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index f2ec130..587f10e 100755
---- a/setup.py
-+++ b/setup.py
-@@ -60,7 +60,7 @@ docs_requires = [
- test_requires = [
- 'WebTest==2.0.24',
- 'coverage==4.3.4',
-- 'django-webtest==1.8.0',
-+ 'django-webtest==1.9.1',
- 'py>=1.4.31',
- 'pytest==3.0.6',
- 'pytest-cov==2.4.0',
---
-2.9.4
-
diff --git a/main/py-django-oscar/0002-Don-t-use-django.template.Context-for-template-rende.patch b/main/py-django-oscar/0002-Don-t-use-django.template.Context-for-template-rende.patch
deleted file mode 100644
index 17aed9912b..0000000000
--- a/main/py-django-oscar/0002-Don-t-use-django.template.Context-for-template-rende.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From d2d5b17dcac857503b3040dabc7c93d567c68054 Mon Sep 17 00:00:00 2001
-From: Michael van Tellingen <michael@mvantellingen.nl>
-Date: Tue, 4 Apr 2017 23:27:38 +0200
-Subject: [PATCH 2/8] Don't use django.template.Context for template rendering
-
-Since Django 1.11 dicts should be passed to template rendering functions
----
- src/oscar/apps/customer/abstract_models.py | 5 +++--
- src/oscar/apps/customer/alerts/utils.py | 10 +++++-----
- src/oscar/forms/widgets.py | 5 ++---
- src/oscar/templatetags/product_tags.py | 2 ++
- 4 files changed, 12 insertions(+), 10 deletions(-)
-
-diff --git a/src/oscar/apps/customer/abstract_models.py b/src/oscar/apps/customer/abstract_models.py
-index fbebf60..9a6c5ee 100644
---- a/src/oscar/apps/customer/abstract_models.py
-+++ b/src/oscar/apps/customer/abstract_models.py
-@@ -6,7 +6,7 @@ from django.contrib.auth import models as auth_models
- from django.core.urlresolvers import reverse
- from django.core.validators import RegexValidator
- from django.db import models
--from django.template import Context, Template, TemplateDoesNotExist
-+from django.template import Template, TemplateDoesNotExist
- from django.template.loader import get_template
- from django.utils import six, timezone
- from django.utils.encoding import python_2_unicode_compatible
-@@ -238,8 +238,9 @@ class AbstractCommunicationEventType(models.Model):
- settings, 'OSCAR_STATIC_BASE_URL', None)
-
- messages = {}
-+ ctx = {}
- for name, template in templates.items():
-- messages[name] = template.render(Context(ctx)) if template else ''
-+ messages[name] = template.render(ctx) if template else ''
-
- # Ensure the email subject doesn't contain any newlines
- messages['subject'] = messages['subject'].replace("\n", "")
-diff --git a/src/oscar/apps/customer/alerts/utils.py b/src/oscar/apps/customer/alerts/utils.py
-index fc3d8bf..776d811 100644
---- a/src/oscar/apps/customer/alerts/utils.py
-+++ b/src/oscar/apps/customer/alerts/utils.py
-@@ -4,7 +4,7 @@ from django.conf import settings
- from django.contrib.sites.models import Site
- from django.core import mail
- from django.db.models import Max
--from django.template import Context, loader
-+from django.template import loader
-
- from oscar.apps.customer.notifications import services
- from oscar.core.loading import get_class, get_model
-@@ -32,10 +32,10 @@ def send_alert_confirmation(alert):
- """
- Send an alert confirmation email.
- """
-- ctx = Context({
-+ ctx = {
- 'alert': alert,
- 'site': Site.objects.get_current(),
-- })
-+ }
- subject_tpl = loader.get_template('customer/alerts/emails/'
- 'confirmation_subject.txt')
- body_tpl = loader.get_template('customer/alerts/emails/'
-@@ -93,11 +93,11 @@ def send_product_alerts(product):
- if not data.availability.is_available_to_buy:
- continue
-
-- ctx = Context({
-+ ctx = {
- 'alert': alert,
- 'site': Site.objects.get_current(),
- 'hurry': hurry_mode,
-- })
-+ }
- if alert.user:
- # Send a site notification
- num_notifications += 1
-diff --git a/src/oscar/forms/widgets.py b/src/oscar/forms/widgets.py
-index 85ba1b0..5b374cf 100644
---- a/src/oscar/forms/widgets.py
-+++ b/src/oscar/forms/widgets.py
-@@ -4,7 +4,6 @@ from django import forms
- from django.core.files.uploadedfile import InMemoryUploadedFile
- from django.forms.utils import flatatt
- from django.forms.widgets import FileInput
--from django.template import Context
- from django.template.loader import render_to_string
- from django.utils import formats, six
- from django.utils.encoding import force_text
-@@ -42,11 +41,11 @@ class ImageInput(FileInput):
- image_url = final_attrs['value'] = force_text(
- self._format_value(value))
-
-- return render_to_string(self.template_name, Context({
-+ return render_to_string(self.template_name, {
- 'input_attrs': flatatt(final_attrs),
- 'image_url': image_url,
- 'image_id': "%s-image" % final_attrs['id'],
-- }))
-+ })
-
-
- class WYSIWYGTextArea(forms.Textarea):
-diff --git a/src/oscar/templatetags/product_tags.py b/src/oscar/templatetags/product_tags.py
-index ea5c3f2..8fa6f66 100644
---- a/src/oscar/templatetags/product_tags.py
-+++ b/src/oscar/templatetags/product_tags.py
-@@ -23,6 +23,8 @@ def render_product(context, product):
- % product.get_product_class().slug,
- 'catalogue/partials/product.html']
- template_ = select_template(names)
-+ context = context.flatten()
-+
- # Ensure the passed product is in the context as 'product'
- context['product'] = product
- return template_.render(context)
---
-2.9.4
-
diff --git a/main/py-django-oscar/0003-Update-the-custom-form-widgets-for-Django-1.11.patch b/main/py-django-oscar/0003-Update-the-custom-form-widgets-for-Django-1.11.patch
deleted file mode 100644
index 0dbef929ff..0000000000
--- a/main/py-django-oscar/0003-Update-the-custom-form-widgets-for-Django-1.11.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From bf41f12337554af742148e1d04427974c3ed33fc Mon Sep 17 00:00:00 2001
-From: Michael van Tellingen <michael@mvantellingen.nl>
-Date: Thu, 6 Apr 2017 17:04:19 +0200
-Subject: [PATCH 3/8] Update the custom form widgets for Django 1.11
-
-In Django 1.11 the widgets are rendered with templates instead of
-python code. Update the code for this change
----
- src/oscar/apps/customer/abstract_models.py | 5 ++---
- src/oscar/forms/widgets.py | 28 ++++++++++++++++++++--------
- 2 files changed, 22 insertions(+), 11 deletions(-)
-
-diff --git a/src/oscar/apps/customer/abstract_models.py b/src/oscar/apps/customer/abstract_models.py
-index 9a6c5ee..055fda3 100644
---- a/src/oscar/apps/customer/abstract_models.py
-+++ b/src/oscar/apps/customer/abstract_models.py
-@@ -6,7 +6,7 @@ from django.contrib.auth import models as auth_models
- from django.core.urlresolvers import reverse
- from django.core.validators import RegexValidator
- from django.db import models
--from django.template import Template, TemplateDoesNotExist
-+from django.template import Context, TemplateDoesNotExist, engines
- from django.template.loader import get_template
- from django.utils import six, timezone
- from django.utils.encoding import python_2_unicode_compatible
-@@ -222,7 +222,7 @@ class AbstractCommunicationEventType(models.Model):
- field = getattr(self, attr_name, None)
- if field is not None:
- # Template content is in a model field
-- templates[name] = Template(field)
-+ templates[name] = engines['django'].from_string(field)
- else:
- # Model field is empty - look for a file template
- template_name = getattr(self, "%s_file" % attr_name) % code
-@@ -238,7 +238,6 @@ class AbstractCommunicationEventType(models.Model):
- settings, 'OSCAR_STATIC_BASE_URL', None)
-
- messages = {}
-- ctx = {}
- for name, template in templates.items():
- messages[name] = template.render(ctx) if template else ''
-
-diff --git a/src/oscar/forms/widgets.py b/src/oscar/forms/widgets.py
-index 5b374cf..cdeb6b9 100644
---- a/src/oscar/forms/widgets.py
-+++ b/src/oscar/forms/widgets.py
-@@ -1,5 +1,6 @@
- import re
-
-+import django
- from django import forms
- from django.core.files.uploadedfile import InMemoryUploadedFile
- from django.forms.utils import flatatt
-@@ -23,7 +24,7 @@ class ImageInput(FileInput):
- template_name = 'partials/image_input_widget.html'
- attrs = {'accept': 'image/*'}
-
-- def render(self, name, value, attrs=None):
-+ def render(self, name, value, attrs=None, renderer=None):
- """
- Render the ``input`` field based on the defined ``template_name``. The
- image URL is take from *value* and is provided to the template as
-@@ -33,7 +34,15 @@ class ImageInput(FileInput):
- If *value* contains no valid image URL an empty string will be provided
- in the context.
- """
-- final_attrs = self.build_attrs(attrs, type=self.input_type, name=name)
-+ extra_attrs = {
-+ 'type': self.input_type,
-+ 'name': name,
-+ }
-+ if django.VERSION < (1, 11):
-+ final_attrs = self.build_attrs(attrs, **extra_attrs)
-+ else:
-+ final_attrs = self.build_attrs(attrs, extra_attrs=extra_attrs)
-+
- if not value or isinstance(value, InMemoryUploadedFile):
- # can't display images that aren't stored
- image_url = ''
-@@ -163,7 +172,7 @@ class TimePickerInput(DateTimeWidgetMixin, forms.TimeInput):
- """
- format_key = 'TIME_INPUT_FORMATS'
-
-- def render(self, name, value, attrs=None):
-+ def render(self, name, value, attrs=None, renderer=None):
- format = self.get_format()
- input = super(TimePickerInput, self).render(
- name, value, self.gett_attrs(attrs, format))
-@@ -192,7 +201,7 @@ class DatePickerInput(DateTimeWidgetMixin, forms.DateInput):
- """
- format_key = 'DATE_INPUT_FORMATS'
-
-- def render(self, name, value, attrs=None):
-+ def render(self, name, value, attrs=None, renderer=None):
- format = self.get_format()
- input = super(DatePickerInput, self).render(
- name, value, self.gett_attrs(attrs, format))
-@@ -235,7 +244,7 @@ class DateTimePickerInput(DateTimeWidgetMixin, forms.DateTimeInput):
- if not include_seconds and self.format:
- self.format = re.sub(':?%S', '', self.format)
-
-- def render(self, name, value, attrs=None):
-+ def render(self, name, value, attrs=None, renderer=None):
- format = self.get_format()
- input = super(DateTimePickerInput, self).render(
- name, value, self.gett_attrs(attrs, format))
-@@ -314,15 +323,18 @@ class RemoteSelect(forms.Widget):
- else:
- return six.text_type(value)
-
-- def render(self, name, value, attrs=None, choices=()):
-- attrs = self.build_attrs(attrs, **{
-+ def render(self, name, value, attrs=None, renderer=None):
-+ attrs = {} if attrs is None else attrs
-+
-+ extra_attrs = {
- 'type': 'hidden',
- 'name': name,
- 'data-ajax-url': self.lookup_url,
- 'data-multiple': 'multiple' if self.is_multiple else '',
- 'value': self.format_value(value),
- 'data-required': 'required' if self.is_required else '',
-- })
-+ }
-+ attrs = self.build_attrs(attrs, extra_attrs=extra_attrs)
- return mark_safe(u'<input %s>' % flatatt(attrs))
-
-
---
-2.9.4
-
diff --git a/main/py-django-oscar/0004-Add-template_name-attribute-to-RemoteSelect-widget.patch b/main/py-django-oscar/0004-Add-template_name-attribute-to-RemoteSelect-widget.patch
deleted file mode 100644
index 4aa1062c44..0000000000
--- a/main/py-django-oscar/0004-Add-template_name-attribute-to-RemoteSelect-widget.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 9e7b200b06b07da8c0383d3d506097e5777f6682 Mon Sep 17 00:00:00 2001
-From: Michael van Tellingen <michael@mvantellingen.nl>
-Date: Sat, 15 Apr 2017 08:42:47 +0200
-Subject: [PATCH 4/8] Add template_name attribute to RemoteSelect widget
-
-This fixes an exception in Django 1.11 (template based widgets)
----
- src/oscar/forms/widgets.py | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/oscar/forms/widgets.py b/src/oscar/forms/widgets.py
-index cdeb6b9..c2a5ce7 100644
---- a/src/oscar/forms/widgets.py
-+++ b/src/oscar/forms/widgets.py
-@@ -304,6 +304,7 @@ class RemoteSelect(forms.Widget):
- """
- is_multiple = False
- lookup_url = None
-+ template_name = None
-
- def __init__(self, *args, **kwargs):
- if 'lookup_url' in kwargs:
---
-2.9.4
-
diff --git a/main/py-django-oscar/0005-Fix-RemoteSelect-widget-for-Django-1.10-1.11.patch b/main/py-django-oscar/0005-Fix-RemoteSelect-widget-for-Django-1.10-1.11.patch
deleted file mode 100644
index 5f3b07799f..0000000000
--- a/main/py-django-oscar/0005-Fix-RemoteSelect-widget-for-Django-1.10-1.11.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 9732e0310b753cec3b8eb0f533c2d9dc9882de6c Mon Sep 17 00:00:00 2001
-From: Michael van Tellingen <michael@mvantellingen.nl>
-Date: Sat, 15 Apr 2017 10:15:52 +0200
-Subject: [PATCH 5/8] Fix RemoteSelect widget for Django 1.10/1.11
-
-We should probably just move to django-select2 in the future
----
- src/oscar/forms/widgets.py | 9 ++++-----
- 1 file changed, 4 insertions(+), 5 deletions(-)
-
-diff --git a/src/oscar/forms/widgets.py b/src/oscar/forms/widgets.py
-index c2a5ce7..6f0f5e7 100644
---- a/src/oscar/forms/widgets.py
-+++ b/src/oscar/forms/widgets.py
-@@ -1,3 +1,4 @@
-+import copy
- import re
-
- import django
-@@ -325,17 +326,15 @@ class RemoteSelect(forms.Widget):
- return six.text_type(value)
-
- def render(self, name, value, attrs=None, renderer=None):
-- attrs = {} if attrs is None else attrs
--
-- extra_attrs = {
-+ attrs = {} if attrs is None else copy.copy(attrs)
-+ attrs.update({
- 'type': 'hidden',
- 'name': name,
- 'data-ajax-url': self.lookup_url,
- 'data-multiple': 'multiple' if self.is_multiple else '',
- 'value': self.format_value(value),
- 'data-required': 'required' if self.is_required else '',
-- }
-- attrs = self.build_attrs(attrs, extra_attrs=extra_attrs)
-+ })
- return mark_safe(u'<input %s>' % flatatt(attrs))
-
-
---
-2.9.4
-
diff --git a/main/py-django-oscar/0006-Fix-EmailBackend.authenticate-signature-for-Django-1.patch b/main/py-django-oscar/0006-Fix-EmailBackend.authenticate-signature-for-Django-1.patch
deleted file mode 100644
index 4fd89cfe9d..0000000000
--- a/main/py-django-oscar/0006-Fix-EmailBackend.authenticate-signature-for-Django-1.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 5bd3e277df3fe925255302e4aa50a17118ea61b0 Mon Sep 17 00:00:00 2001
-From: Samir Shah <samir@regulusweb.com>
-Date: Tue, 25 Apr 2017 08:30:17 +0300
-Subject: [PATCH 6/8] Fix EmailBackend.authenticate() signature for Django
- 1.11.
-
----
- src/oscar/apps/customer/auth_backends.py | 22 ++++++++++------------
- 1 file changed, 10 insertions(+), 12 deletions(-)
-
-diff --git a/src/oscar/apps/customer/auth_backends.py b/src/oscar/apps/customer/auth_backends.py
-index 65b8778..6558454 100644
---- a/src/oscar/apps/customer/auth_backends.py
-+++ b/src/oscar/apps/customer/auth_backends.py
-@@ -1,5 +1,6 @@
- import warnings
-
-+import django
- from django.contrib.auth.backends import ModelBackend
- from django.core.exceptions import ImproperlyConfigured
-
-@@ -22,7 +23,7 @@ class EmailBackend(ModelBackend):
- For this to work, the User model must have an 'email' field
- """
-
-- def authenticate(self, email=None, password=None, *args, **kwargs):
-+ def _authenticate(self, request, email=None, password=None, *args, **kwargs):
- if email is None:
- if 'username' not in kwargs or kwargs['username'] is None:
- return None
-@@ -55,14 +56,11 @@ class EmailBackend(ModelBackend):
- "password")
- return None
-
--
--# Deprecated since Oscar 1.0 because of the spelling.
--class Emailbackend(EmailBackend):
--
-- def __init__(self):
-- warnings.warn(
-- "Oscar's auth backend EmailBackend has been renamed in Oscar 1.0 "
-- " and you're using the old name of Emailbackend. Please rename "
-- " all references; most likely in the AUTH_BACKENDS setting.",
-- DeprecationWarning)
-- super(Emailbackend, self).__init__()
-+ # The signature of the authenticate method changed in Django 1.11 to include
-+ # a mandatory `request` argument.
-+ if django.VERSION < (1, 11):
-+ def authenticate(self, email=None, password=None, *args, **kwargs):
-+ return self._authenticate(None, email, password, *args, **kwargs)
-+ else:
-+ def authenticate(self, *args, **kwargs):
-+ return self._authenticate(*args, **kwargs)
---
-2.9.4
-
diff --git a/main/py-django-oscar/0007-Fix-widgets.ImageInput-for-Django-1.11.patch b/main/py-django-oscar/0007-Fix-widgets.ImageInput-for-Django-1.11.patch
deleted file mode 100644
index c47f8a33e0..0000000000
--- a/main/py-django-oscar/0007-Fix-widgets.ImageInput-for-Django-1.11.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From b7a50dce837006f8643e59a40a164a75010138e8 Mon Sep 17 00:00:00 2001
-From: Michael van Tellingen <michael@mvantellingen.nl>
-Date: Sun, 30 Apr 2017 10:15:08 +0200
-Subject: [PATCH 7/8] Fix widgets.ImageInput for Django 1.11
-
-The FileInput.format_value returns None instead of the passed value
-in Django 1.11. Remove the usage of format_value since it was a noop
-before Django 1.11 anyway
-
-Fixes #2334
----
- src/oscar/forms/widgets.py | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/src/oscar/forms/widgets.py b/src/oscar/forms/widgets.py
-index 6f0f5e7..2a03919 100644
---- a/src/oscar/forms/widgets.py
-+++ b/src/oscar/forms/widgets.py
-@@ -48,8 +48,7 @@ class ImageInput(FileInput):
- # can't display images that aren't stored
- image_url = ''
- else:
-- image_url = final_attrs['value'] = force_text(
-- self._format_value(value))
-+ image_url = final_attrs['value'] = value
-
- return render_to_string(self.template_name, {
- 'input_attrs': flatatt(final_attrs),
---
-2.9.4
-
diff --git a/main/py-django-oscar/0008-Allow-latest-django-haystack-release-for-Django-1.11.patch b/main/py-django-oscar/0008-Allow-latest-django-haystack-release-for-Django-1.11.patch
deleted file mode 100644
index 4b5f7ec4ee..0000000000
--- a/main/py-django-oscar/0008-Allow-latest-django-haystack-release-for-Django-1.11.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From cdc4476e00d0b9924d0b535c222addb565a1aa8f Mon Sep 17 00:00:00 2001
-From: Michael van Tellingen <michael@mvantellingen.nl>
-Date: Mon, 26 Jun 2017 10:03:05 +0200
-Subject: [PATCH 8/8] Allow latest django-haystack release (for Django 1.11)
-
----
- setup.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index 587f10e..41e106b 100755
---- a/setup.py
-+++ b/setup.py
-@@ -26,7 +26,7 @@ install_requires = [
- # https://github.com/AndrewIngram/django-extra-views/issues/114
- 'django-extra-views>=0.2,<0.6.5',
- # Search support
-- 'django-haystack>=2.5.0,<2.6.0',
-+ 'django-haystack>=2.5.0,<2.7.0',
- # Treebeard is used for categories
- 'django-treebeard>=4.1.0',
- # Sorl is used as the default thumbnailer
---
-2.9.4
-
diff --git a/main/py-django-oscar/0009-Fix-the-render_promotion-template-tag.patch b/main/py-django-oscar/0009-Fix-the-render_promotion-template-tag.patch
deleted file mode 100644
index 6ff74a8c4f..0000000000
--- a/main/py-django-oscar/0009-Fix-the-render_promotion-template-tag.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From e76a83621f6b099a33949304792adb4b6fe35a9d Mon Sep 17 00:00:00 2001
-From: Michael van Tellingen <michael@mvantellingen.nl>
-Date: Tue, 7 Feb 2017 23:04:25 +0100
-Subject: [PATCH 09/11] Fix the render_promotion template-tag
-
----
- src/oscar/templatetags/promotion_tags.py | 31 ++++++++++++-------------------
- 1 file changed, 12 insertions(+), 19 deletions(-)
-
-diff --git a/src/oscar/templatetags/promotion_tags.py b/src/oscar/templatetags/promotion_tags.py
-index a4d7f77..95f9df6 100644
---- a/src/oscar/templatetags/promotion_tags.py
-+++ b/src/oscar/templatetags/promotion_tags.py
-@@ -1,26 +1,19 @@
--from django.template import Library, Node, RequestContext, Variable
-+from django.template import Library, Node, RequestContext
- from django.template.loader import select_template
-
- register = Library()
-
-
--class PromotionNode(Node):
-- def __init__(self, promotion):
-- self.promotion_var = Variable(promotion)
-+@register.simple_tag(takes_context=True)
-+def render_promotion(context, promotion):
-+ template = select_template([
-+ promotion.template_name(), 'promotions/default.html'])
-
-- def render(self, context):
-- promotion = self.promotion_var.resolve(context)
-- template = select_template([promotion.template_name(),
-- 'promotions/default.html'])
-- args = {'promotion': promotion}
-- args.update(**promotion.template_context(request=context['request']))
-- ctx = RequestContext(context['request'], args)
-- return template.render(ctx)
-+ args = {
-+ 'request': context['request'],
-+ 'promotion': promotion
-+ }
-+ args.update(**promotion.template_context(request=context['request']))
-
--
--def get_promotion_html(parser, token):
-- _, promotion = token.split_contents()
-- return PromotionNode(promotion)
--
--
--register.tag('render_promotion', get_promotion_html)
-+ ctx = RequestContext(context['request'], args)
-+ return template.render(ctx)
---
-2.9.4
-
diff --git a/main/py-django-oscar/0010-Syntax-improvements-sort-imports-with-isort.patch b/main/py-django-oscar/0010-Syntax-improvements-sort-imports-with-isort.patch
deleted file mode 100644
index 8e81cea3a1..0000000000
--- a/main/py-django-oscar/0010-Syntax-improvements-sort-imports-with-isort.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From ed6b49d43870f316b099ef6076b5bd844aeb3708 Mon Sep 17 00:00:00 2001
-From: Alexander Gaevsky <sasha@sasha0.ru>
-Date: Mon, 13 Feb 2017 14:48:14 +0200
-Subject: [PATCH 10/11] Syntax improvements, sort imports with isort.
-
----
- src/oscar/apps/catalogue/reviews/admin.py | 1 +
- src/oscar/apps/dashboard/catalogue/forms.py | 1 +
- src/oscar/apps/dashboard/partners/forms.py | 1 +
- src/oscar/templatetags/promotion_tags.py | 2 +-
- 4 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/oscar/apps/catalogue/reviews/admin.py b/src/oscar/apps/catalogue/reviews/admin.py
-index 777a0ad..cfe987f 100644
---- a/src/oscar/apps/catalogue/reviews/admin.py
-+++ b/src/oscar/apps/catalogue/reviews/admin.py
-@@ -15,5 +15,6 @@ class ProductReviewAdmin(admin.ModelAdmin):
- class VoteAdmin(admin.ModelAdmin):
- list_display = ('review', 'user', 'delta', 'date_created')
-
-+
- admin.site.register(ProductReview, ProductReviewAdmin)
- admin.site.register(Vote, VoteAdmin)
-diff --git a/src/oscar/apps/dashboard/catalogue/forms.py b/src/oscar/apps/dashboard/catalogue/forms.py
-index bc93f02..c6b28ce 100644
---- a/src/oscar/apps/dashboard/catalogue/forms.py
-+++ b/src/oscar/apps/dashboard/catalogue/forms.py
-@@ -472,6 +472,7 @@ class ProductAttributesForm(forms.ModelForm):
- model = ProductAttribute
- fields = ["name", "code", "type", "option_group", "required"]
-
-+
- ProductAttributesFormSet = inlineformset_factory(ProductClass,
- ProductAttribute,
- form=ProductAttributesForm,
-diff --git a/src/oscar/apps/dashboard/partners/forms.py b/src/oscar/apps/dashboard/partners/forms.py
-index c7f5583..d0ee31d 100644
---- a/src/oscar/apps/dashboard/partners/forms.py
-+++ b/src/oscar/apps/dashboard/partners/forms.py
-@@ -31,6 +31,7 @@ class PartnerCreateForm(forms.ModelForm):
- model = Partner
- fields = ('name',)
-
-+
- ROLE_CHOICES = (
- ('staff', _('Full dashboard access')),
- ('limited', _('Limited dashboard access')),
-diff --git a/src/oscar/templatetags/promotion_tags.py b/src/oscar/templatetags/promotion_tags.py
-index 95f9df6..471d508 100644
---- a/src/oscar/templatetags/promotion_tags.py
-+++ b/src/oscar/templatetags/promotion_tags.py
-@@ -1,4 +1,4 @@
--from django.template import Library, Node, RequestContext
-+from django.template import Library, RequestContext
- from django.template.loader import select_template
-
- register = Library()
---
-2.9.4
-
diff --git a/main/py-django-oscar/0011-Fix-deprecated-use-of-RequestContext-in-render_promo.patch b/main/py-django-oscar/0011-Fix-deprecated-use-of-RequestContext-in-render_promo.patch
deleted file mode 100644
index f6ecd6bebb..0000000000
--- a/main/py-django-oscar/0011-Fix-deprecated-use-of-RequestContext-in-render_promo.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 1709f673d74d1cd93c741111bd7f215c05a3f038 Mon Sep 17 00:00:00 2001
-From: Samir Shah <samir@regulusweb.com>
-Date: Sat, 18 Feb 2017 07:26:16 +0300
-Subject: [PATCH 11/11] Fix deprecated use of RequestContext in
- render_promotion tag.
-
----
- src/oscar/templatetags/promotion_tags.py | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/src/oscar/templatetags/promotion_tags.py b/src/oscar/templatetags/promotion_tags.py
-index 471d508..a067db2 100644
---- a/src/oscar/templatetags/promotion_tags.py
-+++ b/src/oscar/templatetags/promotion_tags.py
-@@ -1,4 +1,4 @@
--from django.template import Library, RequestContext
-+from django.template import Library
- from django.template.loader import select_template
-
- register = Library()
-@@ -8,12 +8,12 @@ register = Library()
- def render_promotion(context, promotion):
- template = select_template([
- promotion.template_name(), 'promotions/default.html'])
-+ request = context['request']
-
-- args = {
-- 'request': context['request'],
-+ ctx = {
-+ 'request': request,
- 'promotion': promotion
- }
-- args.update(**promotion.template_context(request=context['request']))
-+ ctx.update(**promotion.template_context(request=request))
-
-- ctx = RequestContext(context['request'], args)
-- return template.render(ctx)
-+ return template.render(ctx, request)
---
-2.9.4
-
diff --git a/main/py-django-oscar/APKBUILD b/main/py-django-oscar/APKBUILD
index 9f019e3ef1..57c6e2e152 100644
--- a/main/py-django-oscar/APKBUILD
+++ b/main/py-django-oscar/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=py-django-oscar
-pkgver=1.4
-pkgrel=2
+pkgver=1.5
+pkgrel=0
pkgdesc="Domain-driven e-commerce for Django"
url=http://oscarcommerce.com/
arch=noarch
@@ -13,17 +13,6 @@ depends="py-babel py-django py-django-extra-views py-django-haystack
py-pillow py-purl py-unidecode"
makedepends=py-setuptools
source="https://files.pythonhosted.org/packages/source/d/django-oscar/django-oscar-$pkgver.tar.gz
- 0001-Use-Django-1.11-compatible-django-webtest-version.patch
- 0002-Don-t-use-django.template.Context-for-template-rende.patch
- 0003-Update-the-custom-form-widgets-for-Django-1.11.patch
- 0004-Add-template_name-attribute-to-RemoteSelect-widget.patch
- 0005-Fix-RemoteSelect-widget-for-Django-1.10-1.11.patch
- 0006-Fix-EmailBackend.authenticate-signature-for-Django-1.patch
- 0007-Fix-widgets.ImageInput-for-Django-1.11.patch
- 0008-Allow-latest-django-haystack-release-for-Django-1.11.patch
- 0009-Fix-the-render_promotion-template-tag.patch
- 0010-Syntax-improvements-sort-imports-with-isort.patch
- 0011-Fix-deprecated-use-of-RequestContext-in-render_promo.patch
"
_builddir=$srcdir/django-oscar-$pkgver
@@ -47,15 +36,4 @@ package() {
./setup.py install --root "$pkgdir"
}
-sha512sums="80b86002f515529fbd73aa64a56381daa86d06195cd4cf8dbfaf8f5b4183d3bee1a4cccc970b7093b92b68b15c941a4bedda6bac2238ffd5b7377af3f5b98a4e django-oscar-1.4.tar.gz
-e704f9df7522b0e980ca20c3af8808dbc36c9d828de157834b5532525efd0b0ca25f92495f0201dfcbe65b074d99fce5edd41a8660433ff9d3744b1fe08b2b86 0001-Use-Django-1.11-compatible-django-webtest-version.patch
-0a442561a76c2073bf63f58dd6b8eb64bff51ae38525e0460aa7d7d12de8a015334727ed066e4e6192f485a95e4cb8ca9eeef31303dc2addfc337309bc908336 0002-Don-t-use-django.template.Context-for-template-rende.patch
-482610db4fd415aa5d4aabc07a8e6ffb598563f751fa09a3b2f6d3889cbe858b1e975e2abe725426f53bc945cfa9042495bf9f3da9de094e5868b3849ed5420a 0003-Update-the-custom-form-widgets-for-Django-1.11.patch
-bf8a5c004eff8a9494e693a3c7861d8ea68e887c4a3c03bd4083c28b8173cd8013d10cb8d09ffe24dce2023bb267ded6137cf980da2ae5f9796389b0ea0f0b04 0004-Add-template_name-attribute-to-RemoteSelect-widget.patch
-92f32a9762faa49c4b3f474cc43ee72cc663c4324b1bd6798707f710ec184374a7a64da4aab9307da49b766386d7dcb641bb26a283323b102392a61da424c655 0005-Fix-RemoteSelect-widget-for-Django-1.10-1.11.patch
-95773dda83edfe64b5da0c39935ea7c97483ba0b7088135f6e47c942d3bf3cab8bf1325ad26ea1a85f5c7b539115e6d13b668459ae55a8d5c376f0167cdee128 0006-Fix-EmailBackend.authenticate-signature-for-Django-1.patch
-098defd75a2e6175ae6b0fe5ec0a5c6478581bc424a0cd7772f1f1afb80424cb0ec248d75d0ba3e401df5db1465dd6f9e6608f92f54f7b8631219165f04db133 0007-Fix-widgets.ImageInput-for-Django-1.11.patch
-0e26d21f8f9e9cb0a60ed06f05d2445798ae90358893b3a061ff1cb7ce7a396c5efd47045a855752fd8505c3e64d9dd4b76464b65df0a26f897dba576e77398f 0008-Allow-latest-django-haystack-release-for-Django-1.11.patch
-58c562df7b4f96b58470098a6cafd36f741dbcbb2fc7510875ebec394af63da38ebbb3e70fd8a281548d31b74babd877211bbbd3df3bac9a4556b9907e0e9a65 0009-Fix-the-render_promotion-template-tag.patch
-2c29ff5ef18bf5ed3d681ad155a4faf03c9e1e7248055d5d8bf5fb87c30d35bd28a14db0a0e5fc0e22dc418cbd54b5b54e492abc702bb6edaae2cf7b25c9e9e7 0010-Syntax-improvements-sort-imports-with-isort.patch
-a9edb570f4039e2ec0b23b0b0d8dd07005434c3b303d3735897aeb7f458e57e25cd8fab14d4dff3d95c87798f7a57cfab5b2e99dc1a909fb3e58f7cac98a0df5 0011-Fix-deprecated-use-of-RequestContext-in-render_promo.patch"
+sha512sums="43ff74f7fe3591849238154640d28c28c49c894ca650e22569163387a1e15b6b8161bd688f6da5aaabe8f55b2406d4de176f5b162c7e6d6cf2b8b0b5115df1cb django-oscar-1.5.tar.gz"