From 999767a16a0a49fe63c6a5ab4cb2bc6e704a9d41 Mon Sep 17 00:00:00 2001 From: sanj Date: Fri, 23 Jul 2010 16:08:48 +0530 Subject: [PATCH] subscribe user to erang --- itf/festival/views.py | 4 ++++ itf/settings.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/itf/festival/views.py b/itf/festival/views.py index 4f64f82..a22c48c 100644 --- a/itf/festival/views.py +++ b/itf/festival/views.py @@ -10,6 +10,8 @@ try: except: import simplejson as json from django.core.mail import send_mail +from settings import ERANG_SUBSCRIBE_URL +import urllib2 def index(request): index_data = {} @@ -157,6 +159,8 @@ def save_email(request): if validateEmail(email): t = Signup(email=email) t.save() + erang_subscribe_url = ERANG_SUBSCRIBE_URL + "email" + subscribed = urllib2.urlopen(erang_subscribe_url).read() return HttpResponse("1") else: return HttpResponse("0") diff --git a/itf/settings.py b/itf/settings.py index 6ee0185..cb8b419 100644 --- a/itf/settings.py +++ b/itf/settings.py @@ -28,7 +28,7 @@ DATABASE_USER = 'root' # Not used with sqlite3. DATABASE_PASSWORD = '' # Not used with sqlite3. DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. - +ERANG_SUBSCRIBE_URL = "http://a.organisedmail.com/nok.x?s=dGhlYXRyZWZvcnVt&ctid=YWRjZWUzOGVjMGYyZGUwNmYyOWFkZTk5ZWYyMjNjMjQ&emaddr=" # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. @@ -123,6 +123,7 @@ INSTALLED_APPS = ( 'django_extensions', 'debug_toolbar', 'sorl.thumbnail', + 'south', ) #overwrite default settings with local settings