Waylan Limberg wrote: >On 3/13/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > >>On Mon, 2006-03-13 at 23:17 -0500, Waylan Limberg wrote: >> >> >>>I'm trying to format my dates with escaped characters in the format. >>>However, I can only seem to get them to work with the 'now' template >>>tag, but not the 'date' filter. Some examples: >>> >>> {% now "jS o\f F" %} >>> >>>will return '13th of March' as it should. But if I do this in the template: >>> >>> {{ post.pub_date|date:"jS o\f F" }} >>> >>>I get '13th o9:54 March' instead. >>> >>> >>OK, that's a bug. The problem is that django,util,dateformat.format is >>being passed the format string with the backslash already removed. Not >>sure why that is happening yet, but it's a real bug. >> >>I am not going to have time to look at it this afternoon, so you should >>probably open a ticket for it so that we don't lose the problem report. >> >> > >Wow! I found a "real bug". Anyway, submitted as Ticket #1498. > > This is a duplicate of #1198. I took a look at this during the Django sprint at PyCon. In django/template/__init__.py at line 524, the contanst_arg is stripped of any backslashes. I'm not sure why this is done; I'll leave the fix to those who understand the code a little better than I do!
Duncan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---