diff --git a/HACKING b/HACKING index 969c9812cc..f3b767314f 100644 --- a/HACKING +++ b/HACKING @@ -61,13 +61,15 @@ Process 1: To Enable this process, just set - EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend' - EMAIL_FILE_PATH = '/tmp/app-messages' - + REGISTRATION_SEND_MAIL = False Process 2: -1. User register and active account and bind ccnet ID +1. User register and receive activation email +2. User active account and bind ccnet ID +Process 3: +1. Admin add user +2. User login and bind ccnet ID About Authentication ==================== diff --git a/base/registration_urls.py b/base/registration_urls.py index 1107a13cc2..c1d147d149 100644 --- a/base/registration_urls.py +++ b/base/registration_urls.py @@ -1,5 +1,6 @@ from django.conf.urls.defaults import * from django.views.generic.simple import direct_to_template +from django.conf import settings from registration.views import activate from registration.views import register @@ -27,7 +28,8 @@ urlpatterns = patterns('', name='registration_register'), url(r'^register/complete/$', direct_to_template, - { 'template': 'registration/registration_complete.html' }, + { 'template': 'registration/registration_complete.html', + 'extra_context': { 'send_mail': settings.REGISTRATION_SEND_MAIL } }, name='registration_complete'), url(r'^register/closed/$', direct_to_template, diff --git a/templates/registration/registration_complete.html b/templates/registration/registration_complete.html index 1d1284a7a0..bb24862d4f 100644 --- a/templates/registration/registration_complete.html +++ b/templates/registration/registration_complete.html @@ -1,6 +1,10 @@ {% extends "myhome_base.html" %} {% block title %}感谢注册{% endblock %} {% block main_panel %} +{% if send_mail %}
感谢注册,激活邮件已发往您的邮箱,请查收。如果您在收件箱里没找到,请检查下是否被当成垃圾邮件了。
+{% else %} +感谢注册,请等待管理员激活你的帐号。
+{% endif %} {% endblock %}