0

I want to associate a REST API end point to two urls, "manager" and "manager/". So I added two path entries in the urlpatterns with these urls. But it seems something that can be handled with some kind of configuration. Is there such a configuration with django?
thanks

2
Contributors
1
Reply
22
Views
2 Weeks
Discussion Span
Last Post by rproffitt
1

I admit I won't answer this directly but let's figure out first what happens with and without the forward slash. I'll defer to
https://www.thoughtco.com/urls-ending-with-slash-3466509

OK, that's a good clue how you might handle this. Since no slash forces a redirect, that's my clue to see how Django redirects. For that you have to scour your Django docs. Like this one: https://docs.djangoproject.com/en/2.0/ref/contrib/redirects/
Read until it sinks in. To me that's where your magic has to happen.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.