when I\'m using following Python code to send a POST request to my Django website I\'m getting 403: Forbidden error.
url = \'http://www.sub.domain.com/\'
values
I too had this problem, because I Tried to access the Main endpoint from another endpoint using '../url'
URL Jumping.
My Solution was to add another path for the same viewset;
router.register('main/url',ViewSet,'name');
router.register('secondary/url',ViewSet,'name')
But in Your Case You are Trying to access it from a completely different Location, From Django's Point of view So You need to mark you ViewSet with @crsf_exempt
middleware which will Disable Security Protocols Related to CRSF.