1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-15 23:00:57 +00:00

Disable signup when not in cloud_mode

This commit is contained in:
zhengxie
2012-11-21 16:24:08 +08:00
parent 763286c77e
commit 1b686fc8cf
2 changed files with 36 additions and 25 deletions

View File

@@ -27,18 +27,27 @@ urlpatterns = patterns('',
activate,
{ 'backend': 'seahub.base.accounts.RegistrationBackend', },
name='registration_activate'),
url(r'^register/$',
register,
reg_dict,
name='registration_register'),
url(r'^register/complete/$',
direct_to_template,
{ 'template': 'registration/registration_complete.html',
'extra_context': { 'send_mail': settings.REGISTRATION_SEND_MAIL } },
name='registration_complete'),
url(r'^register/closed/$',
direct_to_template,
{ 'template': 'registration/registration_closed.html' },
name='registration_disallowed'),
(r'', include('registration.auth_urls')),
)
try:
from settings import CLOUD_MODE
except ImportError:
CLOUD_MODE = False
if CLOUD_MODE:
urlpatterns += patterns('',
url(r'^register/$',
register,
reg_dict,
name='registration_register'),
url(r'^register/complete/$',
direct_to_template,
{ 'template': 'registration/registration_complete.html',
'extra_context': { 'send_mail': settings.REGISTRATION_SEND_MAIL } },
name='registration_complete'),
url(r'^register/closed/$',
direct_to_template,
{ 'template': 'registration/registration_closed.html' },
name='registration_disallowed'),
)