#32379: Documentation: hypercorn and static files
-----------------------------------------------+------------------------
Reporter: Sven R. Kunze | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.staticfiles | Version: 3.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------------+------------------------
Coming from the age-old problem of service static files, the usual process
looks like this:
1) ✅develop and test using {{{ manage.py runserver }}} and everything
just works fine
2) ✅ deploy code using WSGI or ASGI as described in the docs
3) ❌ find out that static files are missing
Specifically referring to
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/hypercorn/
As there is a dedicated documentation page for hypercorn, it doesn't look
like there's a need for thinking of serving static files.
A friend of mine suggested to use whitenoise:
https://github.com/evansd/whitenoise
Would it make sense to integrate this into the Django docs?
To be transparent here, I started also different threads on different
channels but it seems like nobody really wants to tackle this issue, so I
thought addressing the issue at least via Django sounds reasonable because
it's a Web framework:
here: https://softwarerecs.stackexchange.com/questions/77600/simple-and-
secure-command-line-http-server
and there: https://gitlab.com/pgjones/hypercorn/-/issues/173
from another guy: https://gitlab.com/pgjones/hypercorn/-/issues/45
As of now, I addressed my real-world setup by setting up a "mini"-nginx
for now, serving static files and proxying hypercorn, but that does not
feel like a holistic solution; also when it comes to automated deployment,
permissions, principles such as "test as you fly, fly as you test" etc.
it's a lot more brittle.
--
Ticket URL: <https://code.djangoproject.com/ticket/32379>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.3004c7cbd01d11514133cf93459cff1e%40djangoproject.com.