I have followed the doc for Managing static files in django 1.5.8
Make sure that django.contrib.staticfiles is included in your INSTALLED_APPS.
Done, and 'django.contrib.staticfiles.finders.AppDirectoriesFinder' is in my STATICFILES_FINDERS
In your settings file, define STATIC_URL, for example:
STATIC_URL = '/static/'
Done
My HTML (for test) :
{% load staticfiles %}
"{% static 'selfcareapi/header_selfcare_api.png' %}"
Then
Store your static files in a folder called static in your app. For example my_app/static/my_app/myimage.jpg.
Here is my file organisation :
Project
|
|-selfcareapi
| |
| |-views.py
| |-static
| |
| |-selfcareapi
| |
| |-header_selfcare_api.png
|-templates
|
|-selfcareapi
|
|-my_html.html
The rendered html give me
/static/selfcareapi/header_selfcare_api.png
Which seems OK.
When I runserver and go to : localhost/static/selfcareapi/header_selfcare_api.png, I have a 404 error...
Why does not runserver serve the static files ?