I have problems with setting up static files in my Django project on development server. I'm using Django-1.6.1 with Python 2.7.5+.
I followed the instrucions from this link: Managing static files (CSS, images)
So, i added django.contrib.staticfiles into INSTALLED_APPS
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'BlogContent',
)
I set up STATIC_URL:
STATIC_URL = '/static/'
And i also modify my urls.py to this:
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^$', home_view ),
url(r'^about/$', about_view )
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
In template i use this tag:
{% load staticfiles %}
<img src="{% static "elo.jpg" %}"/>
And all files are into project_root/static/ and after run server i recieve this:
"GET /static/elo.jpg HTTP/1.1" 404 1625
Do you have any ideas how to solve it ? Thank you in advance for help.