-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fixes for Django 1.10 #16
base: master
Are you sure you want to change the base?
Conversation
self.assertEqual("1 day, 3:00:00, 1:00:00, 2 days, 1:10:04", str(obj)) | ||
self.assertEqual(str(obj.not_required_interval), '1 day, 3:00:00') | ||
# TODO: Why don't these 2 commented lines pass in either postgres or sqlite? | ||
# self.assertEqual(str(obj.required_interval), '1:00:00') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually fails because str(obj.required_interval)
evaluates to 3:00:00
. It seems that the form has the correct value when it saves the model, but the value has become 10800 seconds by the time it reaches the Interval model field.
Thanks for the PR, could you please spare some time and fix Travis too ? |
Hi @mpasternak, Ah yes. Hum, I don't quite have any more time for this at the moment. I'll get to it if I get time though. Some help with that test with is reporting 3 hours would be very much appreciated. Do you also know what versions of django & python you want to support going forward? |
TBH the project that django-interval-field was built for is currently unmaintained, so thanks for the patches. We need working travis to continue. I guess backwards compatibility with django 1.6-1.10 is possible. Python… 2.7 and 3.5 should be fine. There are no things in the code that would require a specific Django or Python version, I think… —
|
These fixes get django-interval-field working with Django 1.10.
There is a slight caveat that the test
test_project.test_app.tests.TestTestApp.test_create
had a couple of assertions that I couldn't seem to fix (see comments), but everything else seems to be working.I've run the tests for both sqlite & postgres.