Self hosted FLOSS fitness/workout, nutrition and weight tracker
Remove Django admin configuration for trophies
HairyCrabWa2a4d4f0d821
diff --git a/wger/Implement.txt b/wger/Implement.txtindex 434593c2f..6aefc8362 100644--- a/wger/Implement.txt+++ b/wger/Implement.txt@@ -95,10 +95,6 @@ PHASE 1: Foundation - Django App & Database Models1.5 Add site-wide config option- Add trophy system toggle to config app or WGER_SETTINGS-1.6 Register models in Django admin- - Create admin.py with ModelAdmin for Trophy, UserTrophy, UserStatistics- - Allow admins to manage trophies via Django admin interface-PHASE 2: Trophy Checker System------------------------------@@ -253,6 +249,18 @@ PHASE 6: Management Commands & Data Loading- Or use Django's translation system with fixture translations- Trophy names and descriptions should be translatable+6.6 Updating translation files+ wger uses Django's translation infrastructure. To update translations:++ 1. Extract translatable strings from database (exercise categories, muscle names, etc.):+ python manage.py extract-i18n++ 2. Update .po files (run in wger subfolder, not root):+ django-admin makemessages --all --extension py,html,tpl++ 3. Compile translation files:+ django-admin compilemessages+PHASE 7: Testing----------------diff --git a/wger/trophies/admin.py b/wger/trophies/admin.pydeleted file mode 100644index 631f4548b..000000000--- a/wger/trophies/admin.py+++ /dev/null@@ -1,74 +0,0 @@-# This file is part of wger Workout Manager <https://github.com/wger-project>.-# Copyright (C) 2013 - 2021 wger Team-#-# wger Workout Manager is free software: you can redistribute it and/or modify-# it under the terms of the GNU Affero General Public License as published by-# the Free Software Foundation, either version 3 of the License, or-# (at your option) any later version.-#-# wger Workout Manager is distributed in the hope that it will be useful,-# but WITHOUT ANY WARRANTY; without even the implied warranty of-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-# GNU Affero General Public License for more details.-#-# You should have received a copy of the GNU Affero General Public License-# along with this program. If not, see <http://www.gnu.org/licenses/>.--# Django-from django.contrib import admin--# Local-from wger.trophies.models import (- Trophy,- UserStatistics,- UserTrophy,-)--[email protected](Trophy)-class TrophyAdmin(admin.ModelAdmin):- """Admin configuration for Trophy model"""-- list_display = (- 'name',- 'trophy_type',- 'checker_class',- 'is_active',- 'is_hidden',- 'is_progressive',- 'order',- )- list_filter = ('trophy_type', 'is_active', 'is_hidden', 'is_progressive')- search_fields = ('name', 'description')- ordering = ('order', 'name')- readonly_fields = ('uuid', 'created', 'updated')--[email protected](UserTrophy)-class UserTrophyAdmin(admin.ModelAdmin):- """Admin configuration for UserTrophy model"""-- list_display = ('user', 'trophy', 'earned_at', 'progress', 'is_notified')- list_filter = ('trophy', 'is_notified', 'earned_at')- search_fields = ('user__username', 'trophy__name')- ordering = ('-earned_at',)- raw_id_fields = ('user',)--[email protected](UserStatistics)-class UserStatisticsAdmin(admin.ModelAdmin):- """Admin configuration for UserStatistics model"""-- list_display = (- 'user',- 'total_workouts',- 'total_weight_lifted',- 'current_streak',- 'longest_streak',- 'last_workout_date',- 'last_updated',- )- search_fields = ('user__username',)- ordering = ('-last_updated',)- raw_id_fields = ('user',)- readonly_fields = ('last_updated',)