• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wger-project / wger / 20894200720

11 Jan 2026 11:13AM UTC coverage: 84.352% (-0.7%) from 85.031%
20894200720

push

github

web-flow
Merge pull request #2153 from wger-project/feature/refactor-settings

Refactor application settings

21 of 83 new or added lines in 9 files covered. (25.3%)

28 existing lines in 1 file now uncovered.

13951 of 16539 relevant lines covered (84.35%)

0.84 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/settings/local_dev.py
1
"""Local development settings for wger"""
2

3
# ruff: noqa: F405
4
# ruff: noqa: F403
5

6
# wger
NEW
7
from .settings_global import *
×
8

NEW
9
DEBUG = True
×
10

11
# List of administrators
NEW
12
ADMINS = (('Your name', 'your_email@example.com'),)
×
NEW
13
MANAGERS = ADMINS
×
14

15
# Don't use this key in production!
NEW
16
SECRET_KEY = 'wger-local-development-supersecret-key-1234567890!'
×
17

18
# Allow all hosts to access the application.
NEW
19
ALLOWED_HOSTS = ['*', ]
×
20

NEW
21
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
×
22

23
# WGER application
NEW
24
WGER_SETTINGS['ALLOW_UPLOAD_VIDEOS'] = True
×
NEW
25
WGER_SETTINGS['ALLOW_GUEST_USERS'] = True
×
NEW
26
WGER_SETTINGS['ALLOW_REGISTRATION'] = True
×
NEW
27
WGER_SETTINGS['DOWNLOAD_INGREDIENTS_FROM'] = 'WGER' # or 'None' to disable
×
NEW
28
WGER_SETTINGS['EMAIL_FROM'] = 'wger Workout Manager <wger@example.com>'
×
NEW
29
WGER_SETTINGS['EXERCISE_CACHE_TTL'] = 500
×
NEW
30
WGER_SETTINGS['INGREDIENT_CACHE_TTL'] = 500
×
NEW
31
WGER_SETTINGS['SYNC_EXERCISES_CELERY'] = False
×
NEW
32
WGER_SETTINGS['SYNC_EXERCISE_IMAGES_CELERY'] = True
×
NEW
33
WGER_SETTINGS['SYNC_EXERCISE_VIDEOS_CELERY'] = False
×
NEW
34
WGER_SETTINGS['SYNC_INGREDIENTS_CELERY'] = True
×
NEW
35
WGER_SETTINGS['USE_CELERY'] = False
×
NEW
36
WGER_SETTINGS['CACHE_API_EXERCISES_CELERY'] = True
×
NEW
37
WGER_SETTINGS['CACHE_API_EXERCISES_CELERY_FORCE_UPDATE'] = True
×
NEW
38
WGER_SETTINGS['ROUTINE_CACHE_TTL'] = 500
×
NEW
39
DEFAULT_FROM_EMAIL = WGER_SETTINGS['EMAIL_FROM']
×
40

41

42
# CELERY_BROKER_URL = "redis://localhost:6379/2"
43
# CELERY_RESULT_BACKEND = "redis://localhost:6379/2"
44

NEW
45
CSRF_TRUSTED_ORIGINS = ['http://localhost:8000', 'http://127.0.0.1:8000']
×
46

NEW
47
EXPOSE_PROMETHEUS_METRICS = True
×
48

NEW
49
COMPRESS_ENABLED = False
×
NEW
50
AXES_ENABLED = False
×
51

52

53
# Does not really cache anything
NEW
54
CACHES_DUMMY = {
×
55
    "default": {
56
        "BACKEND": "django.core.cache.backends.dummy.DummyCache",
57
        'TIMEOUT': 100,
58
    }
59
}
60

61
# In-memory cache, resets when the server restarts
NEW
62
CACHE_LOCMEM = {
×
63
    'default': {
64
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
65
        'LOCATION': 'wger-cache',
66
        'TIMEOUT': 100,
67
    }
68
}
69

70
# Redis cache
NEW
71
CACHE_REDIS = {
×
72
    'default': {
73
        'BACKEND': 'django_redis.cache.RedisCache',
74
        'LOCATION': 'redis://localhost:6379/1',
75
        'TIMEOUT': 5000,
76
        'OPTIONS': {
77
            'CLIENT_CLASS': 'django_redis.client.DefaultClient'
78
        }
79
    }
80
}
81

82

83
# CACHES = CACHE_REDIS
84
# CACHES = CACHE_LOCMEM
NEW
85
CACHES = CACHES_DUMMY
×
86

87

88
# Django Debug Toolbar
89
# INSTALLED_APPS += ['django_extensions', 'debug_toolbar']
90
# MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware", ]
91
# INTERNAL_IPS = ["127.0.0.1", ]
92

93
# AUTH_PROXY_HEADER = 'HTTP_X_REMOTE_USER'
94
# AUTH_PROXY_USER_EMAIL_HEADER = 'HTTP_X_REMOTE_USER_EMAIL'
95
# AUTH_PROXY_USER_NAME_HEADER = 'HTTP_X_REMOTE_USER_NAME'
96
# AUTH_PROXY_TRUSTED_IPS = ['127.0.0.1', ]
97
# AUTH_PROXY_CREATE_UNKNOWN_USER = True
98

99

NEW
100
DBCONFIG_PG = {
×
101
    'ENGINE': 'django_prometheus.db.backends.postgresql',
102
    'NAME': 'wger',
103
    'USER': 'wger',
104
    'PASSWORD': 'wger',
105
    'HOST': 'localhost',
106
    'PORT': '5432',
107
}
108

109

NEW
110
DBCONFIG_SQLITE = {
×
111
    'ENGINE': 'django_prometheus.db.backends.sqlite3',
112
    'NAME':  BASE_DIR.parent / 'db' / 'database.sqlite',
113
}
114

NEW
115
DATABASES = {
×
116
    # 'default': DBCONFIG_PG,
117
    'default': DBCONFIG_SQLITE,
118
}
119

120

121
# Import other local settings that are not in version control
NEW
122
try:
×
NEW
123
    from .local_dev_extra import *
×
NEW
124
except ImportError:
×
NEW
125
    pass
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc