From 4047159fd16761112c7af523e795e284b5ab4748 Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Sat, 22 Nov 2025 22:27:44 +0100 Subject: [PATCH] [ADD] Some helpful comments Since this is one of the most occurring issues when editing `local.py` --- .../project_template/project_name/settings/local.py | 4 ++-- docker/conf/local.py | 8 ++------ docs/features/services/discord.md | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/allianceauth/project_template/project_name/settings/local.py b/allianceauth/project_template/project_name/settings/local.py index 0b86e9ca..0dbc9bd3 100644 --- a/allianceauth/project_template/project_name/settings/local.py +++ b/allianceauth/project_template/project_name/settings/local.py @@ -57,10 +57,10 @@ DATABASES['default'] = { # CCP's developer portal # Logging in to auth requires the publicData scope (can be overridden through the # LOGIN_TOKEN_SCOPES setting). Other apps may require more (see their docs). +ESI_SSO_CALLBACK_URL = f"{SITE_URL}/sso/callback" # Do NOT change this line! ESI_SSO_CLIENT_ID = '' ESI_SSO_CLIENT_SECRET = '' -ESI_SSO_CALLBACK_URL = f"{SITE_URL}/sso/callback" -ESI_USER_CONTACT_EMAIL = '' # A server maintainer that CCP can contact in case of issues. +ESI_USER_CONTACT_EMAIL = '' # A server maintainer that CCP can contact in case of issues. # By default, emails are validated before new users can log in. # It's recommended to use a free service like SparkPost or Elastic Email to send email. diff --git a/docker/conf/local.py b/docker/conf/local.py index c1b3c646..cf2d3689 100644 --- a/docker/conf/local.py +++ b/docker/conf/local.py @@ -17,9 +17,7 @@ DATABASES["default"] = { "PASSWORD": os.environ.get("AA_DB_PASSWORD"), "HOST": os.environ.get("AA_DB_HOST"), "PORT": os.environ.get("AA_DB_PORT", "3306"), - "OPTIONS": { - "charset": os.environ.get("AA_DB_CHARSET", "utf8mb4") - } + "OPTIONS": {"charset": os.environ.get("AA_DB_CHARSET", "utf8mb4")}, } # Register an application at https://developers.eveonline.com for Authentication @@ -27,10 +25,9 @@ DATABASES["default"] = { # to https://example.com/sso/callback substituting your domain for example.com # Logging in to auth requires the publicData scope (can be overridden through the # LOGIN_TOKEN_SCOPES setting). Other apps may require more (see their docs). - +ESI_SSO_CALLBACK_URL = f"{SITE_URL}/sso/callback" # Do NOT change this line! ESI_SSO_CLIENT_ID = os.environ.get("ESI_SSO_CLIENT_ID") ESI_SSO_CLIENT_SECRET = os.environ.get("ESI_SSO_CLIENT_SECRET") -ESI_SSO_CALLBACK_URL = f"{SITE_URL}/sso/callback" ESI_USER_CONTACT_EMAIL = os.environ.get( "ESI_USER_CONTACT_EMAIL" ) # A server maintainer that CCP can contact in case of issues. @@ -70,7 +67,6 @@ INSTALLED_APPS += [ # 'allianceauth.permissions_tool', # 'allianceauth.srp', # 'allianceauth.timerboard', - # https://allianceauth.readthedocs.io/en/latest/features/services/index.html # 'allianceauth.services.modules.discord', # 'allianceauth.services.modules.discourse', diff --git a/docs/features/services/discord.md b/docs/features/services/discord.md index 7f04ed8d..d484edc7 100644 --- a/docs/features/services/discord.md +++ b/docs/features/services/discord.md @@ -20,8 +20,8 @@ Make the following changes in your auth project's settings file (`local.py`): # Be sure to set the callback URLto https://example.com/discord/callback/ # substituting your domain for example.com in Discord's developer portal # (Be sure to add the trailing slash) +DISCORD_CALLBACK_URL = f"{SITE_URL}/discord/callback/" # Do NOT change this line! DISCORD_GUILD_ID = '' -DISCORD_CALLBACK_URL = f"{SITE_URL}/discord/callback/" DISCORD_APP_ID = '' DISCORD_APP_SECRET = '' DISCORD_BOT_TOKEN = ''