Automatic linting

This commit is contained in:
Github-actions
2026-01-11 20:29:13 +00:00
parent 136b24d520
commit ea626844af
2 changed files with 4 additions and 31 deletions

View File

@@ -264,15 +264,14 @@ LOGGING = {
STORAGES = {
'default': {
'BACKEND': env.str(
'DJANGO_STORAGES_DEFAULT_BACKEND',
'django.core.files.storage.FileSystemStorage'
'DJANGO_STORAGES_DEFAULT_BACKEND', 'django.core.files.storage.FileSystemStorage'
),
},
# django.contrib.staticfiles.storage.StaticFilesStorage
'staticfiles': {
'BACKEND': env.str(
'DJANGO_STORAGES_STATICFILES_BACKEND',
'wger.core.storage.LenientManifestStaticFilesStorage'
'wger.core.storage.LenientManifestStaticFilesStorage',
),
},
}

View File

@@ -56,10 +56,8 @@ INSTALLED_APPS = [
'django.contrib.sites',
'django.contrib.staticfiles',
'storages',
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',
# Apps from wger proper
'wger.config',
'wger.core',
@@ -74,20 +72,15 @@ INSTALLED_APPS = [
'wger.gallery',
'wger.measurements',
# 'wger.trophies',
# reCaptcha support, see https://github.com/praekelt/django-recaptcha
'django_recaptcha',
# The sitemaps app
'django.contrib.sitemaps',
# thumbnails
'easy_thumbnails',
# Form renderer helper
'crispy_forms',
'crispy_bootstrap5',
# REST-API
'rest_framework',
'rest_framework.authtoken',
@@ -95,28 +88,20 @@ INSTALLED_APPS = [
'rest_framework_simplejwt',
'drf_spectacular',
'drf_spectacular_sidecar',
# Breadcrumbs
'django_bootstrap_breadcrumbs',
# CORS
'corsheaders',
# Django Axes
'axes',
# History keeping
'simple_history',
# Django email verification
'django_email_verification',
# Activity stream
'actstream',
# Fontawesome
'fontawesomefree',
# Prometheus
'django_prometheus',
]
@@ -128,31 +113,23 @@ MIDDLEWARE = [
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
# Django Admin
'django.contrib.auth.middleware.AuthenticationMiddleware',
# Auth proxy middleware
'wger.core.middleware.AuthProxyHeaderMiddleware',
# Javascript Header. Sends helper headers for AJAX
'wger.utils.middleware.JavascriptAJAXRedirectionMiddleware',
# Custom authentication middleware. Creates users on-the-fly for certain paths
'wger.utils.middleware.WgerAuthenticationMiddleware',
# Send an appropriate Header so search engines don't index pages
'wger.utils.middleware.RobotsExclusionMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.locale.LocaleMiddleware',
# History keeping
'simple_history.middleware.HistoryRequestMiddleware',
# Prometheus
'django_prometheus.middleware.PrometheusAfterMiddleware',
# Django Axes
'axes.middleware.AxesMiddleware', # should be the last one in the list
]
@@ -401,10 +378,7 @@ REST_FRAMEWORK = {
'rest_framework.filters.OrderingFilter',
),
'DEFAULT_THROTTLE_CLASSES': ['rest_framework.throttling.ScopedRateThrottle'],
'DEFAULT_THROTTLE_RATES': {
'login': '10/min',
'registration': '5/min'
},
'DEFAULT_THROTTLE_RATES': {'login': '10/min', 'registration': '5/min'},
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
}
@@ -425,7 +399,7 @@ SPECTACULAR_SETTINGS = {
'SWAGGER_UI_DIST': 'SIDECAR',
'SWAGGER_UI_FAVICON_HREF': 'SIDECAR',
'REDOC_DIST': 'SIDECAR',
'COMPONENT_SPLIT_REQUEST': True
'COMPONENT_SPLIT_REQUEST': True,
}
#