#32379: Documentation: hypercorn and static files
-------------------------------------+-------------------------------------
     Reporter:  Sven R. Kunze        |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  closed
    Component:  contrib.staticfiles  |                  Version:  3.1
     Severity:  Normal               |               Resolution:  duplicate
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 Hi Sven. Not really sure what to say here.

 I think it's a reasonable assumption that by the time you're deploying
 with ASGI you've already established your strategy for handling static
 files (or, at least, are intimately aware of the wiggles).

 If you're just thinking about development, then we have #31626 to add
 support for ASGI to runserver. Until then, I think it's up to the
 individual servers (or users of those) to provide a static files solution.
 Channels provides a `runserver` implementation, including a static files
 middleware precisely for this.

 Then, deploying behind nginx is the Standard Solution™ (if there is one) —
 you're are always meant to deploy Django behind a proxy, since protocol
 servers (Gunicorn, uWSGI, Daphne, uvicorn, etc) all expect that. (Why?
 Because they're deliberately not battle hardened to be exposed to the
 internet.)

 Given that, having nginx serve your static files is the natural move.
 ("natural" and "holistic", whilst clearly not cognates, inhabit a close
 enough space I'd say. :)

 This topic comes up on the DevelopersMailingList a couple of times a year
 I'd say. My summary would be that there are so many options and opinions
 on how to do it that we never reach anything close to a consensus for a
 new feature. `contrib.staticfiles`'s `collectstatic` works well but what
 you do beyond that seems to be out of scope for Django itself.

 Closing as a duplicate of #27325 — but TBH I'm not even sure there's
 really consensus for merging that. (There may be, with sufficient opt-
 outs...)

 Hope that's sufficiently explanatory. It would be nice if it were simpler
 I do grant, but after all this time we're still lacking a proposal that
 folks agree on as an improvement…

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32379#comment:2>
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/065.dbdb496d28909d30b164c0e1c3c647d7%40djangoproject.com.

Reply via email to