4👍
✅
It looks like you haven’t reloaded your web app since adding the virtualenv activation to your wsgi file, or you’re not using the wsgi file that you think you’re using. The error location that Django is reporting (/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py) is in the default system Django on PythonAnywhere , not the Django in your virtualenv.
0👍
Try:
{% load static from staticfiles %}
And now you can use it in this way:
{% static "images/hi.jpg" as myphoto %}
<img src="{{ myphoto }}" alt="Hi!" />
This example is from django doc for 1.7 version/
- [Django]-Monkeypatching views with Django's LiveServerTestCase
- [Django]-How can I do such a typical unittest?
- [Django]-Django: request.META['REMOTE_ADDR'] is always '127.0.0.1'
Source:stackexchange.com