Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed RangeWidget. Used custom template instead of format_output. #604

Merged
merged 1 commit into from Jan 20, 2017

Conversation

felixxm
Copy link
Contributor

@felixxm felixxm commented Jan 14, 2017

Fixed test_widget and test_widget_attributes i.e.:

======================================================================
FAIL: test_widget_attributes (tests.test_widgets.RangeWidgetTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/django-filter/tests/test_widgets.py", line 145, in test_widget_attributes
    <input type="date" name="date_1" />""")
  File "/django-filter/.tox/py34-djangolatest-restframeworklatest/lib/python3.4/site-packages/django/test/testcases.py", line 708, in assertHTMLEqual
    self.fail(self._formatMessage(msg, standardMsg))
AssertionError:
- <input name="date_0" type="date" /><input name="date_1" type="date" />
+ <input name="date_0" type="date" />-<input name="date_1" type="date" />

Since Django>1.10 Widget.format_output method is removed (see commit b52c7300 and doc).

@carltongibson
Copy link
Owner

@felixxm Awesome. I was wondering about that one. (Will review Monday) 👍

@carltongibson carltongibson added this to the 1.0.2 milestone Jan 14, 2017
@rpkilby
Copy link
Collaborator

rpkilby commented Jan 14, 2017

format_output can't be removed yet, since it's required for django < 1.11

@felixxm
Copy link
Contributor Author

felixxm commented Jan 14, 2017

You're right. We need to keep both solutions until Django 1.10 support will be dropped.

@rpkilby
Copy link
Collaborator

rpkilby commented Jan 14, 2017

Unfortunately, 1.8 support ends in April 2018, so that's a ways off.

@carltongibson carltongibson merged commit 945b8e6 into carltongibson:develop Jan 20, 2017
@carltongibson
Copy link
Owner

Awesome. Great. Thanks.

@felixxm felixxm deleted the issue-multiwidget branch January 20, 2017 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants