Reverting changes made to fix double click problem -- and moving changes to fix_double_click

Revert "move post monkey subscribe into a task"

This reverts commit 9556c4a792.
pull/1/head
Raymond Yee 2014-05-02 13:59:04 -07:00
parent e4cb8f741c
commit 643d8d358d
5 changed files with 11 additions and 18 deletions

View File

@ -40,7 +40,6 @@ from regluit.core.signals import (
unsuccessful_campaign,
wishlist_added
)
from regluit.utils import crypto
from regluit.utils.localdatetime import now, date_today
@ -1864,8 +1863,12 @@ class UserProfile(models.Model):
if "@example.org" in self.user.email:
# use @example.org email addresses for testing!
return True
from regluit.core.tasks import ml_subscribe_task
ml_subscribe_task.delay(self, **kwargs)
try:
if not self.on_ml:
return pm.listSubscribe(id=settings.MAILCHIMP_NEWS_ID, email_address=self.user.email, **kwargs)
except Exception, e:
logger.error("error subscribing to mailchimp list %s" % (e))
return False
def ml_unsubscribe(self):
if "@example.org" in self.user.email:

View File

@ -151,14 +151,4 @@ def refresh_acqs():
else:
acq.refreshed = True
from postmonkey import PostMonkey, MailChimpException
pm = PostMonkey(settings.MAILCHIMP_API_KEY)
@task
def ml_subscribe_task(profile, **kwargs):
try:
if not profile.on_ml:
return pm.listSubscribe(id=settings.MAILCHIMP_NEWS_ID, email_address=profile.user.email, **kwargs)
except Exception, e:
logger.error("error subscribing to mailchimp list %s" % (e))
return False

View File

@ -132,7 +132,7 @@ function put_un_in_cookie2(){
<input id="id_password2_main" type="password" class="required" name="password2" size="30" />
</div>
<div class="button">
<input type="submit" class="signup" value="sign up" onclick="this.disabled=true,this.form.submit();" />
<input type="submit" class="signup" value="sign up" />
</div>
<div class="google_signup">
<a href="/socialauth/login/google?next=/next/"><img src="{{ STATIC_URL }}images/auth/google_32_noborder.png" alt="google" /></a><div><a href="/socialauth/login/google?next=/next/">Sign Up With Google</a></div>

View File

@ -55,7 +55,7 @@ function put_un_in_cookie(){
<input id="id_password2_main" type="password" class="required" name="password2" size="30" />
</div>
<div class="button">
<input type="submit" class="signup" value="Sign Up" onclick="this.disabled=true,this.form.submit();" />
<input type="submit" class="signup" value="Sign Up" />
</div>
</form>

View File

@ -20,7 +20,7 @@ function put_un_in_cookie(){
<div>{{ form.email.label }}: {{ form.email.errors }}<br />{{ form.email }}</div>
<div>{{ form.password1.label }}: {{ form.password1.errors }}<br />{{ form.password1 }}</div>
<div>{{ form.password2.label }}: {{ form.password2.errors }}<br />{{ form.password2 }}</div>
<input type="submit" value="Send activation email" onclick="this.disabled=true,this.form.submit();" />
<input type="submit" value="Send activation email" />
</form>
<div>