kopia lustrzana https://github.com/wagtail/wagtail
Fix indentation on MinMaxCountStreamModel / BlockCountsStreamModel
rodzic
a8f41258b5
commit
49b13a3139
|
@ -1008,27 +1008,28 @@ class StreamModel(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class MinMaxCountStreamModel(models.Model):
|
class MinMaxCountStreamModel(models.Model):
|
||||||
body = StreamField([
|
body = StreamField(
|
||||||
('text', CharBlock()),
|
[
|
||||||
('rich_text', RichTextBlock()),
|
('text', CharBlock()),
|
||||||
('image', ImageChooserBlock()),
|
('rich_text', RichTextBlock()),
|
||||||
],
|
('image', ImageChooserBlock()),
|
||||||
min_num=2,
|
],
|
||||||
max_num=5,
|
min_num=2, max_num=5
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class BlockCountsStreamModel(models.Model):
|
class BlockCountsStreamModel(models.Model):
|
||||||
body = StreamField([
|
body = StreamField(
|
||||||
('text', CharBlock()),
|
[
|
||||||
('rich_text', RichTextBlock()),
|
('text', CharBlock()),
|
||||||
('image', ImageChooserBlock()),
|
('rich_text', RichTextBlock()),
|
||||||
],
|
('image', ImageChooserBlock()),
|
||||||
|
],
|
||||||
block_counts={
|
block_counts={
|
||||||
"text": {"min_num": 1},
|
"text": {"min_num": 1},
|
||||||
"rich_text": {"max_num": 1},
|
"rich_text": {"max_num": 1},
|
||||||
"image": {"min_num": 1, "max_num": 1},
|
"image": {"min_num": 1, "max_num": 1},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue