File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 1+ from django .conf import settings
2+ from django .http import HttpRequest
3+
4+
5+ def google_oauth2_client_id (request : HttpRequest ) -> dict [str , str ]:
6+ """
7+ Adds the OAuth app client ID to the context, for the popup on the core template.
8+
9+ :param request: The current request.
10+ :return: A dict with the client ID in, for template rendering.
11+ """
12+ return {
13+ "GOOGLE_OAUTH2_CLIENT_ID" : settings .GOOGLE_OAUTH2_CLIENT_ID ,
14+ }
Original file line number Diff line number Diff line change 4545 "APP_DIRS" : True ,
4646 "OPTIONS" : {
4747 "context_processors" : [
48+ "app.context_processors.google_oauth2_client_id" ,
4849 "django.template.context_processors.debug" ,
4950 "django.template.context_processors.request" ,
5051 "django.contrib.auth.context_processors.auth" ,
You can’t perform that action at this time.
0 commit comments