#30272: get_language_from_request(..., check_path=True) not respecting
i18n_patterns prefix_default_language=False
--------------------------------------+------------------------------------
     Reporter:  Stefan Wehrmeyer      |                    Owner:  nobody
         Type:  Bug                   |                   Status:  closed
    Component:  Internationalization  |                  Version:  2.1
     Severity:  Normal                |               Resolution:  wontfix
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by Carlton Gibson):

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


Comment:

 OK, with time to come back to this I'm going to say `wontfix` here. The
 current behaviour is correct.

 > But currently there are cases when LocaleMiddleware will set a different
 language on the request than is returned by get_language_from_request –
 which makes this public API inconsistent IMHO.

 Right, sure, but `get_language_from_request()` operates over **just the
 request** whereas `LocaleMiddleware` operates over the **request plus your
 site configuration**. These aren't the same inputs, so it's not expected
 that they have the same results.

 > This could certainly be solved in Django CMS as well.

 Yes. I think that's the correct response, and indeed, [https://github.com
 /django-cms/django-cms/pull/6851/files#diff-
 451cc2fd73e55d14cc72681ebdd8c201021f27c60ecdebb55760d2bb6c8794b6L89-R92
 that's what they've done].

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30272#comment:11>
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.cc09e6cf723a9d81e274260a7159395a%40djangoproject.com.

Reply via email to