#31184: URL dispatcher docs should mention path_info
-------------------------------+--------------------------------------
     Reporter:  Roy Smith      |                    Owner:  nobody
         Type:  Uncategorized  |                   Status:  new
    Component:  Uncategorized  |                  Version:  2.2
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by Roy Smith):

 Also, the docs for urls.staticfiles_urlpatterns() (i.e.
 https://docs.djangoproject.com/en/2.2/ref/contrib/staticfiles/) should
 also mention that staticfiles_urlpatterns() will produce incorrect
 patterns for an environment where request.path differs from
 request.path_info.  I suppose you could add additional configuration
 options to handle this case properly, but I think it would be good enough
 to point out the issue and note that you need to fall back to writing the
 re_path() expression yourself.  And, in that case, the statement:

 {{{
 Note, the beginning of the pattern (r'^static/') should be your STATIC_URL
 setting.
 }}}

 is not correct.  It needs to be STATIC_URL, as modified by the upstream
 web server.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31184#comment:1>
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/066.36ea776617c29a33368fdacb84d8a2ef%40djangoproject.com.

Reply via email to