Re: variable to a template

2016-04-09 Thread Chris Bartos
There are probably 3 ways you can do this: 1) Use a Filter You should be able to use the "add" filter to concatenate two strings. 2) Map the elements of your array in your v

Re: variable to a template

2016-03-02 Thread Fred Stluka
Luca, You can't nest a variable evaluation (via {{}}) inside a tag execution {%%}. But you can put them side by side to achieve the effect you want: '{% static "mysite/scorr" %}'/{{a}}' --Fred Fred Stluka -- mailto:f...@b

Re: variable to a template

2016-03-02 Thread raoul
Hi Luca, Did {{ a }} solve the problem? Cheers, Raoul On Wednesday, March 2, 2016 at 2:12:46 PM UTC+1, luca72 wrote: > > Thanks now it works > > Luca > > Il giorno mercoledì 2 marzo 2016 14:05:24 UTC+1, Andreas Schosser ha > scritto: >> >> Hi Luca, >> >> > > > height="100" >> >>

Re: variable to a template

2016-03-02 Thread 'luca72' via Django users
Thanks now it works Luca Il giorno mercoledì 2 marzo 2016 14:05:24 UTC+1, Andreas Schosser ha scritto: > > Hi Luca, > > > > height="100" > > Try {% static "mysite/scorr/"|add:a %} > > Andreas > > -- > Kurs 10 IT-Consulting www.kurs-10.de > Andreas Sc

Re: variable to a template

2016-03-02 Thread Andreas Schosser
Hi Luca, > height="100" Try {% static "mysite/scorr/"|add:a %} Andreas -- Kurs 10 IT-Consulting www.kurs-10.de Andreas Schosser a...@kurs-10.de Baldestraße. 14 Telefon +49 89 41615842-0 80469 Münche

Re: variable to a template

2016-03-02 Thread Sergiy Khohlov
try to use : "{% static "mysite/scorr{{a}}" %}" Many thanks, Serge +380 636150445 skype: skhohlov On Wed, Mar 2, 2016 at 1:00 PM, 'luca72' via Django users < django-users@googlegroups.com> wrote: > Hello Thanks for your reply > > STATIC_URL = '/static/' > > I have no static root configured

Re: variable to a template

2016-03-02 Thread 'luca72' via Django users
Hello Thanks for your reply STATIC_URL = '/static/' I have no static root configured But why if i write i get the image and if i write where a is the file name i can't get? The path is F:\Sito_01_03_16\test\nuovo\myproject\mysite\static\mysite\scorr Thanks for your help Il giorno me

Re: variable to a template

2016-03-02 Thread Sergiy Khohlov
original path og your image please. Also setting for STATIC_ROOT from setting.py send please Many thanks, Serge +380 636150445 skype: skhohlov On Wed, Mar 2, 2016 at 12:41 PM, 'luca72' via Django users < django-users@googlegroups.com> wrote: > Hello i have write this in a template: > {% fo

variable to a template

2016-03-02 Thread 'luca72' via Django users
Hello i have write this in a template: {% for a in lista %} {% endfor %} But i get no image if i add just a {{a}} i see that the file name is righ, also if i direct write the file i get it {% for a in lista %} {% endfor %} can you tell me what is wrong Thanks -

Re: How do you pass a variable to a template tag?

2007-02-13 Thread [EMAIL PROTECTED]
Thank you Aidas. As it turns out, I already had a foreignkey relationship with my user, so I didn't need a template tag at all. Good to know how to do it, though. On Feb 13, 10:27 am, "Aidas Bendoraitis" <[EMAIL PROTECTED]> wrote: > Hello Baxter! > > Take a look at my approach. It might help you

Re: How do you pass a variable to a template tag?

2007-02-13 Thread Aidas Bendoraitis
Hello Baxter! Take a look at my approach. It might help you. The following template tag "load_obj" loads any object by id and saves passes it to the template context variable: # code starts here from django.db.models import get_model from django import template register = template.Lib

How do you pass a variable to a template tag?

2007-02-09 Thread [EMAIL PROTECTED]
I need to pass a user id to a template tag. After reading this: http://groups.google.com/group/django-users/ browse_thread/thread/96fe34b4561415dc/b7aba25f22bdd261? lnk=gst&q=template+tags+variable&rnum=1#b7aba25f22bdd261 I came up with: class SongListNode(template.Node): def __init__(self,