mirror of
https://github.com/zulip/zulip.git
synced 2025-10-30 11:33:51 +00:00
@@ -4,12 +4,22 @@ from typing import Dict, Any
|
||||
from django.http import HttpRequest
|
||||
from django.conf import settings
|
||||
|
||||
from zerver.models import get_realm_by_string_id
|
||||
from zerver.models import UserProfile, get_realm_by_string_id
|
||||
from zproject.backends import (password_auth_enabled, dev_auth_enabled,
|
||||
google_auth_enabled, github_auth_enabled)
|
||||
from zerver.lib.utils import get_subdomain
|
||||
|
||||
|
||||
def common_context(user):
|
||||
# type: (UserProfile) -> Dict[str, Any]
|
||||
return {
|
||||
'realm_uri': user.realm.uri,
|
||||
'server_uri': settings.SERVER_URI,
|
||||
'external_uri_scheme': settings.EXTERNAL_URI_SCHEME,
|
||||
'external_host': settings.EXTERNAL_HOST,
|
||||
}
|
||||
|
||||
|
||||
def add_settings(request):
|
||||
# type: (HttpRequest) -> Dict[str, Any]
|
||||
realm = None
|
||||
|
||||
Reference in New Issue
Block a user