arteria / cmsplugin-contact-plus

With cmsplugin-contact-plus building custom forms for your django-cms project is a breeze. Now it's so easy to build the forms with exactly the fields you want in the order you want - with a minimal effort.
https://github.com/arteria/cmsplugin-contact-plus
BSD 3-Clause "New" or "Revised" License
30 stars 33 forks source link

Fixes 2 Django 1.8 migration issues #28

Closed jproffitt closed 8 years ago

jproffitt commented 8 years ago

On django 1.8 projects, a new migration is always created.

One reason is that choices on fieldType regularly changes. To fix that, I made the initial migration import and use FIELD_TYPE dynamically so that it won't create a new migration every time we add a field type. And since we added a recaptcha field only if recaptcha is installed, some users could have gotten a new migration, while others might not have.

The other reason is that django changed the default max_length on EmailFields from 75 to 254 in version 1.8. I simply added the migration which django would automatically create. But since some users could be using django 1.7, they would then get a new migration to change it back to 75. So I also set max_length on the recipient_email field so that doesn't happen.

philippeowagner commented 8 years ago

Thanks @jproffitt for your contribution!