Cross-Origin Request Blocked:(Solved)

The problem occurs when I tried to get/send request to other site developed in django. Actually I wanted to handle my app from other app with Json response. The error message is:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http//127.0.0.1:8000/card-active-deactive/1233459225/161-10-124/active. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Solution:
1.django-cors-headers add to django app to allow request from other url.
      https://github.com/ottoyiu/django-cors-headers/
2. Change views.py view return method:

3.Js: