asaglimbeni/django-datetime-widget — pull request #37 by michaeljones (2014-09-03 14:17:02+00:00)
Title: Mixin refactor

Hi,

This is a new pull request against the `develop` branch with the same content as the last one I did and some additional fixes. Again, I am very happy for you to take or leave as much of it as you like. I just wanted to share my thoughts & work.

This breaks backwards compatibility in the follows ways that I know of:

- The field no longer gets a `_0` suffix when dealing with the form data
- The only option that is set by default is the `format` option. Everything else is left to the defaults in the Javascript code. The defaults in the original Python code were different to the Javascript defaults in some ways and so the behaviour has changed here.
- It tries to match any language setting from django to the closest reasonable supported value from the datepicker and otherwise defaults to `en`.

The code works for what I am trying to do in my project and I have tried to make sure it works for the example you have included in the code base, which was very helpful for debugging, thank you.

Thanks again for the project and all your work,
Michael