BO 1.10 tutorials condition, parent step

This commit is contained in:
Bossanyi Tibor 2021-04-26 08:39:32 +02:00
parent eacefb27b6
commit 14f1499f6e
4 changed files with 5 additions and 3 deletions

View File

@ -12,7 +12,7 @@ class TranslationTutorialInline(admin.TabularInline):
class TutorialStepsAdmin(admin.ModelAdmin): class TutorialStepsAdmin(admin.ModelAdmin):
list_display = ('tutorial', 'step',) list_display = ('tutorial', 'step',)
list_filter = ('tutorial',) list_filter = ('tutorial',)
fields = ('tutorial', 'step', "tutorial_text", "error_text", "check_text",) fields = ('tutorial', 'step', "tutorial_text", "error_text", "check_text","condition", "parent")
inlines = [ inlines = [
TranslationTutorialInline, TranslationTutorialInline,

View File

@ -26,6 +26,8 @@ class TutorialSteps(models.Model):
tutorial_text = RichTextField() tutorial_text = RichTextField()
error_text = RichTextField(blank=True, null=True) error_text = RichTextField(blank=True, null=True)
check_text = models.TextField(max_length=50, 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!")
parent = models.IntegerField(help_text="Tutorial Step Parent. If not defined, then the parent is step-1")
class Meta: class Meta:
db_table = 'tutorial_steps' db_table = 'tutorial_steps'

View File

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