Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

(Temporarily) deactivate the trophies app

Roland Geider6ddf3c01c176
diff --git a/wger/core/migrations/0020_add_trophies_enabled_to_userprofile.py b/wger/core/migrations/0020_add_trophies_enabled_to_userprofile.py.txt
similarity index 100%
rename from wger/core/migrations/0020_add_trophies_enabled_to_userprofile.py
rename to wger/core/migrations/0020_add_trophies_enabled_to_userprofile.py.txt
diff --git a/wger/core/models/profile.py b/wger/core/models/profile.py
index 0428def89..c73524d42 100644
--- a/wger/core/models/profile.py
+++ b/wger/core/models/profile.py
@@ -39,7 +39,6 @@ from wger.utils.units import (
AbstractWeight,
)
from wger.weight.models import WeightEntry
-
# Local
from .language import Language
@@ -374,12 +373,12 @@ by the US Department of Agriculture. It is extremely complete, with around
behalf over the REST API
"""
- trophies_enabled = models.BooleanField(
- default=True,
- verbose_name=_('Enable trophies'),
- help_text=_('Enable or disable the trophy system for this user'),
- )
- """Flag to enable or disable trophies for this user"""
+ # trophies_enabled = models.BooleanField(
+ # default=True,
+ # verbose_name=_('Enable trophies'),
+ # help_text=_('Enable or disable the trophy system for this user'),
+ # )
+ # """Flag to enable or disable trophies for this user"""
@property
def is_trustworthy(self) -> bool:
diff --git a/wger/settings_global.py b/wger/settings_global.py
index 2414af271..e42391fb1 100644
--- a/wger/settings_global.py
+++ b/wger/settings_global.py
@@ -65,7 +65,7 @@ INSTALLED_APPS = [
'wger.weight',
'wger.gallery',
'wger.measurements',
- 'wger.trophies',
+ # 'wger.trophies',
# reCaptcha support, see https://github.com/praekelt/django-recaptcha
'django_recaptcha',
diff --git a/wger/trophies/__init__.py b/wger/trophies/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/wger/trophies/apps.py b/wger/trophies/apps.py
index 227c13b86..f76363369 100644
--- a/wger/trophies/apps.py
+++ b/wger/trophies/apps.py
@@ -23,4 +23,4 @@ class TrophiesConfig(AppConfig):
verbose_name = 'Trophies'
def ready(self):
- import wger.trophies.signals
+ import wger.trophies.signals # noqa: F401
diff --git a/wger/urls.py b/wger/urls.py
index 3eb8b99ee..132e3a840 100644
--- a/wger/urls.py
+++ b/wger/urls.py
@@ -25,7 +25,6 @@ from django.contrib.sitemaps.views import (
sitemap,
)
from django.urls import path
-
# Third Party
from django_email_verification import urls as email_urls
from drf_spectacular.views import (
@@ -48,7 +47,7 @@ from wger.gallery.api import views as gallery_api_views
from wger.manager.api import views as manager_api_views
from wger.measurements.api import views as measurements_api_views
from wger.nutrition.api import views as nutrition_api_views
-from wger.trophies.api import views as trophies_api_views
+# from wger.trophies.api import views as trophies_api_views
from wger.utils.generic_views import TextTemplateView
from wger.weight.api import views as weight_api_views
@@ -251,13 +250,13 @@ router.register(
)
# Trophies app
-router.register(r'trophy', trophies_api_views.TrophyViewSet, basename='trophy')
-router.register(r'user-trophy', trophies_api_views.UserTrophyViewSet, basename='user-trophy')
-router.register(
- r'user-statistics',
- trophies_api_views.UserStatisticsViewSet,
- basename='user-statistics',
-)
+# router.register(r'trophy', trophies_api_views.TrophyViewSet, basename='trophy')
+# router.register(r'user-trophy', trophies_api_views.UserTrophyViewSet, basename='user-trophy')
+# router.register(
+# r'user-statistics',
+# trophies_api_views.UserStatisticsViewSet,
+# basename='user-statistics',
+# )
#
# Sitemaps