-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resolve(reverse()) doesn't work when using WSGI / FORCE_SCRIPT_NAME #11716
Labels
Comments
11 tasks
@jacobtylerwalls - Thanks for having a look. PR is here: #11717 |
11 tasks
jacobtylerwalls
added a commit
that referenced
this issue
Jan 17, 2025
jacobtylerwalls
added a commit
that referenced
this issue
Jan 17, 2025
jacobtylerwalls
added a commit
that referenced
this issue
Jan 17, 2025
jacobtylerwalls
added a commit
that referenced
this issue
Jan 17, 2025
jacobtylerwalls
added a commit
that referenced
this issue
Jan 17, 2025
jacobtylerwalls
added a commit
that referenced
this issue
Jan 17, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For WSGI applications hosted behind Apache in a sub-path,
resolve(reverse(<view name>))
doesn't work. This is currently used inapp/search/search_export.py
(where the issue was found) and inapp/etl_modules/save.py
.The
reverse
function prepends the URL with the value of settings.FORCE_SCRIPT_NAME, andresolve()
can't find it.For our implementation we have a reverse proxy directing traffic from
https://hostname/bc-fossil-management
to the Arches WSGI application. We have the FORCE_SCRIPT_NAME set to/bc-fossil-management/
. All requests through the reverse proxy function as expected, but when running an export via Celery the search URL can't be found. The cause for this is thatreverse("search_results")
returns/bc-fossil-management/search/results
but the path expected by the URL resolver is/search/results
.Fixed in our instance by change the following:
to
Looks like this was introduced in this commit: a4d11bd
The above seems to work however there may be a cleaner solution.
The text was updated successfully, but these errors were encountered: