Re: explanation of: {{ action.action_time|date:_("DATETIME_FORMAT") }}

2009-08-19 Thread Margie

Ah, thank you very much!  That makes more sense now.

Margie

On Aug 18, 4:30 pm, Ramiro Morales  wrote:
> On Tue, Aug 18, 2009 at 7:08 PM, Margie
>
> Roginski 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 Moraleshttp://rmorales.net
>
> PyCon 2009 Argentina - Vie 4 y Sab 5 Setiembre
> Buenos Aires, Argentinahttp://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
-~--~~~~--~~--~--~---



Re: explanation of: {{ action.action_time|date:_("DATETIME_FORMAT") }}

2009-08-18 Thread Ali Rıza Keleş

Please look up at the top of your codes, i think you'll see something
like this:

from django.utils.translation import ugettext_lazy as _

That's it!..

--
Ali Rıza

On Tue, 2009-08-18 at 15:08 -0700, Margie Roginski 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.
> 
> Margie
> 
> 
> > 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: explanation of: {{ action.action_time|date:_("DATETIME_FORMAT") }}

2009-08-18 Thread Ramiro Morales

On Tue, Aug 18, 2009 at 7:08 PM, Margie
Roginski 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
-~--~~~~--~~--~--~---



explanation of: {{ action.action_time|date:_("DATETIME_FORMAT") }}

2009-08-18 Thread Margie Roginski

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.

Margie


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---