[AA4] Fix dots in file names

This commit is contained in:
Erik Kalkoken 2024-02-22 03:00:47 +00:00 committed by Ariel Rin
parent 4d56030edf
commit 61f0aae5d9
3 changed files with 15 additions and 14 deletions

View File

@ -1,8 +1,6 @@
import logging
import requests
from allianceauth.hooks import get_hooks
from django_registration.backends.activation.views import (
REGISTRATION_SALT, ActivationView as BaseActivationView,
RegistrationView as BaseRegistrationView,
@ -34,7 +32,7 @@ from .models import CharacterOwnership
if 'allianceauth.eveonline.autogroups' in settings.INSTALLED_APPS:
_has_auto_groups = True
from allianceauth.eveonline.autogroups.models import *
from allianceauth.eveonline.autogroups.models import * # noqa: F401, F403
else:
_has_auto_groups = False
@ -58,7 +56,7 @@ def dashboard_groups(request):
context = {
'groups': groups,
}
return render_to_string('authentication/dashboard.groups.html', context=context, request=request)
return render_to_string('authentication/dashboard_groups.html', context=context, request=request)
def dashboard_characters(request):
@ -70,7 +68,7 @@ def dashboard_characters(request):
context = {
'characters': characters
}
return render_to_string('authentication/dashboard.characters.html', context=context, request=request)
return render_to_string('authentication/dashboard_characters.html', context=context, request=request)
def dashboard_admin(request):
@ -164,10 +162,12 @@ def main_character_change(request, token):
if co:
request.user.profile.main_character = co.character
request.user.profile.save(update_fields=['main_character'])
messages.success(request, _('Changed main character to %(char)s') % {
"char": co.character})
logger.info('Changed user %(user)s main character to %(char)s' %
({'user': request.user, 'char': co.character}))
messages.success(request, _('Changed main character to %s') % co.character)
logger.info(
'Changed user {user} main character to {char}'.format(
user=request.user, char=co.character
)
)
return redirect("authentication:dashboard")
@ -222,8 +222,10 @@ def sso_login(request, token):
token.delete()
messages.error(
request,
_('Unable to authenticate as the selected character. '
'Please log in with the main character associated with this account.')
_(
'Unable to authenticate as the selected character. '
'Please log in with the main character associated with this account.'
)
)
return redirect(settings.LOGIN_URL)
@ -306,8 +308,7 @@ class RegistrationView(BaseRegistrationView):
else:
user.is_active = True
user.save()
login(self.request, user,
'allianceauth.authentication.backends.StateBackend')
login(self.request, user, 'allianceauth.authentication.backends.StateBackend')
return user
def get_activation_key(self, user):