I have the following code, that was working fine in Django 1.2.5:
from django.views.decorators.csrf import csrf_exempt
class ApiView(object):
def __call__(s
Just use csrf_exempt
in the urls.py
. ie::
..other imports...
from django.views.decorators.csrf import csrf_exempt
from myapp.views import MyView
urlpatterns = patterns('',
url(r'^myview/(?P[A-Za-z0-9-_]+)/$',
csrf_exempt(MyView.as_view()), # use csrf_exempt here
name="myproject-myapp-myview",
),
)