diff options
Diffstat (limited to 'community/py3-django-oscar/django-3.1.patch')
-rw-r--r-- | community/py3-django-oscar/django-3.1.patch | 123 |
1 files changed, 0 insertions, 123 deletions
diff --git a/community/py3-django-oscar/django-3.1.patch b/community/py3-django-oscar/django-3.1.patch deleted file mode 100644 index 0502c0a8fef..00000000000 --- a/community/py3-django-oscar/django-3.1.patch +++ /dev/null @@ -1,123 +0,0 @@ ---- django-oscar-2.1/setup.py -+++ django-oscar-2.1.dj31/setup.py -@@ -18,7 +18,7 @@ - from oscar import get_version # noqa isort:skip - - install_requires = [ -- 'django>=2.2,<3.1', -+ 'django>=2.2,<3.2', - # PIL is required for image fields, Pillow is the "friendly" PIL fork - 'pillow>=6.0', - # We use the ModelFormSetView from django-extra-views for the basket page -@@ -37,7 +37,7 @@ - # Used for oscar.test.newfactories - 'factory-boy>=2.4.1,<3.0', - # Used for automatically building larger HTML tables -- 'django-tables2>=2.2,<2.3', -+ 'django-tables2>=2.3,<2.4', - # Used for manipulating form field attributes in templates (eg: add - # a css class) - 'django-widget-tweaks>=1.4.1', ---- django-oscar-2.1/src/oscar/apps/payment/forms.py -+++ django-oscar-2.1.dj31/src/oscar/apps/payment/forms.py -@@ -3,6 +3,7 @@ - from datetime import date - - from django import forms -+from django.core import validators - from django.core.exceptions import ImproperlyConfigured - from django.utils.translation import gettext_lazy as _ - -@@ -140,10 +141,10 @@ - - def compress(self, data_list): - if data_list: -- if data_list[1] in forms.fields.EMPTY_VALUES: -+ if data_list[1] in validators.EMPTY_VALUES: - error = self.error_messages['invalid_year'] - raise forms.ValidationError(error) -- if data_list[0] in forms.fields.EMPTY_VALUES: -+ if data_list[0] in validators.EMPTY_VALUES: - error = self.error_messages['invalid_month'] - raise forms.ValidationError(error) - year = int(data_list[1]) -@@ -186,10 +187,10 @@ - - def compress(self, data_list): - if data_list: -- if data_list[1] in forms.fields.EMPTY_VALUES: -+ if data_list[1] in validators.EMPTY_VALUES: - error = self.error_messages['invalid_year'] - raise forms.ValidationError(error) -- if data_list[0] in forms.fields.EMPTY_VALUES: -+ if data_list[0] in validators.EMPTY_VALUES: - error = self.error_messages['invalid_month'] - raise forms.ValidationError(error) - year = int(data_list[1]) ---- django-oscar-2.1/src/oscar/templates/oscar/dashboard/partials/form_field.html -+++ django-oscar-2.1.dj31/src/oscar/templates/oscar/dashboard/partials/form_field.html -@@ -14,7 +14,7 @@ - <div class="form-group {% if field.errors %}error{% endif %}"> - - {% block label %} -- {% if not nolabel and field.widget_type != 'CheckboxInput' %} -+ {% if not nolabel and field.widget_type != 'checkbox' %} - <label for="{{ field.auto_id }}" class="{% if style|default:"stacked" != 'stacked' %}col-sm-4{% endif%} control-label{% if field.field.required %} required{% endif %}"> - {{ field.label|safe }} - {% if field.field.required %} <span>*</span>{% endif %} -@@ -23,14 +23,14 @@ - {% endblock %} - - {% block controls %} -- <div class="{% if style|default:"stacked" != 'stacked' %}col-sm-8{% endif %}{% if field.widget_type == 'CheckboxInput' %} checkbox{% endif %}"> -+ <div class="{% if style|default:"stacked" != 'stacked' %}col-sm-8{% endif %}{% if field.widget_type == 'checkbox' %} checkbox{% endif %}"> - {% block widget %} -- {% if field.widget_type == 'CheckboxInput' %} -+ {% if field.widget_type == 'checkbox' %} - <label for="{{ field.auto_id }}" class="checkbox {% if field.field.required %}required{% endif %}"> - {% render_field field %} - {{ field.label|safe }}{% if field.field.required %} <span>*</span>{% endif %} - </label> -- {% elif field.widget_type == 'RadioSelect' %} -+ {% elif field.widget_type == 'radioselect' %} - <label for="{{ field.auto_id }}" class="controls {% if field.field.required %}required{% endif %}"> - {% render_field field %} - </label> ---- django-oscar-2.1/src/oscar/templates/oscar/partials/form_field.html -+++ django-oscar-2.1.dj31/src/oscar/templates/oscar/partials/form_field.html -@@ -14,7 +14,7 @@ - <div class="form-group {% if field.errors %}has-error{% endif %}"> - - {% block label %} -- {% if not nolabel and field.widget_type != 'CheckboxInput' %} -+ {% if not nolabel and field.widget_type != 'checkbox' %} - <label for="{{ field.auto_id }}" class="{% if style|default:"stacked" != 'stacked' %}col-sm-4{% endif%} control-label{% if field.field.required %} required{% endif %}"> - {{ field.label|safe }} - </label> -@@ -24,7 +24,7 @@ - {% block controls %} - <div class="{% if style|default:"stacked" != 'stacked' %}col-sm-7{% endif %}"> - {% block widget %} -- {% if field.widget_type == 'CheckboxInput' %} -+ {% if field.widget_type == 'checkbox' %} - <label for="{{ field.auto_id }}" class="checkbox {% if field.field.required %}required{% endif %}"> - {{ field.label|safe }} - {% render_field field class+="form-control" %} -Only in django-oscar-2.1.dj31: src/oscar/templates/oscar/partials/form_field.html.orig ---- django-oscar-2.1/src/oscar/templatetags/form_tags.py -+++ django-oscar-2.1.dj31/src/oscar/templatetags/form_tags.py -@@ -1,3 +1,5 @@ -+import re -+ - from django import template - - register = template.Library() -@@ -24,6 +26,6 @@ - - def render(self, context): - field = self.field.resolve(context) -- if hasattr(field, 'field'): -- field.widget_type = field.field.widget.__class__.__name__ -+ if not hasattr(field, 'widget_type') and hasattr(field, 'field'): -+ field.widget_type = re.sub(r'widget$|input$', '', field.field.widget.__class__.__name__.lower()) - return '' |