Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Dec. 8, 2010 18:56:12

Nuño I.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django template tags.


Hi, i think it's the first time i write to this list, so
Hello to everybody...¡¡


Well, now my problem.
I'm trying to use "template filters" in one of my templates.

What i'm trying to do is this:
{{ mystring | upper }}
to convert "mystring" into upper-case.

but Django is complaining:
TemplateSyntaxError at /
Could not parse the remainder:'| upper' from 'row.0 | upper'

I suppose I've forgotten to import something...but I cant find it.

Any help ?

Thanks.

Nuño

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Dec. 8, 2010 19:01:11

Łukasz R.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django template tags.


2010/12/8 Nuño Iglesias <respira...@respirando.org>:
>
> What i'm trying to do is this:
>   {{ mystring | upper }}
> to convert "mystring" into upper-case.

AFAIR, there should be no spaces before or after "|": {{ variable|upper }}


--
Łukasz Rekucki

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Dec. 8, 2010 19:09:24

Nuño I.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django template tags.


El Wed, 8 Dec 2010 20:00:42 +0100
Łukasz Rekucki <lreku...@gmail.com> escribió:
> 2010/12/8 Nuño Iglesias <respira...@respirando.org>:
> >
> > What i'm trying to do is this:
> >   {{ mystring | upper }}
> > to convert "mystring" into upper-case.
>
> AFAIR, there should be no spaces before or after "|":
> {{ variable|upper }}
>
>
Ups :-s


Thanks a lot, I have been 40 minutes reading about the marvellous
template system...getting crazy¡¡¡¡
Now I fell stupid...but very happy :)
Thanks a lot Łukasz



--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 23rd of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support