Removed unused context processor vars

This commit is contained in:
Basraah 2017-09-23 11:33:06 +10:00
parent 53d7916772
commit c59565c038
4 changed files with 7 additions and 9 deletions

View File

@ -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,
}

View File

@ -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)

View File

@ -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)

View File

@ -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)