-
Notifications
You must be signed in to change notification settings - Fork 145
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
generated urls missing end / #89
Comments
problem with that though is that it's designed to display the endpoints without a slash so when it does have a slash it look like a list of / but really you shouldn't be relying on a 302 redirect to get to the right place from some middleware that might not be enabled |
Actually this is on purpose to match the swagger specifications |
Its not a matter of middleware btw but just a settings (APPEND_SLASH) |
you sir are correct. I found this issue when I put in a catch all that matches everything not matched by other urlconfs (because we needed to redirect old links) and that broke swagger. I've made it a negative match. If the url matched the url conf it wouldn't be affected. Looking at swagger when it works, you see a bunch of 301 redirects, so fixing this would improve performance slightly (and help others who have the setting off, or urls confs that will match) |
We are open to PR ;) |
removed trailing slash to resolve tastypie endpoints correctly (not relying on append slash). See issue concentricsky#89
In views.py we have:
it's creating links like /schema/resource
but in urls.py we have
note that it has a trailing slash
fix is to change the a line to:
People aren't seeing the issue because there is usually middleware which adds a slash for when it 404s making it work.
The text was updated successfully, but these errors were encountered: