BO 1.12 tutorials direction, branch

This commit is contained in:
Bossanyi Tibor 2021-04-29 08:06:33 +02:00
parent 2c8fbe592e
commit e432225761
4 changed files with 6 additions and 5 deletions

View File

@ -10,9 +10,9 @@ class TranslationTutorialInline(admin.TabularInline):
class TutorialStepsAdmin(admin.ModelAdmin):
list_display = ('tutorial_step_id', 'tutorial', 'check_text', 'step', 'parent')
list_display = ('tutorial_step_id', 'tutorial', 'check_text', 'step', 'parent', 'branch')
list_filter = ('tutorial__name',)
fields = ('tutorial', 'step', "tutorial_text", "error_text", "check_text", "condition", 'get_parent_step', "action")
fields = ('tutorial', 'step', "tutorial_text", "check_text", "direction", "condition", 'get_parent_step', 'branch', "action")
list_editable = ('parent',)
readonly_fields = ('get_parent_step',)

View File

@ -24,9 +24,10 @@ class TutorialSteps(models.Model):
tutorial = models.ForeignKey(Tutorial, on_delete=models.CASCADE)
step = models.IntegerField(help_text="Tutorial Step")
tutorial_text = RichTextField()
error_text = RichTextField(blank=True, null=True)
direction = models.TextField(max_length=100, blank=True, null=True, help_text="Only for programmers!")
check_text = models.TextField(max_length=50, blank=True, null=True, help_text="Only for programmers!")
condition = models.TextField(max_length=50, blank=True, null=True, help_text="Only for programmers!")
branch = models.TextField(max_length=100, blank=True, null=True, help_text="Only for programmers!")
##parent = models.IntegerField(help_text="Tutorial Step Parent. If not defined, then the parent is step-1")
parent = models.ForeignKey('self', blank=True, null=True, related_name='parents', on_delete=models.CASCADE)
action = models.BooleanField(default=0, blank=True, null=True, help_text="Tap, select menu, etc")

View File

@ -12,7 +12,7 @@ https://docs.djangoproject.com/en/3.0/ref/settings/
import os
BACKOFFICE_VERSION = 1.10
BACKOFFICE_VERSION = 1.12
# 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.10
BACKOFFICE_VERSION = 1.12
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))