python - Load static files with django template tag -


i trying load image files saved in static directory not seem it

<div>   {% thumbnail image.user.profile.photo "40" in %}      <a href="{{ image.user.get_absolute_url }}">          <img src="{{ in.url }}" class="gametime"></a>    {% endthumbnail %}   <a href="{{ image.user.get_absolute_url }}" class="time">{{image.user.username }}  </a>     </div>  <div id="details">  {% thumbnail image.image "551" im %}       <a href="{{ image.image.url }}">          <img src="{{ im.url }}" alt="{{ image.title }}"class="image-detail">      </a>   {% endthumbnail %} </div> 

i tried <img src="{% static "rango.jpg" %}" alt="picture of rango"> , displayed rango.jpg image.

i think need {% static %} tag accomplish image variable still have not gotten right.

did u setup static path in settings file.

static_url = '/static/' static_root = os.path.join(base_dir, 'static/') 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

.htaccess - ERR_TOO_MANY_REDIRECTS htaccess -