New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serving static files on Django (Channels) #193
Comments
I'm not quite sure what you mean - daphne itself doesn't have any configuration for serving static files. eg. see django/channels#87 (Although running Django Channels does support it, and you can use either |
@tomchristie excuse my terrible explanation please. I am just new to all this ASGI logic. I am running Django Channels 2 right now. I was using Django Channels 1.x with Daphne as explained in documentation, and the server was serving static files by adding Django Channels 2 should do this automatically in the routing file? The command I am running: Should I expect Django Channels to serve stating files after running this? |
Or does this require configuration on Django Channels side which is not really related to Uvicorn? |
Exactly, yup. |
Hey there. I am trying to replace Daphne with Uvicorn. Daphne was allowing to serve static files even though it wasn't ideal.
Now I replaced it, and it works fine right now on staging server, but I am not able to serve static files through Gunicorn with Uvicorn worker. I am on Heroku, so nginx is not an option. I know it would be easier though.
I am using the latest version of everything. Is there any undocumented hack around this?
I wanted to serve the static files over S3 with django_storage but there are hardcoded static urls in css and js files. This creates complexity.
Thanks.
The text was updated successfully, but these errors were encountered: