Regression problem on admin date format

7 views
Skip to first unread message

Antoni Aloy

unread,
Jul 9, 2010, 1:15:57 PM7/9/10
to django-d...@googlegroups.com
Hello,

Have anybody (Marc Garcia ?) check
http://code.djangoproject.com/ticket/13621 ticket. It explains a bug
concerning date and time formats. The admin does not conform the i18n
locale settings on displaying time and date formats and reverts to the
default format.

It seems a true regression test as
http://djangoadvent.com/1.2/i18n-l10n-improvements/ explains the right
display. I have reverted to Django 1.2.0 and the display works
perfectly.

As you can imagine is a quite annoying bug for non-english date format
users, perhaps enough to make a 1.2.2 release.

--
Antoni Aloy López
Blog: http://trespams.com
Site: http://apsl.net

Russell Keith-Magee

unread,
Jul 10, 2010, 3:52:43 AM7/10/10
to django-d...@googlegroups.com
On Sat, Jul 10, 2010 at 1:15 AM, Antoni Aloy <anton...@gmail.com> wrote:
> Hello,
>
> Have anybody (Marc Garcia ?) check
> http://code.djangoproject.com/ticket/13621 ticket. It explains a bug
> concerning date and time formats. The admin does not conform the i18n
> locale settings on displaying time and date formats and reverts to the
> default format.
>
> It seems a true regression test as
> http://djangoadvent.com/1.2/i18n-l10n-improvements/ explains the right
> display. I have reverted to Django 1.2.0 and the display works
> perfectly.
>
> As you can imagine is a quite annoying bug for non-english date format
> users, perhaps enough to make a 1.2.2 release.

Are you sure that this is a regression, rather than a bugfix with
unfortunate side effects? In particular, I draw your attention to the
second note under:

http://docs.djangoproject.com/en/1.2/topics/i18n/localization/#id3

The reason for this change is that Python's date parsing libraries
aren't thread safe, so parsing internationalized date/time components
like AM/PM are problematic.

Yours,
Russ Magee %-)

Antoni Aloy

unread,
Jul 10, 2010, 4:59:11 AM7/10/10
to django-d...@googlegroups.com
2010/7/10 Russell Keith-Magee <rus...@keith-magee.com>:

> On Sat, Jul 10, 2010 at 1:15 AM, Antoni Aloy <anton...@gmail.com> wrote:

> Are you sure that this is a regression, rather than a bugfix with
> unfortunate side effects? In particular, I draw your attention to the
> second note under:
>
> http://docs.djangoproject.com/en/1.2/topics/i18n/localization/#id3
>

Well I don't know how to call it, but I just see the effects. I'm not
talking about a custom form, it's about the admin form, and I'm just
using USE_L18N=True, so I understand that admin should work in the
same way 1.2 was.

Actually you have the right display format when intering a date with
the calendar or the "today" link, but the wrong (default one) the
first time the date is displayed.

And if you modify a non date field the form will complain about the
wrong date format.

Best regards,

Horst Gutmann

unread,
Jul 12, 2010, 4:01:33 PM7/12/10
to django-d...@googlegroups.com
Did the patch that is attached to this issue work for you? It would
really be nice to get some feedback on it :-) From what I've heard in
other posts on this and the django-users list so far it seems to do
the job.

-- Horst

P.S.: Sorry if this mail reaches you a second time. Somehow Google
Groups and GMail acting up again for me :-(

On Sun, Jul 11, 2010 at 10:36 AM, Antoni Aloy <anton...@gmail.com> wrote:
> Hi,
>
> I have confirmed the bug with other non speaking people and I have
> sent an e-mail to django-i18n group to point out the problem.
>
> I have also contacted Marc and he has confirmed that the problem exists.
>
> Sorry for the insistence but in my opinion this is a blocker bug.


>
> Best regards,
>
> --
> Antoni Aloy López
> Blog: http://trespams.com
> Site: http://apsl.net
>

> --
> You received this message because you are subscribed to the Google Groups "Django developers" group.
> To post to this group, send email to django-d...@googlegroups.com.
> To unsubscribe from this group, send email to django-develop...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
>
>

Russell Keith-Magee

unread,
Jul 12, 2010, 7:35:36 PM7/12/10
to django-d...@googlegroups.com
> On Sun, Jul 11, 2010 at 10:36 AM, Antoni Aloy <anton...@gmail.com> wrote:
>> Hi,
>>
>> I have confirmed the bug with other non speaking people and I have
>> sent an e-mail to django-i18n group to point out the problem.
>>
>> I have also contacted Marc and he has confirmed that the problem exists.
>>
>> Sorry for the insistence but in my opinion this is a blocker bug.

On Tue, Jul 13, 2010 at 4:01 AM, Horst Gutmann <ze...@zerokspot.com> wrote:
> Did the patch that is attached to this issue work for you? It would
> really be nice to get some feedback on it :-) From what I've heard in
> other posts on this and the django-users list so far it seems to do
> the job.

Ok - I'll put this on my list of things to look at. I've been fairly
busy at work over the last couple of weeks, and what time I've had
left has been consumed keeping feature discussions going. Once things
settle down, I'll have more time to put into bugs.

Yours,
Russ Magee %-)

Jannis Leidel

unread,
Jul 13, 2010, 3:48:39 AM7/13/10
to django-d...@googlegroups.com

FYI, I planned to have a look at it this week, too.

Jannis

Horst Gutmann

unread,
Jul 26, 2010, 5:35:38 PM7/26/10
to django-d...@googlegroups.com

With the help of Jannis I fixed and simplified the patch at EuroPython
and afterwards. The latest version (available in the ticket and on
https://gist.github.com/ef8bce46d233c81df9d5 ) includes a change to
the admin formfield generator. In my opinion, if USE_L10N=True,
formfields should receive the localize=True flag by default for the
admin. Would this be an acceptable change?

Thank you :-)

Reply all
Reply to author
Forward
0 new messages