Forcing dev subdomain on new user queue email.

This commit is contained in:
Samuel Clay 2013-05-13 18:31:44 -07:00
parent c74fad0feb
commit a65676bbd2
2 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@
{% block body %}
<p style="font-size: 37px; color:#555555; margin-top: 18px;margin-bottom: 10px;padding-top:6px;">Your free account is ready, {{ user.username }}.</p>
<p style="line-height: 20px;">Thanks again for trying out NewsBlur! Your account is ready to go. Just log right in and start reading.</p>
<p style="line-height: 20px;">http://{% current_domain %}{{ user.profile.autologin_url }}</p>
<p style="line-height: 20px;">http://{% current_domain dev=True %}{{ user.profile.autologin_url }}</p>
<p style="line-height: 20px;">I made NewsBlur because I wanted a better way to read the news and talk about it with people. I hope you love it, too.</p>
<p style="line-height: 20px;">- Sam Clay</p>
{% endblock %}

View file

@ -11,10 +11,10 @@ from utils.user_functions import get_user
register = template.Library()
@register.simple_tag
def current_domain():
def current_domain(dev=False):
current_site = Site.objects.get_current()
domain = current_site and current_site.domain
if settings.SERVER_NAME in ["dev", "work"] and domain:
if dev and settings.SERVER_NAME in ["dev", "work"] and domain:
domain = domain.replace("www", "dev")
return domain