From da4f4eb4581cae8e9df7f28fead9f60ebbef94cf Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 13 Nov 2012 16:28:15 +0530 Subject: [PATCH] allow cross origin requests --- requirements.txt | 3 +++ smsBEST/settings.py | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/requirements.txt b/requirements.txt index c643d6d..ceecf76 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,7 @@ RapidSMS==0.9.6a South==0.7.5 -e git://github.com/schuyler/arrest.git@0017837a45bcb31786f953fba976d454ae684ecc#egg=arrest-dev -e git://github.com/etianen/django-reversion.git#egg=reversion + chardet==1.0.1 django-allauth==0.5.0 django-avatar==1.0.5 @@ -36,3 +37,5 @@ oauth2==1.5.211 psycopg2==2.4.5 python-openid==2.2.5 wsgiref==0.1.2 + +-e git://github.com/elevenbasetwo/django-cors.git#egg=cors diff --git a/smsBEST/settings.py b/smsBEST/settings.py index 547d078..8b64e19 100644 --- a/smsBEST/settings.py +++ b/smsBEST/settings.py @@ -56,6 +56,14 @@ INSTALLED_BACKENDS = { } } +MIDDLEWARE_CLASSES = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'cors.middleware.AllowOriginMiddleware', +) # to help you get started quickly, many django/rapidsms apps are enabled # by default. you may wish to remove some and/or add your own.