On Tue, Aug 18, 2009 at 7:08 PM, Margie
Roginski<margierogin...@yahoo.com> wrote:
>
> I was trying to figure out how to run the date filter, using
> SETTINGS.DATETIME_FORMAT as an argument.
>
> When I grepped in the admin app I found this in object_history.html:
>
> {{ action.action_time|date:_("DATETIME_FORMAT") }}
>
> Can anyone give me a pointer as to how this works?  What is '_' in
> this case, and where is it defined?  I see {% load il8n %}, but it is
> very hard to grep for '_', can seem to see where it is being defined
> there.

Sure, the "DATETIME_FORMAT" literal is what we call a technical
message: A clever idea to give translators a way to determine
a few local-dependant info bits (usually date/time output formatting)
using the same infrastructure and tools used for translations
(hence the _()):

http://docs.djangoproject.com/en/dev/topics/i18n/#id2

(last item in the list).

If I understand things correctly, if/when Marc's GSoC work on this
front gets merged, in 1.2 this will be replaced by similar but
more explicit ways to specify the same info.

HTH

-- 
Ramiro Morales
http://rmorales.net

PyCon 2009 Argentina - Vie 4 y Sab 5 Setiembre
Buenos Aires, Argentina
http://ar.pycon.org/2009/about/

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to