python - trouble trying to show an image from my static folder in a django template -


im trying show image in template if profile haven't picture. have code in template

{% if not profileform.avatar %}    <img src="{% static 'img/empty-profile-picture.png' %}" alt="" /> {% endif %} 

and obtain error

template error: in template /home/jaime/djcode/urgencias/templates/usuarios/profile_edit.html, error @ line 68    invalid block tag: 'static', expected 'elif', 'else' o 'endif' 

you've got typo - keyword static, not satic.


Comments

Popular posts from this blog

c# - Class in a list -

mysql - Django database model for my website -

ios - How to run a segue on itself OR another viewController -