Self hosted FLOSS fitness/workout, nutrition and weight tracker
adding settings to extras/docker/development/settings.py
Rohan Karan6e1f9b38e47d
diff --git a/.gitignore b/.gitignoreindex 47ea5d013..1b369483a 100644--- a/.gitignore+++ b/.gitignore@@ -65,7 +65,7 @@ node_modules# Virtual envsvenv-venv-wget+venv-wger# Will need to copy this file to react repo though/wger/i18n.tsxdiff --git a/extras/docker/development/settings.py b/extras/docker/development/settings.pyindex 8c707b7c0..a849f58f1 100644--- a/extras/docker/development/settings.py+++ b/extras/docker/development/settings.py@@ -115,3 +115,15 @@ COMPRESS_ROOT = STATIC_ROOT# The site's domain as used by the email verification workflowEMAIL_PAGE_DOMAIN = 'http://localhost/'+++#+# Django Axes+#+AXES_ENABLED = True # allow to disable axes entirely+# (e.g. if this is run in a local network or so we would save up some resources),+# but default it true+AXES_FAILURE_LIMIT = 5 # configurable, default is 5+AXES_COOLOFF_TIME = 0.5 # configurable, default is 0.5 hours+AXES_HANDLER = 'axes.handlers.cache.AxesCacheHandler' # Configurable,+# but default is the cache handler.diff --git a/wger/core/views/user.py b/wger/core/views/user.pyindex 6bfd6c2a3..f4a5326bb 100644--- a/wger/core/views/user.py+++ b/wger/core/views/user.py@@ -282,7 +282,6 @@ def registration(request):config.save()user.userprofile.save()-user = authenticate(request=request, username=username, password=password)# Log the user indiff --git a/wger/settings_global.py b/wger/settings_global.pyindex 62c6e6288..c72b78be2 100644--- a/wger/settings_global.py+++ b/wger/settings_global.py@@ -91,7 +91,7 @@ INSTALLED_APPS = (# Django Axes'axes',-+# History keeping'simple_history',@@ -128,7 +128,7 @@ MIDDLEWARE = (# History keeping'simple_history.middleware.HistoryRequestMiddleware',-+# Django Axes'axes.middleware.AxesMiddleware',)@@ -294,8 +294,8 @@ AXES_RESET_COOL_OFF_ON_FAILURE_DURING_LOCKOUT = True# If you want to set up redis, set AXES_HANDLER = 'axes.handlers.cache.AxesCacheHandler'AXES_HANDLER = 'axes.handlers.database.AxesDatabaseHandler'-# If your redis has a different name other than 'default' (e.g. when you have multiple caches-# defined in CACHES), change the following value to that name+# If your redis or MemcachedCache has a different name other than 'default'+# (e.g. when you have multiple caches defined in CACHES), change the following value to that nameAXES_CACHE = 'default'