#35985: FORCE_SCRIPT_NAME ignored when running reverse() on non-main thread
-------------------------------------+-------------------------------------
Reporter: Pēteris Caune | Owner: (none)
Type: | Status: closed
Cleanup/optimization |
Component: Core (URLs) | Version: dev
Severity: Normal | Resolution: wontfix
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 Pēteris Caune):
Hey Florian,
Thanks for the advice! I did eventually get SCRIPT_NAME/FORCE_SCRIPT_NAME
to work, but your approach looks better. It avoids the hacks I'm using –
* needing to use set_script_prefix in threads (this issue)
* chopping off the prefix before passing the URL to django.urls.resolve
(#31724)
* uwsgi magic which parses an env var, sets SCRIPT_NAME and fixes
PATH_INFO
And, as a bonus, this works even with `manage.py runserver`. So I'm
switching to it :-)
--
Ticket URL: <https://code.djangoproject.com/ticket/35985#comment:6>
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 visit
https://groups.google.com/d/msgid/django-updates/01070193ddfdaa7d-64fbef9a-2857-4f0e-a8eb-473d58340670-000000%40eu-central-1.amazonses.com.