aboutsummaryrefslogtreecommitdiffstats
path: root/97suifangqa/apps/sfaccount
diff options
context:
space:
mode:
Diffstat (limited to '97suifangqa/apps/sfaccount')
-rw-r--r--97suifangqa/apps/sfaccount/templates/sfaccount/login.html2
-rw-r--r--97suifangqa/apps/sfaccount/views.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/97suifangqa/apps/sfaccount/templates/sfaccount/login.html b/97suifangqa/apps/sfaccount/templates/sfaccount/login.html
index 6e3be80..46e4bb6 100644
--- a/97suifangqa/apps/sfaccount/templates/sfaccount/login.html
+++ b/97suifangqa/apps/sfaccount/templates/sfaccount/login.html
@@ -55,6 +55,6 @@
  |  
<a href="{% url password_reset %}">忘记密码?</a>
</p>
-{% endblock body%}
+{% endblock body %}
{# vim: set ts=2 sw=2 tw=0 fenc=utf-8 ft=htmldjango.html: #}
diff --git a/97suifangqa/apps/sfaccount/views.py b/97suifangqa/apps/sfaccount/views.py
index 014dc32..0d26cc2 100644
--- a/97suifangqa/apps/sfaccount/views.py
+++ b/97suifangqa/apps/sfaccount/views.py
@@ -17,6 +17,8 @@ from sfaccount.forms import (
SFEmailForm,
)
+import re
+
# email address shown in the sent mail
FROM_EMAIL = getattr(settings, 'SF_EMAIL').get('display_from')
@@ -89,7 +91,7 @@ def activate_view(request, activation_key=None):
# ask user for the 'activation_key'
activate_key_url = reverse('activate_key',
kwargs={'activation_key': 'XXX'})
- activate_key_url = activate_key_url.replace('XXX/', '')
+ activate_key_url = re.sub(r'XXX/$', '', activate_key_url)
data = {'activate_key_url': activate_key_url}
return render(request, 'sfaccount/activate.html', data)
# }}}