Dates related to userIsOut instances appear as "%Y-%m-%d" in both edit and create forms.
Furthermore, this format is hardcoded in settings.py (DATE_FORMAT) to match the format given in static/js/jquery.ui.datepicker-es.js. This format is also wrong (at least in Chile) and should be "%d-%m-%Y".
The "wrong" format is hardcoded so that the following will match:
the way django prints a timezone instance. For example, print(timezone.now().date()) prints something like "2016-9-26".
the date format in static/js/jquery.ui.datepicker-es
the format in settings.py
Because of this, if the format is changed, the tests won't pass, since django prints dates in this format. Can this be changed?
Ie, is it posible to match jqueryUI datepicker, datetime's strptime and the way python prints dates with no harcoding involved? Is this posible using just the magic of locale?
Dates related to userIsOut instances appear as "%Y-%m-%d" in both edit and create forms. Furthermore, this format is hardcoded in settings.py (DATE_FORMAT) to match the format given in static/js/jquery.ui.datepicker-es.js. This format is also wrong (at least in Chile) and should be "%d-%m-%Y".
The "wrong" format is hardcoded so that the following will match:
Because of this, if the format is changed, the tests won't pass, since django prints dates in this format. Can this be changed? Ie, is it posible to match jqueryUI datepicker, datetime's strptime and the way python prints dates with no harcoding involved? Is this posible using just the magic of locale?