Self hosted FLOSS fitness/workout, nutrition and weight tracker
Remove unused options from user profile
Roland Geider9e71038c8c54
diff --git a/requirements.txt b/requirements.txtindex 6a795419a..0cbf24cd6 100644--- a/requirements.txt+++ b/requirements.txt@@ -10,6 +10,7 @@ django-recaptcha~=2.0.6Django~=3.2django-crispy-forms~=1.11django-simple-history~=3.0+django-email-verification~=0.1.0django_compressor~=2.4django_extensions~=3.1django-storages~=1.11diff --git a/wger/core/api/serializers.py b/wger/core/api/serializers.pyindex 6ec1094e5..89ab5d915 100644--- a/wger/core/api/serializers.py+++ b/wger/core/api/serializers.py@@ -50,8 +50,6 @@ class UserprofileSerializer(serializers.ModelSerializer):'workout_duration','last_workout_notification','notification_language',- 'timer_active',- 'timer_active','age','birthdate','height',diff --git a/wger/core/forms.py b/wger/core/forms.pyindex 1ff1a0b9b..1c2538605 100644--- a/wger/core/forms.py+++ b/wger/core/forms.py@@ -87,8 +87,6 @@ class UserPreferencesForm(forms.ModelForm):'workout_duration','notification_language','weight_unit',- 'timer_active',- 'timer_pause','ro_access','num_days_weight_reminder','birthdate'@@ -113,11 +111,6 @@ class UserPreferencesForm(forms.ModelForm):'workout_duration',HTML("<hr>")),- Fieldset(f"{_('Gym mode')} ({_('mobile version only')})",- "timer_active",- "timer_pause",- HTML("<hr>")- ),Fieldset(_("Other settings"),"ro_access","notification_language",diff --git a/wger/core/models.py b/wger/core/models.pyindex a9b95bf35..b10a99908 100644--- a/wger/core/models.py+++ b/wger/core/models.py@@ -204,23 +204,6 @@ by the US Department of Agriculture. It is extremely complete, with arounddefault=2,on_delete=models.CASCADE)- timer_active = models.BooleanField(verbose_name=_('Use pauses in workout timer'),- help_text=_('Check to activate timer pauses between '- 'exercises.'),- default=True)- """- Switch to activate pauses in the gym view- """-- timer_pause = IntegerField(verbose_name=_('Default duration of workout pauses'),- help_text=_('Default duration in seconds of pauses used by '- 'the timer in the gym mode.'),- default=90,- validators=[MinValueValidator(10), MaxValueValidator(400)])- """- Default duration of workout pauses in the gym view- """-@propertydef is_trustworthy(self):"""diff --git a/wger/core/tests/test_preferences.py b/wger/core/tests/test_preferences.pyindex fd0bf4f6a..782964b11 100644--- a/wger/core/tests/test_preferences.py+++ b/wger/core/tests/test_preferences.py@@ -58,8 +58,6 @@ class PreferencesTestCase(WgerTestCase):'workout_reminder': '30','workout_duration': 12,'notification_language': 2,- 'timer_active': False,- 'timer_pause': 100,'num_days_weight_reminder': 10,'weight_unit': 'kg','birthdate': '02/25/1987'})@@ -82,8 +80,6 @@ class PreferencesTestCase(WgerTestCase):'workout_reminder': 22,'workout_duration': 10,'notification_language': 2,- 'timer_active': True,- 'timer_pause': 40,'num_days_weight_reminder': 10,'weight_unit': 'lb','birthdate': '02/25/1987'})diff --git a/wger/settings_global.py b/wger/settings_global.pyindex 8131970bb..c675d53b6 100644--- a/wger/settings_global.py+++ b/wger/settings_global.py@@ -90,6 +90,9 @@ INSTALLED_APPS = (# History keeping'simple_history',++ # Django email verification+ 'django_email_verification',)@@ -172,6 +175,24 @@ EMAIL_SUBJECT_PREFIX = '[wger] '# EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'+#+# Django email verification+#++def email_verified_callback(user):+ user.userprofile.email_verified = True+ user.userprofile.save()+++EMAIL_VERIFIED_CALLBACK = email_verified_callback+EMAIL_FROM_ADDRESS = '[email protected]'+EMAIL_MAIL_SUBJECT = 'Confirm your email'+EMAIL_MAIL_HTML = 'email_verification/email_body.html'+EMAIL_MAIL_PLAIN = 'email_verification/email_body.txt'+EMAIL_TOKEN_LIFE = 60 * 60+EMAIL_PAGE_TEMPLATE = 'email_verification/confirm_template.html'+EMAIL_PAGE_DOMAIN = 'https://wger.de/'+## Login#diff --git a/wger/urls.py b/wger/urls.pyindex 21e683579..76ef6b100 100644--- a/wger/urls.py+++ b/wger/urls.py@@ -28,6 +28,7 @@ from django.contrib.sitemaps.views import (from django.urls import path# Third Party+from django_email_verification import urls as email_urlsfrom rest_framework import routers# wger@@ -155,6 +156,8 @@ urlpatterns += [path('api/v2/version/', core_api_views.ApplicationVersionView.as_view({'get': 'get'}), name='app_version'),+ path('email/', include(email_urls)),+]#