File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22from django .urls import reverse
33
44from streamfield .fields import StreamField
5- from streamblocks .models import RichText , Column
5+ from streamblocks .models import RichText , Column , Separator
66
77class Page (models .Model ):
88 title = models .CharField (max_length = 255 )
99 stream = StreamField (
1010 model_list = [
1111 RichText ,
12- Column
12+ Column ,
13+ Separator
1314 ],
1415 verbose_name = "Page blocks"
1516 )
Original file line number Diff line number Diff line change @@ -26,8 +26,16 @@ class Meta:
2626 verbose_name = "Column"
2727 verbose_name_plural = "Columns"
2828
29+
30+ class Separator (models .Model ):
31+
32+ class Meta :
33+ abstract = True
34+ verbose_name = "Separator"
35+
2936# Register blocks for StreamField as list of models
3037STREAMBLOCKS_MODELS = [
3138 RichText ,
32- Column
39+ Column ,
40+ Separator
3341]
You can’t perform that action at this time.
0 commit comments