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

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -