django csrf for api that works with ios apps -
i building ios app communicates server getting data. if normal app, can send csrf token via forms (since same domain). but, ios apps, dont think can set csrf token . so, when making requests ios apps, server, getting error regarding csrf. so, whats solution this? disabling csrf feature or other better way ? first ios app, please tell me better way follow that. for urls ("api end points") ios app accessing, need specify @csrf_exempt on corresponding view functions disable csrf protection. more details here - https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#django.views.decorators.csrf.csrf_exempt and protect urls via other authentication methods, such session authentication. for authentication purposes, can take reference django rest framework , django tastypie has done. both use sessionauthentication classes handle authentication , protect exposed urls (api endpoints) ios app can connect to. references:- http://django-rest-framework.org...