diff --git a/.github/workflows/autotester.yml b/.github/workflows/autotester.yml index ab0bd45..9cecab3 100644 --- a/.github/workflows/autotester.yml +++ b/.github/workflows/autotester.yml @@ -53,7 +53,7 @@ jobs: - '3.10' # [LTS] Maintained until: October 2026 - '3.11' # [LTS] Maintained until: October 2027 - '3.12' # [LTS] Maintained until: October 2028 - - '3.13' # [LTS] Maintained until: October 2029 AA does not yet support Python 3.13 + - '3.13' # [LTS] Maintained until: October 2029 # MySQL versions to test against database: # https://endoflife.date/mysql @@ -62,7 +62,7 @@ jobs: - mariadb:10.11 # [LTS] Maintained until: February 2028 - mariadb:11.4 # [LTS] Maintained until: May 2029 - continue-on-error: ${{ matrix.python-version == '3.13' }} + # continue-on-error: ${{ matrix.python-version == '3.13' }} # Set up services services: @@ -96,6 +96,12 @@ jobs: with: python-version: ${{ matrix.python-version }} + # AAv5 development branch requires libbz2-dev for some reason, so we need to install it before running Tox + - name: Install libbz2-dev + run: | + sudo apt-get update + sudo apt-get install -y libbz2-dev + # Install Tox and any other packages - name: Install Tox and any other packages run: | @@ -128,78 +134,4 @@ jobs: files: coverage.xml verbose: true env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - # Run Test Coverage AA 5 Development - test-coverage-development: - needs: [pre-commit] - name: AA Development (Python ${{ matrix.python-version }} with ${{ matrix.database }}) - runs-on: ubuntu-latest - - strategy: - # Set Python versions to test against - matrix: - python-version: - - '3.10' # [LTS] Maintained until: October 2026 - - '3.11' # [LTS] Maintained until: October 2027 - - '3.12' # [LTS] Maintained until: October 2028 - - '3.13' # [LTS] Maintained until: October 2029 AA does not yet support Python 3.13 - # MySQL versions to test against - database: - # https://endoflife.date/mysql - - mysql:8.4 # [LTS] Maintained until: April 2032 - # https://endoflife.date/mariadb and https://mariadb.com/kb/en/mariadb-server-release-dates/ - - mariadb:10.11 # [LTS] Maintained until: February 2028 - - mariadb:11.4 # [LTS] Maintained until: May 2029 - -# continue-on-error: ${{ matrix.python-version == '3.13' }} - - # Set up services - services: - database: - image: ${{ matrix.database }} - env: - MYSQL_ROOT_PASSWORD: temp_password_aa_tox_tests - MYSQL_DATABASE: temp_allianceauth - ports: - - 3306:3306 - options: --tmpfs /var/lib/mysql - - steps: - # Checkout the repository - - name: Checkout - uses: actions/checkout@v6 - - - name: Install Redis - uses: shogo82148/actions-setup-redis@v1 - with: - redis-version: 'latest' - - - name: Verify Redis is running - run: | - redis-cli ping - redis-cli info - - # Set up Python - - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python-version }} - - # AAv5 development branch requires libbz2-dev for some reason, so we need to install it before running Tox - - name: Install libbz2-dev - run: | - sudo apt-get update - sudo apt-get install -y libbz2-dev - - # Install Tox and any other packages - - name: Install Tox and any other packages - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade tox tox-gh-actions - - # Run Tox with the specified environment - - name: Run Tox - env: - TOX_ENV: allianceauth-development - run: tox -v -e ${{ env.TOX_ENV }} \ No newline at end of file + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d684007..b1dc19f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,21 @@ Section Order: ### Removed --> +## [4.0.0] - 2026-05-09 + +> [!IMPORTANT] +> +> This Release needs at least Alliance Auth v5 +> Please make sure to update your Alliance Auth before you install this APP + +### Added + +- Compatibility to Alliance Auth v5 + +### Removed + +- Compatibility to Alliance Auth v4 + ## [3.0.4] - 2026-05-03 ### Added @@ -885,5 +900,6 @@ python manage.py taxsystem_migrate_payments [3.0.2]: https://github.com/Geuthur/aa-taxsystem/compare/v3.0.1...v3.0.2 "3.0.2" [3.0.3]: https://github.com/Geuthur/aa-taxsystem/compare/v3.0.2...v3.0.3 "3.0.3" [3.0.4]: https://github.com/Geuthur/aa-taxsystem/compare/v3.0.3...v3.0.4 "3.0.4" -[in development]: https://github.com/Geuthur/aa-taxsystem/compare/v3.0.4...HEAD "In Development" +[4.0.0]: https://github.com/Geuthur/aa-taxsystem/compare/v3.0.4...v4.0.0 "4.0.0" +[in development]: https://github.com/Geuthur/aa-taxsystem/compare/v4.0.0...HEAD "In Development" [report any issues]: https://github.com/Geuthur/aa-taxsystem/issues "report any issues" diff --git a/README.md b/README.md index dd5a086..23940a5 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ ______________________________________________________________________ ## Installation > [!NOTE] -> AA Tax System needs at least Alliance Auth v4.13.0 +> AA Tax System needs at least Alliance Auth v5 > Please make sure to update your Alliance Auth before you install this APP ### Step 1 - Install the Package diff --git a/pyproject.toml b/pyproject.toml index 4372a17..230561a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,18 +33,10 @@ dynamic = [ "version", ] dependencies = [ - "allianceauth>=4.12", - "django-esi>=8", + "allianceauth>=5", + "django-esi>=9", "django-ninja>=1.5,<2", ] -optional-dependencies.tests-allianceauth-development = [ - "aa-discordnotify", - "allianceauth==5.0.0b2", - "allianceauth-discordbot", - "coverage", - "discordproxy", - "factory-boy", -] optional-dependencies.tests-allianceauth-latest = [ "aa-discordnotify", "allianceauth-discordbot", diff --git a/testauth/settings/aa5/base.py b/testauth/settings/aa5/base.py deleted file mode 100644 index fb23e9c..0000000 --- a/testauth/settings/aa5/base.py +++ /dev/null @@ -1,343 +0,0 @@ -""" -DO NOT EDIT THIS FILE - -This settings file contains everything needed for Alliance Auth projects to function. -It gets overwritten by the 'allianceauth update' command. -If you wish to make changes, overload the setting in your project's settings file (local.py). -""" - -# Standard Library -import os - -# Third Party -from celery.schedules import crontab - -# Django -from django.contrib import messages -from django.utils.translation import gettext_lazy as _ - -INSTALLED_APPS = [ - "allianceauth", # needs to be on top of this list to support favicons in Django admin (see https://gitlab.com/allianceauth/allianceauth/-/issues/1301) - "django.contrib.admin", - "django.contrib.auth", - "django.contrib.contenttypes", - "django.contrib.sessions", - "django.contrib.messages", - "django.contrib.staticfiles", - "django.contrib.humanize", - "django_celery_beat", - "solo", - "django_bootstrap5", # https://github.com/zostera/django-bootstrap5 - "sortedm2m", - "esi", - "allianceauth.framework", - "allianceauth.authentication", - "allianceauth.services", - "allianceauth.eveonline", - "allianceauth.groupmanagement", - "allianceauth.notifications", - "allianceauth.thirdparty.navhelper", - "allianceauth.analytics", - "allianceauth.menu", - "allianceauth.theme", - "allianceauth.theme.darkly", - "allianceauth.theme.flatly", - "allianceauth.theme.materia", - "allianceauth.custom_css", - "allianceauth.crontab", - "sri", -] - -SRI_ALGORITHM = "sha512" -SECRET_KEY = "wow I'm a really bad default secret key" - -# Celery configuration -BROKER_URL = "redis://localhost:6379/0" -CELERYBEAT_SCHEDULER = "allianceauth.crontab.schedulers.OffsetDatabaseScheduler" -CELERYBEAT_SCHEDULE = { - "esi_cleanup_callbackredirect": { - "task": "esi.tasks.cleanup_callbackredirect", - "schedule": crontab(minute="0", hour="*/4"), - }, - "esi_cleanup_token": { # 1/48th * 1hr = 48Hr/2Day Refresh Cycles. - "task": "esi.tasks.cleanup_token_subset", - "schedule": crontab(minute="0", hour="*"), - "apply_offset": True, - }, - "run_model_update": { - "task": "allianceauth.eveonline.tasks.run_model_update", - "schedule": crontab(minute="0", hour="*/6"), - "apply_offset": True, - }, - "check_all_character_ownership": { - "task": "allianceauth.authentication.tasks.check_all_character_ownership", - "schedule": crontab(minute="0", hour="*/4"), - "apply_offset": True, - }, - "analytics_daily_stats": { - "task": "allianceauth.analytics.tasks.analytics_daily_stats", - "schedule": crontab(minute="0", hour="2"), - }, -} - - -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) -PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -BASE_DIR = os.path.dirname(PROJECT_DIR) - -MIDDLEWARE = [ - "django.middleware.security.SecurityMiddleware", - "django.contrib.sessions.middleware.SessionMiddleware", - "allianceauth.authentication.middleware.UserSettingsMiddleware", - "allianceauth.middleware.DeviceDetectionMiddleware", - "django.middleware.locale.LocaleMiddleware", - "django.middleware.common.CommonMiddleware", - "django.middleware.csrf.CsrfViewMiddleware", - "django.contrib.auth.middleware.AuthenticationMiddleware", - "django.contrib.messages.middleware.MessageMiddleware", - "django.middleware.clickjacking.XFrameOptionsMiddleware", -] - -ROOT_URLCONF = "allianceauth.urls" - -LOCALE_PATHS = (os.path.join(BASE_DIR, "locale/"),) - -LANGUAGES = ( # Sorted by Language Code alphabetical order + English at top - ("en", _("English")), - # ("cs-cz", _("Czech")), #Not yet at 50% translated - ("de", _("German")), - ("es", _("Spanish")), - ("it-it", _("Italian")), - ("ja", _("Japanese")), - ("ko-kr", _("Korean")), - ("fr-fr", _("French")), - ("nl-nl", _("Dutch")), - ("pl-pl", _("Polish")), - ("ru", _("Russian")), - ("uk", _("Ukrainian")), - ("zh-hans", _("Simplified Chinese")), -) - -# Django's language codes are different from some of the libraries we use, -# so we need to map them. -# When adding a new language, please remember to add it to the mapping -# and add the language files to their respective directories under `allianceauth/static/allianceauth/libs/`. -LANGUAGE_MAPPING = { - # See https://github.com/DataTables/Plugins/tree/master/i18n for available languages - # (We use the JSON files) - # `allianceauth/static/allianceauth/libs/DataTables/Plugins/{version}/i18n/` for the files - "DataTables": { - "cs-cz": "cs", - "de": "de-DE", - "es": "es-ES", - "fr-fr": "fr-FR", - "it-it": "it-IT", - "ja": "ja", - "ko-kr": "ko", - "nl-nl": "nl-NL", - "pl-pl": "pl", - "ru": "ru", - "uk": "uk", - "zh-hans": "zh-HANT", - }, - # See https://github.com/moment/moment/tree/master/locale for available languages - # `allianceauth/static/allianceauth/libs/moment.js/{version}/locale/` for the files - "MomentJS": { - "cs-cz": "cs", - "de": "de", - "es": "es", - "fr-fr": "fr", - "it-it": "it", - "ja": "ja", - "ko-kr": "ko", - "nl-nl": "nl", - "pl-pl": "pl", - "ru": "ru", - "uk": "uk", - "zh-hans": "zh-cn", - }, -} - - -TEMPLATES = [ - { - "BACKEND": "django.template.backends.django.DjangoTemplates", - "DIRS": [os.path.join(PROJECT_DIR, "templates")], - "APP_DIRS": True, - "OPTIONS": { - "context_processors": [ - "django.template.context_processors.debug", - "django.template.context_processors.request", - "django.contrib.auth.context_processors.auth", - "django.contrib.messages.context_processors.messages", - "django.template.context_processors.i18n", - "django.template.context_processors.media", - "django.template.context_processors.static", - "django.template.context_processors.tz", - "allianceauth.context_processors.auth_settings", - ], - }, - }, -] - -WSGI_APPLICATION = "allianceauth.wsgi.application" - -# Password validation -# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators - -AUTH_PASSWORD_VALIDATORS = [ - { - "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", - }, - { - "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator", - }, - { - "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator", - }, - { - "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator", - }, -] - -AUTHENTICATION_BACKENDS = [ - "allianceauth.authentication.backends.StateBackend", - "django.contrib.auth.backends.ModelBackend", -] - -# Internationalization -# https://docs.djangoproject.com/en/1.10/topics/i18n/ - -LANGUAGE_CODE = "en-us" - -LANGUAGE_COOKIE_AGE = 1209600 - -TIME_ZONE = "UTC" - -USE_I18N = True - -USE_TZ = True - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/1.10/howto/static-files/ -STORAGES = { - "default": { - "BACKEND": "django.core.files.storage.FileSystemStorage", - }, - "staticfiles": { - "BACKEND": "allianceauth.framework.staticfiles.storage.AaManifestStaticFilesStorage", - }, -} - -STATIC_URL = "/static/" -STATICFILES_DIRS = [ - os.path.join(PROJECT_DIR, "static"), -] -STATIC_ROOT = os.path.join(BASE_DIR, "static") - -# Bootstrap messaging css workaround -MESSAGE_TAGS = {messages.ERROR: "danger error"} - -CACHES = { - "default": { - "BACKEND": "django_redis.cache.RedisCache", - "LOCATION": "redis://127.0.0.1:6379/1", # change the 1 here for the DB used - } -} - -SESSION_ENGINE = "django.contrib.sessions.backends.cached_db" - -DEBUG = True -DISPLAY_DEBUG = True -ALLOWED_HOSTS = ["*"] -DATABASES = { - "default": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": str(os.path.join(BASE_DIR, "alliance_auth.sqlite3")), - }, -} - -SITE_NAME = "Alliance Auth" - -DEFAULT_THEME = "allianceauth.theme.flatly.auth_hooks.FlatlyThemeHook" -DEFAULT_THEME_DARK = "allianceauth.theme.darkly.auth_hooks.DarklyThemeHook" # Legacy AAv3 user.profile.night_mode=1 - -LOGIN_URL = "auth_login_user" # view that handles login logic - -LOGIN_REDIRECT_URL = "authentication:dashboard" # default destination when logging in if no redirect specified -LOGOUT_REDIRECT_URL = "authentication:dashboard" # destination after logging out -# Both of these redirects accept values as per the django redirect shortcut -# https://docs.djangoproject.com/en/1.11/topics/http/shortcuts/#redirect -# - url names eg 'authentication:dashboard' -# - relative urls eg '/dashboard' -# - absolute urls eg 'http://example.com/dashboard' - -# scopes required on new tokens when logging in. Cannot be blank. -LOGIN_TOKEN_SCOPES = ["publicData"] - -EMAIL_TIMEOUT = 15 - -# number of days email verification links are valid for -ACCOUNT_ACTIVATION_DAYS = 1 - -ESI_API_URL = "https://esi.evetech.net/" - -LOGGING = { - "version": 1, - "disable_existing_loggers": False, - "formatters": { - "verbose": { - "format": "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s", - "datefmt": "%d/%b/%Y %H:%M:%S", - }, - "simple": {"format": "%(levelname)s %(message)s"}, - }, - "handlers": { - "log_file": { - "level": "INFO", # edit this line to change logging level to file - "class": "logging.handlers.RotatingFileHandler", - "filename": os.path.join(BASE_DIR, "log/allianceauth.log"), - "formatter": "verbose", - "maxBytes": 1024 * 1024 * 5, # edit this line to change max log file size - "backupCount": 5, # edit this line to change number of log backups - }, - "extension_file": { - "level": "INFO", - "class": "logging.handlers.RotatingFileHandler", - "filename": os.path.join(BASE_DIR, "log/extensions.log"), - "formatter": "verbose", - "maxBytes": 1024 * 1024 * 5, # edit this line to change max log file size - "backupCount": 5, # edit this line to change number of log backups - }, - "console": { - "level": "DEBUG", # edit this line to change logging level to console - "class": "logging.StreamHandler", - "formatter": "verbose", - }, - "notifications": { # creates notifications for users with logging_notifications permission - "level": "ERROR", # edit this line to change logging level to notifications - "class": "allianceauth.notifications.handlers.NotificationHandler", - "formatter": "verbose", - }, - }, - "loggers": { - "allianceauth": { - "handlers": ["log_file", "console", "notifications"], - "level": "DEBUG", - }, - "extensions": { - "handlers": ["extension_file", "console"], - "level": "DEBUG", - }, - "django": { - "handlers": ["log_file", "console"], - "level": "ERROR", - }, - "esi": { - "handlers": ["log_file", "console"], - "level": "DEBUG", - }, - }, -} - -DEFAULT_AUTO_FIELD = "django.db.models.AutoField" diff --git a/testauth/settings/aa5/local.py b/testauth/settings/aa5/local.py deleted file mode 100644 index bd2aef8..0000000 --- a/testauth/settings/aa5/local.py +++ /dev/null @@ -1,114 +0,0 @@ -""" -Test settings -""" - -######################################################## -# local.py settings -# Every setting in base.py can be overloaded by redefining it here. - -from .base import * - -PACKAGE = "taxsystem" - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/1.10/howto/static-files/ -# STATICFILES_DIRS = [os.path.join(PROJECT_DIR, f"{PACKAGE}/static")] -STATICFILES_DIRS = [ - f"{PACKAGE}/static", -] - -SITE_URL = "http://localhost:8000" -CSRF_TRUSTED_ORIGINS = [SITE_URL] - -DISCORD_BOT_TOKEN = "My_Dummy_Token" -# These are required for Django to function properly. Don't touch. -ROOT_URLCONF = "testauth.urls" -WSGI_APPLICATION = "testauth.wsgi.application" -SECRET_KEY = "DUMMY" - -# This is where css/images will be placed for your webserver to read -STATIC_ROOT = "/var/www/testauth/static/" - -# Change this to change the name of the auth site displayed -# in page titles and the site header. -SITE_NAME = "testauth" - -# Change this to enable/disable debug mode, which displays -# useful error messages but can leak sensitive data. -DEBUG = False -LOGGING = None - -NOTIFICATIONS_REFRESH_TIME = 30 -NOTIFICATIONS_MAX_PER_USER = 50 - -# Use the USE_MYSQL environment variable to select the database backend (MySQL or Memcached). -# NOTE: On Windows, set this variable in the system/user environment variables. -if os.environ.get("USE_MYSQL", True) is True: - DATABASES["default"] = { - "ENGINE": "django.db.backends.mysql", - "NAME": "temp_allianceauth", - "USER": "root", - "PASSWORD": "temp_password_aa_tox_tests", - "HOST": "127.0.0.1", - "PORT": "3306", - "OPTIONS": {"charset": "utf8mb4"}, - } - -# Add any additional apps to this list. -INSTALLED_APPS += [ - "allianceauth.services.modules.discord", - PACKAGE, -] -# By default, apps are prevented from having public views for security reasons. -# If you want to allow specific apps to have public views, -# you can put their names here (same name as in INSTALLED_APPS). -# -# Note: -# » The format is the same as in INSTALLED_APPS -# » The app developer must explicitly allow public views for his app -APPS_WITH_PUBLIC_VIEWS = [] - -# ------------------------------------------------------------------------------------ # -# -# ESI Settings -# -# ------------------------------------------------------------------------------------ # -# Register an application at -# https://developers.eveonline.com for Authentication -# & API Access and fill out these settings. -# Be sure to set the callback URL -# 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_CLIENT_ID = "dummy" -ESI_SSO_CLIENT_SECRET = "dummy" -ESI_SSO_CALLBACK_URL = "http://127.0.0.1:8000" -ESI_USER_CONTACT_EMAIL = "devgeuthur@gmail.com" - -# ------------------------------------------------------------------------------------ # -# -# E-Mail Settings -# -# ------------------------------------------------------------------------------------ # -# 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. -# Https://www.sparkpost.com/docs/integrations/django/ -# https://elasticemail.com/resources/settings/smtp-api/ -# Set the default from email to something like 'noreply@example.com' -# Email validation can be turned off by uncommenting the line below. -# This can break some services. -REGISTRATION_VERIFY_EMAIL = False -EMAIL_HOST = "" -EMAIL_PORT = 587 -EMAIL_HOST_USER = "" -EMAIL_HOST_PASSWORD = "" -EMAIL_USE_TLS = True -DEFAULT_FROM_EMAIL = "" - -####################################### -# Add any custom settings below here. # -####################################### diff --git a/testauth/settings/base.py b/testauth/settings/base.py index 0ba27d8..fb23e9c 100644 --- a/testauth/settings/base.py +++ b/testauth/settings/base.py @@ -27,7 +27,6 @@ "django.contrib.humanize", "django_celery_beat", "solo", - "bootstrapform", "django_bootstrap5", # https://github.com/zostera/django-bootstrap5 "sortedm2m", "esi", @@ -60,9 +59,10 @@ "task": "esi.tasks.cleanup_callbackredirect", "schedule": crontab(minute="0", hour="*/4"), }, - "esi_cleanup_token": { - "task": "esi.tasks.cleanup_token", - "schedule": crontab(minute="0", hour="0"), + "esi_cleanup_token": { # 1/48th * 1hr = 48Hr/2Day Refresh Cycles. + "task": "esi.tasks.cleanup_token_subset", + "schedule": crontab(minute="0", hour="*"), + "apply_offset": True, }, "run_model_update": { "task": "allianceauth.eveonline.tasks.run_model_update", @@ -89,6 +89,7 @@ "django.middleware.security.SecurityMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", "allianceauth.authentication.middleware.UserSettingsMiddleware", + "allianceauth.middleware.DeviceDetectionMiddleware", "django.middleware.locale.LocaleMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.csrf.CsrfViewMiddleware", @@ -119,7 +120,12 @@ # Django's language codes are different from some of the libraries we use, # so we need to map them. +# When adding a new language, please remember to add it to the mapping +# and add the language files to their respective directories under `allianceauth/static/allianceauth/libs/`. LANGUAGE_MAPPING = { + # See https://github.com/DataTables/Plugins/tree/master/i18n for available languages + # (We use the JSON files) + # `allianceauth/static/allianceauth/libs/DataTables/Plugins/{version}/i18n/` for the files "DataTables": { "cs-cz": "cs", "de": "de-DE", @@ -134,6 +140,8 @@ "uk": "uk", "zh-hans": "zh-HANT", }, + # See https://github.com/moment/moment/tree/master/locale for available languages + # `allianceauth/static/allianceauth/libs/moment.js/{version}/locale/` for the files "MomentJS": { "cs-cz": "cs", "de": "de", @@ -150,6 +158,7 @@ }, } + TEMPLATES = [ { "BACKEND": "django.template.backends.django.DjangoTemplates", @@ -211,6 +220,15 @@ # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.10/howto/static-files/ +STORAGES = { + "default": { + "BACKEND": "django.core.files.storage.FileSystemStorage", + }, + "staticfiles": { + "BACKEND": "allianceauth.framework.staticfiles.storage.AaManifestStaticFilesStorage", + }, +} + STATIC_URL = "/static/" STATICFILES_DIRS = [ os.path.join(PROJECT_DIR, "static"), @@ -230,6 +248,7 @@ SESSION_ENGINE = "django.contrib.sessions.backends.cached_db" DEBUG = True +DISPLAY_DEBUG = True ALLOWED_HOSTS = ["*"] DATABASES = { "default": { @@ -283,7 +302,7 @@ "backupCount": 5, # edit this line to change number of log backups }, "extension_file": { - "level": "ERROR", + "level": "INFO", "class": "logging.handlers.RotatingFileHandler", "filename": os.path.join(BASE_DIR, "log/extensions.log"), "formatter": "verbose", @@ -308,7 +327,7 @@ }, "extensions": { "handlers": ["extension_file", "console"], - "level": "ERROR", + "level": "DEBUG", }, "django": { "handlers": ["log_file", "console"], @@ -316,7 +335,7 @@ }, "esi": { "handlers": ["log_file", "console"], - "level": "ERROR", + "level": "DEBUG", }, }, } diff --git a/testauth/settings/local.py b/testauth/settings/local.py index fa2572b..bd2aef8 100644 --- a/testauth/settings/local.py +++ b/testauth/settings/local.py @@ -17,7 +17,7 @@ f"{PACKAGE}/static", ] -SITE_URL = "http://127.0.0.1:8000" +SITE_URL = "http://localhost:8000" CSRF_TRUSTED_ORIGINS = [SITE_URL] DISCORD_BOT_TOKEN = "My_Dummy_Token" @@ -56,7 +56,7 @@ # Add any additional apps to this list. INSTALLED_APPS += [ - #'allianceauth.theme.bootstrap', + "allianceauth.services.modules.discord", PACKAGE, ] # By default, apps are prevented from having public views for security reasons. diff --git a/tox.ini b/tox.ini index 83414f2..bbba30d 100644 --- a/tox.ini +++ b/tox.ini @@ -22,6 +22,6 @@ install_command = [testenv:allianceauth-development] set_env = - DJANGO_SETTINGS_MODULE = testauth.settings.aa5.local + DJANGO_SETTINGS_MODULE = testauth.settings.development.local install_command = python -m pip install -e ".[tests-allianceauth-development]" -U {opts} {packages}