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
I've successfully connected two django apps using django-rest-models 1.9.2, but I was facing following issue
When I've left everything in default as per tutorials (rest_framework and dynamic_rest on API server side and rest_models on client side) I was unable to run client application due to error:
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:
ERRORS:
services.ServiceBase: (rest_models.E001) the remote api does not respond to us. OPTIONS http://localhost:8000/servicebase => 301
HINT: check the url for the remote api or the resource_path
It's because request is lacking the trailing slash. So API server responds with 301 redirect, but rest_models fail, because it's not 200 -
According to requestsdocs it should follow 301 redirect automatically for GET, OPTIONS, POST, PUT, PATCH or DELETE. Only where you need to explicitly enable it is HEAD.
But I'm not sure how exactly we use requests and if we should change something under ApiVerbShortcutMixin in
I've successfully connected two django apps using django-rest-models 1.9.2, but I was facing following issue
When I've left everything in default as per tutorials (rest_framework and dynamic_rest on API server side and rest_models on client side) I was unable to run client application due to error:
It's because request is lacking the trailing slash. So API server responds with 301 redirect, but rest_models fail, because it's not 200 -
django-rest-models/rest_models/checks.py
Line 33 in 3750a4b
To bypass this I've changed my API - passed extra parameter to router constructor in
urls.py
(bellow). But I'd prefer original behavior.Thanks!
The text was updated successfully, but these errors were encountered: