Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHANGE] Update test settings #141

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 55 additions & 13 deletions testauth/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

# 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)
Expand Down Expand Up @@ -44,13 +45,16 @@
"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 = "django_celery_beat.schedulers.DatabaseScheduler"
CELERYBEAT_SCHEDULER = "allianceauth.crontab.schedulers.OffsetDatabaseScheduler"
CELERYBEAT_SCHEDULE = {
"esi_cleanup_callbackredirect": {
"task": "esi.tasks.cleanup_callbackredirect",
Expand All @@ -63,17 +67,20 @@
"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)
Expand All @@ -94,20 +101,55 @@

LOCALE_PATHS = (os.path.join(BASE_DIR, "locale/"),)

LANGUAGES = (
("en", "English"),
("de", "German"),
("es", "Spanish"),
("zh-hans", "Chinese Simplified"),
("ru", "Russian"),
("ko", "Korean"),
("fr", "French"),
("ja", "Japanese"),
("it", "Italian"),
("uk", "Ukrainian"),
("pl", "Polish"),
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.
LANGUAGE_MAPPING = {
"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",
},
"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",
Expand Down
Loading