subscribe user to erang
This commit is contained in:
parent
9508000a92
commit
999767a16a
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user