Your view is likely raising an exception (but if you don't use csrf exempt
then access is denied and the erroring view code is not run).
Le 2 mars 2012 21:42, "Ethan Whitt" a écrit :
> I get a 403 error when I comment out csrf_example as such:
>
> auth/views.py
> from django.http import HttpRespo
I get a 403 error when I comment out csrf_example as such:
auth/views.py
from django.http import HttpResponse
from django.utils import simplejson
#from django.views.decorators.csrf import csrf_exempt
#@csrf_exempt
def json_api(request):
return HttpResponse(simplejson.dumps(request), mimetype="a
You seem to have no 500.html page.
This traceback won't actually show the error that happened, but error out
on the fact that it can't find a template to display the 500 error.
1. Are you running DEBUG = True?
2. Wouldn't you rather want to simplejson.dum
>
> I have never used csrf_exempt before.
I have never used csrf_exempt before. I keep experiencing a traceback
with 1.3.1, which may be self-induced. Here is my views file:
auth/views.py
from django.http import HttpResponse
from django.utils import simplejson
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
def json_ap
4 matches
Mail list logo