-
Notifications
You must be signed in to change notification settings - Fork 98
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
Make compatible with Django 1.7 migrations #17
Make compatible with Django 1.7 migrations #17
Conversation
Explicitly set the TEST_RUNNER setting to silence an upgrade path warning about the default TEST_RUNNER having changed in 1.6. Explicitly set the fields of the test ModelForm, because not setting them is deprecated in Django 1.7.
Previously, migrations would be created with a byte string where all other fields use unicode strings. This has been fixed by following the example of the django.db.models.fields.Field base class and using force_text() on it.
Following the advice of @jaylett and also passing the default field through if it has been set by the user. Tested manually with forward and backward migrations, and passes all existing unit tests, but lacking a new unit test for deconstruct().
This should also fix the error "ValueError: Cannot serialize: <class django.db.models.fields.NOT_PROVIDED at 0x02A0B768>" occuring when squashing migrations.
I have a fork available here that includes your commits. It's also available on PyPi. |
@frewsxcv I quite hate duplicate entries on PyPi. :) But thanks for picking this up, guess it's the only way right now! |
@mfogel Would you consider handing over the ownership of the django-timezone-field PyPi project? (Please not to me, though. ;) But I'd like it to survive.) |
I think a 79 character line limit is horribly outdated in 2014 and I think this change reduces readability quite a lot, but the current TravisCI configuration enforces it, so fine...
Changes Unknown when pulling 919c507 on hheimbuerger:feature/django17-migrations-compatibility into * on mfogel:develop*. |
#12 has the most useful information on the actual problem here. django isn't able to serialize the pytz.timezone objects. With the current set of kwargs, there's no need for a custom I'll attach more info on #12. |
Make the app Django 1.7 compatible and add support for the new migration system introduced in Django 1.7.
Builds on top of @anhtran's substantial initial work.