try to use :
"{% static "mysite/scorr{{a}}" %}"
"{% static "mysite/scorr{{a}}" %}"
Many thanks,
Serge
+380 636150445
skype: skhohlov
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 configuredBut why if i write <img src="{% static "mysite/scorr/myfile.jpg" %}" width="100" height="100" </img> i get the imageand if i write <img src="{% static "mysite/scorr/{{a}}" %}" width="100" height="100" </img> where a is the file name i can't get?The path isF:\Sito_01_03_16\test\nuovo\myproject\mysite\static\mysite\scorrThanks for your help
Il giorno mercoledì 2 marzo 2016 11:52:05 UTC+1, Sergiy Khohlov ha scritto:original path og your image please.Also setting for STATIC_ROOT from setting.py send pleaseOn Wed, Mar 2, 2016 at 12:41 PM, 'luca72' via Django users <django...@googlegroups.com> wrote:Hello i have write this in a template:--{% for a in lista %}<img src="{% static "mysite/scorr/{{a}}" %}" width="100" height="100" </img>{% endfor %}But i get no imageif i add just a <p> {{a}} </> i see that the file name is righ,also if i direct write the file i get it{% for a in lista %}<img src="{% static "mysite/scorr/myfile.jpg" %}" width="100" height="100" </img>{% endfor %}can you tell me what is wrongThanks
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9a12167f-e919-4632-b77a-6d5acc80fd3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e23e424c-0105-4b11-878c-86bb9dbe5613%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CADTRxJNYVrCFyqcnnZhbQqF-Kd-AnB0K3hYWtBj9BtibtELpyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment