Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Merge branch 'master' into feature/api-docs

Roland Geider1b498be76171
diff --cc requirements.txt
index 5f652ba25,d2872e58e..f64a5afb2
--- a/requirements.txt
+++ b/requirements.txt
@@@ -23,15 -24,16 +24,17 @@@ django_compressor~=4.
django_extensions~=3.2
django-storages~=1.13
django-environ==0.10.0
+drf-spectacular[sidecar]==0.26.1
easy-thumbnails==2.8.5
- fontawesomefree~=6.3.0
+ fontawesomefree~=6.4.0
icalendar==4.1.0
invoke==2.0.0
- pillow==9.4.0
+ pillow==9.5.0
reportlab==3.6.12
requests==2.28.2
- tzdata==2022.7
+ tzdata==2023.3
+ celery[redis]==5.2.7
+ flower==1.2.0
# AWS
diff --cc wger/settings_global.py
index 45c40969c,4c096a481..ad1616313
--- a/wger/settings_global.py
+++ b/wger/settings_global.py
@@@ -21,7 -21,7 +21,8 @@@ import sy
from datetime import timedelta
# wger
+from wger import get_version
+ from wger.utils.constants import DOWNLOAD_INGREDIENT_WGER
"""
@@@ -450,24 -447,11 +449,37 @@@ REST_FRAMEWORK =
),
'DEFAULT_THROTTLE_CLASSES': ['rest_framework.throttling.ScopedRateThrottle'],
'DEFAULT_THROTTLE_RATES': {
- 'login': '3/min'
+ 'login': '10/min'
- }
+ },
+ 'DEFAULT_SCHEMA_CLASS':
+ 'drf_spectacular.openapi.AutoSchema',
+}
+
++# Api docs
++SPECTACULAR_SETTINGS = {
++ 'TITLE': 'wger workout manager',
++ 'DESCRIPTION': 'FLOSS self hosted workout and fitness tracker',
++ 'VERSION': get_version(),
++ 'SERVE_INCLUDE_SCHEMA': False,
++ 'SCHEMA_PATH_PREFIX': '/api/v[0-9]',
++ 'SWAGGER_UI_DIST': 'SIDECAR',
++ 'SWAGGER_UI_FAVICON_HREF': 'SIDECAR',
++ 'REDOC_DIST': 'SIDECAR',
+ }
+ # yapf: enable
+
+# Api docs
+SPECTACULAR_SETTINGS = {
+ 'TITLE': 'wger workout manager',
+ 'DESCRIPTION': 'FLOSS self hosted workout and fitness tracker',
+ 'VERSION': get_version(),
+ 'SERVE_INCLUDE_SCHEMA': False,
+ 'SCHEMA_PATH_PREFIX': '/api/v[0-9]',
+ 'SWAGGER_UI_DIST': 'SIDECAR',
+ 'SWAGGER_UI_FAVICON_HREF': 'SIDECAR',
+ 'REDOC_DIST': 'SIDECAR',
+}
+
#
# Django Rest Framework SimpleJWT
#