Sunday, January 5, 2014

Re: django 1.4 : gunicorn can't find static files. settings option

Hi Huseyin,

I have the same problem as Bo but this again did not solve my problem. This works with django webserver (runserver) but not with gunicorn.
Any Ideas?

Thanks in advance
Mahdi

On Wednesday, May 16, 2012 10:38:39 AM UTC+4:30, huseyin yilmaz wrote:
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
> But, i can't find the solution from that page.
>
> Any kind of help will be appreciated
>
> Thanks

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6e99aaf4-44e9-4fff-8ada-d5fc96e55d7b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment