You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@JustinTArthur I'm using django-angular to populate the apis urls in the template and django-rest-framework as an api "backend". The problem is when I'm trying to do a query or a get without the id, it leaves two trailing slashes resulting in a 404 Not Found.
In this case, django-angular creates the following model-list and model-detail urls:
"/api/app/model/.:format"
"/api/app/model/:pk/.:format"
I thought I should be able to use model-detail as the main url because it should simply ignore empty parameters but instead is making a GET request to "/api/app/model//" (two slashes) resulting in 404. I think the :format parameter might be the problem here.
For now I can hardcode the url "/api/app/model/:pk" or "/api/app/model/:pk/" and it works but for simplicity I would prefer using django-angular.
Was the "Trailing slashes allowed in the resource URLs per the Django community norm." feature added in the 1.3.x release of Django (see: https://docs.angularjs.org/api/ngResource/service/$resource and https://github.com/angular/angular.js/blob/master/CHANGELOG.md)
The text was updated successfully, but these errors were encountered: