From c59565c0388cc44598e7337f75be1401ac629a7b Mon Sep 17 00:00:00 2001 From: Basraah Date: Sat, 23 Sep 2017 11:33:06 +1000 Subject: [PATCH] Removed unused context processor vars --- allianceauth/context_processors.py | 7 ------- allianceauth/services/modules/discord/auth_hooks.py | 2 ++ allianceauth/services/modules/discourse/auth_hooks.py | 4 +++- allianceauth/services/modules/teamspeak3/auth_hooks.py | 3 ++- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/allianceauth/context_processors.py b/allianceauth/context_processors.py index b0e1d947..acbdb6f8 100644 --- a/allianceauth/context_processors.py +++ b/allianceauth/context_processors.py @@ -1,15 +1,8 @@ from django.conf import settings -from django.utils import timezone def auth_settings(request): return { 'DOMAIN': settings.DOMAIN, - - 'IPS4_URL': getattr(settings, 'IPS4_URL', ''), - 'SMF_URL': getattr(settings, 'SMF_URL', ''), - 'MARKET_URL': getattr(settings, 'MARKET_URL', ''), - 'CURRENT_UTC_TIME': timezone.now(), - 'JABBER_URL': getattr(settings, 'JABBER_URL', ''), 'SITE_NAME': settings.SITE_NAME, } diff --git a/allianceauth/services/modules/discord/auth_hooks.py b/allianceauth/services/modules/discord/auth_hooks.py index d0f1e622..3de5597d 100644 --- a/allianceauth/services/modules/discord/auth_hooks.py +++ b/allianceauth/services/modules/discord/auth_hooks.py @@ -1,6 +1,7 @@ import logging from django.template.loader import render_to_string +from django.conf import settings from allianceauth import hooks from allianceauth.services.hooks import ServicesHook @@ -46,6 +47,7 @@ class DiscordService(ServicesHook): def render_services_ctrl(self, request): return render_to_string(self.service_ctrl_template, { 'discord_uid': request.user.discord.uid if DiscordTasks.has_account(request.user) else None, + 'DISCORD_SERVER_ID': getattr(settings, 'DISCORD_GUILD_ID', ''), }, request=request) diff --git a/allianceauth/services/modules/discourse/auth_hooks.py b/allianceauth/services/modules/discourse/auth_hooks.py index 4a33b960..f14f57ab 100644 --- a/allianceauth/services/modules/discourse/auth_hooks.py +++ b/allianceauth/services/modules/discourse/auth_hooks.py @@ -1,6 +1,7 @@ import logging from django.template.loader import render_to_string +from django.conf import settings from allianceauth import hooks from allianceauth.services.hooks import ServicesHook @@ -41,7 +42,8 @@ class DiscourseService(ServicesHook): def render_services_ctrl(self, request): return render_to_string(self.service_ctrl_template, { - 'char': request.user.profile.main_character + 'char': request.user.profile.main_character, + 'DISCOURSE_URL': getattr(settings, 'DISCOURSE_URL', ''), }, request=request) diff --git a/allianceauth/services/modules/teamspeak3/auth_hooks.py b/allianceauth/services/modules/teamspeak3/auth_hooks.py index c5121468..1e481de5 100644 --- a/allianceauth/services/modules/teamspeak3/auth_hooks.py +++ b/allianceauth/services/modules/teamspeak3/auth_hooks.py @@ -1,6 +1,7 @@ import logging from django.template.loader import render_to_string +from django.conf import settings from allianceauth import hooks from allianceauth.services.hooks import ServicesHook @@ -46,7 +47,7 @@ class Teamspeak3Service(ServicesHook): authinfo['teamspeak3_perm_key'] = request.user.teamspeak3.perm_key return render_to_string(self.service_ctrl_template, { - 'authinfo': authinfo, + 'authinfo': authinfo, 'TEAMSPEAK3_PUBLIC_URL': getattr(settings, 'TEAMSPEAK3_PUBLIC_URL', ''), }, request=request)