Yes, that is obvious, forgot to mention this. I would be happy to get rid of staticfiles completely, but several Django apps we use depend on it. Namely "debug_toolbar" and "django_rest_framework". I suppose staticfiles declares some keywords for templates those apps use.
пятница, 12 мая 2017 г., 22:06:17 UTC+3 пользователь Andrew Godwin написал: > > Have you tried removing the staticfiles app from INSTALLED_APPS? I believe > that will disable it even with runworker. > > Andrew > > On Fri, May 12, 2017 at 11:14 AM, Alexander Prokhorov <[email protected] > <javascript:>> wrote: > >> Dear Colleagues, in particular Andrew ;) >> >> I have a problem with making Channels serve static files. The issue >> concerns running `./manage.py runworker` which (according to the Getting >> Started with Channels guide) serves static files if Django run in DEBUG >> mode. Actually, I would like to disable serving static files completely >> because I always use Whitenoise in both development mode and in production. >> Providing `--nostatic` to `runserver` command does the trick, but only if >> workers run in-process. >> In my setup I separate server from workers, so I run server as >> `./manage.py runserver --nostatic --noworker` and run workers separately >> with `./manage.py runworker --only-channels...`. Unfortunately in this case >> workers continue serving static files if they run in DEBUG mode, but the >> whole point of `--nostatic` is to disable serving static even in DEBUG mode >> (in production mode it is disabled by default AFAIR). >> >> Is there any workaround? >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django developers (Contributions to Django itself)" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/django-developers. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-developers/e6a3cbb8-363d-415b-be61-610d9cc50f58%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-developers/e6a3cbb8-363d-415b-be61-610d9cc50f58%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/ac8eb115-71a6-4280-bec9-240f0df7e171%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
