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
parent
e4cb8f741c
commit
643d8d358d
|
@ -40,7 +40,6 @@ from regluit.core.signals import (
|
||||||
unsuccessful_campaign,
|
unsuccessful_campaign,
|
||||||
wishlist_added
|
wishlist_added
|
||||||
)
|
)
|
||||||
|
|
||||||
from regluit.utils import crypto
|
from regluit.utils import crypto
|
||||||
from regluit.utils.localdatetime import now, date_today
|
from regluit.utils.localdatetime import now, date_today
|
||||||
|
|
||||||
|
@ -1864,8 +1863,12 @@ class UserProfile(models.Model):
|
||||||
if "@example.org" in self.user.email:
|
if "@example.org" in self.user.email:
|
||||||
# use @example.org email addresses for testing!
|
# use @example.org email addresses for testing!
|
||||||
return True
|
return True
|
||||||
from regluit.core.tasks import ml_subscribe_task
|
try:
|
||||||
ml_subscribe_task.delay(self, **kwargs)
|
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):
|
def ml_unsubscribe(self):
|
||||||
if "@example.org" in self.user.email:
|
if "@example.org" in self.user.email:
|
||||||
|
|
|
@ -151,14 +151,4 @@ def refresh_acqs():
|
||||||
else:
|
else:
|
||||||
acq.refreshed = True
|
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
|
|
||||||
|
|
|
@ -132,7 +132,7 @@ function put_un_in_cookie2(){
|
||||||
<input id="id_password2_main" type="password" class="required" name="password2" size="30" />
|
<input id="id_password2_main" type="password" class="required" name="password2" size="30" />
|
||||||
</div>
|
</div>
|
||||||
<div class="button">
|
<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>
|
||||||
<div class="google_signup">
|
<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>
|
<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>
|
||||||
|
|
|
@ -55,7 +55,7 @@ function put_un_in_cookie(){
|
||||||
<input id="id_password2_main" type="password" class="required" name="password2" size="30" />
|
<input id="id_password2_main" type="password" class="required" name="password2" size="30" />
|
||||||
</div>
|
</div>
|
||||||
<div class="button">
|
<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>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ function put_un_in_cookie(){
|
||||||
<div>{{ form.email.label }}: {{ form.email.errors }}<br />{{ form.email }}</div>
|
<div>{{ form.email.label }}: {{ form.email.errors }}<br />{{ form.email }}</div>
|
||||||
<div>{{ form.password1.label }}: {{ form.password1.errors }}<br />{{ form.password1 }}</div>
|
<div>{{ form.password1.label }}: {{ form.password1.errors }}<br />{{ form.password1 }}</div>
|
||||||
<div>{{ form.password2.label }}: {{ form.password2.errors }}<br />{{ form.password2 }}</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>
|
</form>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
Loading…
Reference in New Issue