For development, you could add this to main urls.py like this.
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.STATIC_ROOT, 'show_indexes':True}),
But for production use your web server to serve static files.
At least this is how I solved it. I hope that helps.
On May 16, 5:56 am, Bolang <
boo.l...@gmail.com> wrote:
> Hi,
> I just started to using django 1.4 with gunicorn 0.14.3
> With ./manage.py runserver , i can start django properly and django can
> find my files in static directory.
> Then i use gunicorn and then gunicorn can't find my files in static
> directory.
>
> I have tried these combination
> gunicorn myproject.wsgi:application --settings myproject.settings
> gunicorn myproject.wsgi:application --settings /absolute/path/to/settings.py
> ./manage.py run_gunicorn --settings=myproject.settings
>
> All of the commands can start django, but can't find my files in static
> directory
>
> I also found this issuehttps://
github.com/benoitc/gunicorn/issues/322