Open pbrenna opened 4 years ago
I had the same issue. Worked fine on my local but when I deployed to staging I hit this issue. My site is set up to run in a non-root path. I was getting a 404 error after logging into the admin interface. Changing match = resolve(request.path)
to match = resolve(request.path_info)
in get_model_perms() in childadmin.py made the error go away.
The function
get_model_perms
inadmin/childadmin.py
can't resolve a match for the /admin/ path in setups where the wsgi parameter SCRIPT_NAME is set, becauserequest.path
seems to be prepended with the SCRIPT_NAME. An error 404 is returned instead of the admin homepage.In my setup, using
request.path_info
instead works for me.