BO 1.21 exercise_type buddy_warning

This commit is contained in:
Bossanyi Tibor 2021-06-17 23:31:47 +02:00
parent d10bf0cd13
commit f09e2224b9
4 changed files with 5 additions and 4 deletions

View File

@ -47,9 +47,9 @@ class ExerciseTypeParentsInline(admin.TabularInline):
class ExerciseTypeAdmin(admin.ModelAdmin):
list_display = ('exercise_type_id', 'name_colored', 'active', 'base')
list_display = ('exercise_type_id', 'name_colored', 'active', 'base', 'buddy_warning')
search_fields = ['name', 'exercisetypetranslation__name']
fields = ('name', 'description', 'unit', 'unit_quantity', 'unit_quantity_unit', 'active', 'base')
fields = ('name', 'description', 'unit', 'unit_quantity', 'unit_quantity_unit', 'active', 'base', 'buddy_warning')
def name_colored(self, obj):
if obj.active:

View File

@ -27,6 +27,7 @@ class ExerciseType(models.Model):
null=True)
active = models.BooleanField(default=0, blank=True, null=True)
base = models.BooleanField(default=0, blank=True, null=True)
buddy_warning = models.BooleanField(default=False, )
parents = models.ManyToManyField(ExerciseTree, through='ExerciseTypeParents', related_name='ExerciseTree')
class Meta:

View File

@ -12,7 +12,7 @@ https://docs.djangoproject.com/en/3.0/ref/settings/
import os
BACKOFFICE_VERSION = 1.20
BACKOFFICE_VERSION = 1.21
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

View File

@ -12,7 +12,7 @@ https://docs.djangoproject.com/en/3.0/ref/settings/
import os
BACKOFFICE_VERSION = 1.20
BACKOFFICE_VERSION = 1.21
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))