mirror of
https://github.com/zulip/zulip.git
synced 2025-10-26 01:24:02 +00:00
auth: Separate development login from main login page.
This allows us to enable EmailAuthBackend by default in development without cluttering the development login experience. Fixes #3652.
This commit is contained in:
@@ -3,14 +3,21 @@ from django.conf import settings
|
||||
import os.path
|
||||
from django.views.static import serve
|
||||
import zerver.views.registration
|
||||
import zerver.views.auth
|
||||
|
||||
# These URLs are available only in the development environment
|
||||
|
||||
use_prod_static = getattr(settings, 'PIPELINE_ENABLED', False)
|
||||
static_root = os.path.join(settings.DEPLOY_ROOT, 'prod-static/serve' if use_prod_static else 'static')
|
||||
|
||||
urls = [url(r'^static/(?P<path>.*)$', serve, {'document_root': static_root})]
|
||||
i18n_urls = [url(r'^confirmation_key/$', zerver.views.registration.confirmation_key)]
|
||||
urls = [
|
||||
url(r'^static/(?P<path>.*)$', serve, {'document_root': static_root}),
|
||||
url(r'^devlogin/$', zerver.views.auth.login_page,
|
||||
{'template_name': 'zerver/dev_login.html'}, name='zerver.views.auth.login_page'),
|
||||
]
|
||||
i18n_urls = [
|
||||
url(r'^confirmation_key/$', zerver.views.registration.confirmation_key),
|
||||
]
|
||||
|
||||
# These are used for voyager development. On a real voyager instance,
|
||||
# these files would be served by nginx.
|
||||
|
||||
Reference in New Issue
Block a user