How to POST & 403 CSRF cookie not set
===

I am trying to learn Django and Python and am currently trying to implement a view with a POST.

here is the beginning of my view.

    def get_project(request, format='json'):
	    if format != 'json':
	    	raise NotImplementedError('Only JSON output support is available')

	     status = "OK"
	     verified = False

	     if request.method == 'POST':
		     try:
			    json_data = simplejson.loads(request.body)
		
			    username= json_data['username']
			    email = json_data['email']
		     except:
			       return HttpResponse(json.dumps(dict(status=status, verified=False, message="User information not specified")), mimetype='application/json')

I'm not sure if this is correct or not. I just saw an example like this. I just need to get a username and key from the POST info. Also, I must use json.

I have also downloaded curl.exe and am trying to test to see if the above works.

In the command prompt (is there better way?) I am using something like this: I have tried quite a few variations that I have found from searching. 

    C:\Users\Kmuffs\Documents\GitHub\TimeEntryApp\billing_app\timentry>curl -X POST
    -H "content-type:application/json" --header "X-CSRFToken: somename" -d "{"usernam
    e":"Steven","key": "TwUB2Z"}" --cookie "csrftoken=somename" http://127.0.0.1:8
    000/projects/json

In my settings.py I have made sure CsrfViewMiddleware is installed. I also added the following lines in settings.py

         CSRF_COOKIE_NAME = 'somename'
         CSRF_COOKIE_DOMAIN = 'http://127.0.0.1:8000' #your domain name

I have never done POST before, any help is much appreciated. Thanks!

Also, just to let you know, I have searched for answers on my own all morning but I couldn't get anything I found to work. 