Re: Template filters and translations to russian language

2012-03-07 Thread Denis Darii
x27;) On Wed, Mar 7, 2012 at 12:20 PM, Tom Evans wrote: > On Wed, Mar 7, 2012 at 9:38 AM, filias wrote: > > Hi, > > > > I am developing a website in russian and the original is in english. We > are > > using the po file to translate the strings. > > > > My

Re: Template filters and translations to russian language

2012-03-07 Thread Tom Evans
On Wed, Mar 7, 2012 at 9:38 AM, filias wrote: > Hi, > > I am developing a website in russian and the original is in english. We are > using the po file to translate the strings. > > My problem now is that when I use template filters, for example date or > localnaturalday th

Template filters and translations to russian language

2012-03-07 Thread filias
Hi, I am developing a website in russian and the original is in english. We are using the po file to translate the strings. My problem now is that when I use template filters, for example date or localnaturalday the translations do not appear. Everything appears in english. However, if I

Re: Passing variables to template filters

2011-02-04 Thread Andres Lucena
On Fri, Feb 4, 2011 at 11:07 AM, Tom Evans wrote: > On Fri, Feb 4, 2011 at 9:53 AM, Andres Lucena wrote: >> Hi, >> >> In my base.html I'm trying to do this: >> >>        {% block title %}{{title|default:"{{SITE_NAME}}"}}{% >> endblock %} >> >> But I'm getting this: >> >> TemplateSyntaxError at /

Re: Passing variables to template filters

2011-02-04 Thread Tom Evans
On Fri, Feb 4, 2011 at 9:53 AM, Andres Lucena wrote: > Hi, > > In my base.html I'm trying to do this: > >        {% block title %}{{title|default:"{{SITE_NAME}}"}}{% > endblock %} > > But I'm getting this: > > TemplateSyntaxError at / > default requires 1 arguments, 0 provided > > So, SITE_NAME is

Passing variables to template filters

2011-02-04 Thread Andres Lucena
Hi, In my base.html I'm trying to do this: {% block title %}{{title|default:"{{SITE_NAME}}"}}{% endblock %} But I'm getting this: TemplateSyntaxError at / default requires 1 arguments, 0 provided So, SITE_NAME is not passed to the filter. As a workaround I did this: {% block

Re: Template Filters

2009-08-22 Thread WilsonOfCanada
For reference: http://google-ctemplate.googlecode.com/svn/trunk/doc/auto_escape.html --~--~-~--~~~---~--~~ 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

Re: Template Filters

2009-08-20 Thread Matthias Kestenholz
On Thu, Aug 20, 2009 at 4:11 AM, WilsonOfCanada wrote: > > Hellos, > > I was wondering if there is a filter that can remove these '\' that > python added when strings are appended to a list or dictionary.  I > cannot use cut because I still need one of the '\' > > ex.  C:\\moo > > Code: > > arrPla

Template Filters

2009-08-19 Thread WilsonOfCanada
Hellos, I was wondering if there is a filter that can remove these '\' that python added when strings are appended to a list or dictionary. I cannot use cut because I still need one of the '\' ex. C:\\moo Code: arrPlaces = [] intPoint =0 while (len(testline)): testline = fileName.re

Re: Tastiest show-off Django template filters

2009-06-09 Thread Nicolas R
So what do these filters (humanise, typogrify) do? I would suggest a truncatesentences, to go along with truncatewords Daniele Procida wrote: > I'm doing a demo of some of our Django work soon. Partly, it'll be a > showcase for Django. One thing I'd like to do is demonstrat

Tastiest show-off Django template filters

2009-06-02 Thread Daniele Procida
I'm doing a demo of some of our Django work soon. Partly, it'll be a showcase for Django. One thing I'd like to do is demonstrate Django's template filters, to show how powerful it is and how it can make a a contribution to the quality of web output. So far I have: * typog

Re: running template filters after the page has loaded.

2008-12-08 Thread R. Gorman
You're likely going to need to need to run to urlencode function within the view that processes your ajax request. Should be able to import using 'from urllib import urlencode' and then 'urlencode(*your string variable*)'. R. --~--~-~--~~~---~--~~ You received thi

running template filters after the page has loaded.

2008-12-08 Thread tod
I have an ajax-style update to a page that inserts html into the page after it has already loaded (and run template filters, etc). Is there a way to have the template filters run on the inserted html. Here are the specifics: A list of folders is displayed upon the initial load of the page

Re: Using template filters inside condition statements

2007-03-13 Thread bgcooper
> First, you could see 'choices' parameter in CharField or IntegerField, > and django has a handly function get_FOO_display() to get the > corresponding string value of a special key, just like what you want. > In db_api document, searcin get_FOO_display you'll get the answer. This is handy to kn

Re: Using template filters inside condition statements

2007-03-13 Thread limodou
On 3/14/07, bgcooper <[EMAIL PROTECTED]> wrote: > > Our app uses a number of state integers mapped to names inside a > dictionary. The state stored in the model is an integer and we use the > dictionary to pull out the names whenever we want to. > > We have a custom template filter to get the name

Using template filters inside condition statements

2007-03-13 Thread bgcooper
Our app uses a number of state integers mapped to names inside a dictionary. The state stored in the model is an integer and we use the dictionary to pull out the names whenever we want to. We have a custom template filter to get the names from the template context. e.g. {{ message.state|stateNa