Skip to content

Fixes for Django 1.10#16

Open
adamcharnock wants to merge 2 commits into
mpasternak:masterfrom
adamcharnock:master
Open

Fixes for Django 1.10#16
adamcharnock wants to merge 2 commits into
mpasternak:masterfrom
adamcharnock:master

Conversation

@adamcharnock
Copy link
Copy Markdown

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.

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')
Copy link
Copy Markdown
Author

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.

@mpasternak
Copy link
Copy Markdown
Owner

Thanks for the PR,

could you please spare some time and fix Travis too ?

@adamcharnock
Copy link
Copy Markdown
Author

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?

@mpasternak
Copy link
Copy Markdown
Owner

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…


📱+48793668733 📧michal.dtz@gmail.com

Wiadomość napisana przez Adam Charnock notifications@github.com w dniu 15.10.2016, o godz. 22:01:

Hi @mpasternak https://github.com/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?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #16 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AAkhxTgKmYgcCvbggM0BM9wLV--boAlTks5q0TEvgaJpZM4KWSM3.

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.

2 participants