daphne icon indicating copy to clipboard operation
daphne copied to clipboard

--noasgi won't serve static files

Open JulienPalard opened this issue 9 months ago • 2 comments

When running ./manage.py runserver --noasgi I don't get static files served.

This is because both daphne and django.contrib.staticfiles provides a runserver replacement. Running daphne's runserver with --noasgi just cause the real runserver to be used, giving no chance to the staticfiles runserver.

I don't know if there's an elegant solution here, maybe shadowing commands are not a good idea (I don't blame daphne, staticfiles does the same :D).

Maybe the elegant solution is to link from https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/daphne/ to https://docs.djangoproject.com/en/5.0/ref/contrib/staticfiles/#django.contrib.staticfiles.views.serve for easy finding?

Running Django 5.0.6 with daphne 4.1.2 on Debian Trixie.

JulienPalard avatar May 14 '24 16:05 JulienPalard