Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Maják
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hemp
Maják
Commits
04fdbd15
Commit
04fdbd15
authored
4 years ago
by
jan.bednarik
Browse files
Options
Downloads
Patches
Plain Diff
uniweb: Text features
parent
840e0c7b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
uniweb/migrations/0005_auto_20200911_0050.py
+218
-0
218 additions, 0 deletions
uniweb/migrations/0005_auto_20200911_0050.py
uniweb/models.py
+2
-38
2 additions, 38 deletions
uniweb/models.py
with
220 additions
and
38 deletions
uniweb/migrations/0005_auto_20200911_0050.py
0 → 100644
+
218
−
0
View file @
04fdbd15
# Generated by Django 3.1.1 on 2020-09-10 22:50
import
wagtail.core.blocks
import
wagtail.core.fields
import
wagtail.images.blocks
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
"
uniweb
"
,
"
0004_auto_20200911_0022
"
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
"
uniwebflexiblepage
"
,
name
=
"
content
"
,
field
=
wagtail
.
core
.
fields
.
StreamField
(
[
(
"
title
"
,
wagtail
.
core
.
blocks
.
CharBlock
(
icon
=
"
title
"
,
label
=
"
nadpis
"
),
),
(
"
text
"
,
wagtail
.
core
.
blocks
.
RichTextBlock
(
features
=
[
"
h2
"
,
"
h3
"
,
"
h4
"
,
"
h5
"
,
"
bold
"
,
"
italic
"
,
"
ol
"
,
"
ul
"
,
"
hr
"
,
"
link
"
,
"
document-link
"
,
"
image
"
,
"
superscript
"
,
"
subscript
"
,
"
strikethrough
"
,
"
blockquote
"
,
],
label
=
"
text
"
,
),
),
(
"
text_columns
"
,
wagtail
.
core
.
blocks
.
StructBlock
(
[
(
"
left_text
"
,
wagtail
.
core
.
blocks
.
RichTextBlock
(
features
=
[
"
h2
"
,
"
h3
"
,
"
h4
"
,
"
h5
"
,
"
bold
"
,
"
italic
"
,
"
ol
"
,
"
ul
"
,
"
hr
"
,
"
link
"
,
"
document-link
"
,
"
image
"
,
"
superscript
"
,
"
subscript
"
,
"
strikethrough
"
,
"
blockquote
"
,
],
label
=
"
levý sloupec
"
,
),
),
(
"
right_text
"
,
wagtail
.
core
.
blocks
.
RichTextBlock
(
features
=
[
"
h2
"
,
"
h3
"
,
"
h4
"
,
"
h5
"
,
"
bold
"
,
"
italic
"
,
"
ol
"
,
"
ul
"
,
"
hr
"
,
"
link
"
,
"
document-link
"
,
"
image
"
,
"
superscript
"
,
"
subscript
"
,
"
strikethrough
"
,
"
blockquote
"
,
],
label
=
"
pravý sloupec
"
,
),
),
]
),
),
(
"
gallery
"
,
wagtail
.
core
.
blocks
.
ListBlock
(
wagtail
.
images
.
blocks
.
ImageChooserBlock
(
label
=
"
obrázek
"
),
icon
=
"
image
"
,
label
=
"
galerie
"
,
),
),
],
blank
=
True
,
verbose_name
=
"
obsah stránky
"
,
),
),
migrations
.
AlterField
(
model_name
=
"
uniwebhomepage
"
,
name
=
"
content
"
,
field
=
wagtail
.
core
.
fields
.
StreamField
(
[
(
"
title
"
,
wagtail
.
core
.
blocks
.
CharBlock
(
icon
=
"
title
"
,
label
=
"
nadpis
"
),
),
(
"
text
"
,
wagtail
.
core
.
blocks
.
RichTextBlock
(
features
=
[
"
h2
"
,
"
h3
"
,
"
h4
"
,
"
h5
"
,
"
bold
"
,
"
italic
"
,
"
ol
"
,
"
ul
"
,
"
hr
"
,
"
link
"
,
"
document-link
"
,
"
image
"
,
"
superscript
"
,
"
subscript
"
,
"
strikethrough
"
,
"
blockquote
"
,
],
label
=
"
text
"
,
),
),
(
"
text_columns
"
,
wagtail
.
core
.
blocks
.
StructBlock
(
[
(
"
left_text
"
,
wagtail
.
core
.
blocks
.
RichTextBlock
(
features
=
[
"
h2
"
,
"
h3
"
,
"
h4
"
,
"
h5
"
,
"
bold
"
,
"
italic
"
,
"
ol
"
,
"
ul
"
,
"
hr
"
,
"
link
"
,
"
document-link
"
,
"
image
"
,
"
superscript
"
,
"
subscript
"
,
"
strikethrough
"
,
"
blockquote
"
,
],
label
=
"
levý sloupec
"
,
),
),
(
"
right_text
"
,
wagtail
.
core
.
blocks
.
RichTextBlock
(
features
=
[
"
h2
"
,
"
h3
"
,
"
h4
"
,
"
h5
"
,
"
bold
"
,
"
italic
"
,
"
ol
"
,
"
ul
"
,
"
hr
"
,
"
link
"
,
"
document-link
"
,
"
image
"
,
"
superscript
"
,
"
subscript
"
,
"
strikethrough
"
,
"
blockquote
"
,
],
label
=
"
pravý sloupec
"
,
),
),
]
),
),
(
"
gallery
"
,
wagtail
.
core
.
blocks
.
ListBlock
(
wagtail
.
images
.
blocks
.
ImageChooserBlock
(
label
=
"
obrázek
"
),
icon
=
"
image
"
,
label
=
"
galerie
"
,
),
),
],
blank
=
True
,
verbose_name
=
"
obsah stránky
"
,
),
),
]
This diff is collapsed.
Click to expand it.
uniweb/models.py
+
2
−
38
View file @
04fdbd15
...
...
@@ -35,27 +35,6 @@ RICH_TEXT_FEATURES = [
]
# TODO remove
class
TextSectionBlock
(
blocks
.
StructBlock
):
title
=
blocks
.
CharBlock
(
label
=
"
nadpis
"
,
required
=
False
)
text
=
blocks
.
RichTextBlock
(
label
=
"
text
"
,
features
=
RICH_TEXT_FEATURES
)
class
Meta
:
label
=
"
(deprecated) textová sekce
"
# TODO remove
class
ColumnsSectionBlock
(
blocks
.
StructBlock
):
title
=
blocks
.
CharBlock
(
label
=
"
nadpis
"
,
required
=
False
)
left_text
=
blocks
.
RichTextBlock
(
label
=
"
levý sloupec
"
,
features
=
RICH_TEXT_FEATURES
)
right_text
=
blocks
.
RichTextBlock
(
label
=
"
pravý sloupec
"
,
features
=
RICH_TEXT_FEATURES
)
class
Meta
:
label
=
"
(deprecated) dvousloupcová textová sekce
"
class
ColumnsTextBlock
(
blocks
.
StructBlock
):
left_text
=
blocks
.
RichTextBlock
(
label
=
"
levý sloupec
"
,
features
=
RICH_TEXT_FEATURES
)
right_text
=
blocks
.
RichTextBlock
(
...
...
@@ -67,15 +46,6 @@ class ColumnsTextBlock(blocks.StructBlock):
icon
=
"
doc-full
"
# TODO remove
class
GallerySectionBlock
(
blocks
.
StructBlock
):
title
=
blocks
.
CharBlock
(
label
=
"
nadpis
"
,
required
=
False
)
images
=
blocks
.
ListBlock
(
ImageChooserBlock
(
label
=
"
obrázek
"
))
class
Meta
:
label
=
"
(deprecated) galerie obrázků
"
class
MenuItemBlock
(
blocks
.
StructBlock
):
name
=
blocks
.
CharBlock
(
label
=
"
název
"
)
page
=
blocks
.
PageChooserBlock
(
...
...
@@ -106,7 +76,7 @@ class UniwebHomePage(MetadataPageMixin, Page):
content
=
StreamField
(
[
(
"
title
"
,
blocks
.
CharBlock
(
label
=
"
nadpis
"
,
icon
=
"
title
"
)),
(
"
text
"
,
blocks
.
RichTextBlock
(
label
=
"
text
"
)),
(
"
text
"
,
blocks
.
RichTextBlock
(
label
=
"
text
"
,
features
=
RICH_TEXT_FEATURES
)),
(
"
text_columns
"
,
ColumnsTextBlock
()),
(
"
gallery
"
,
...
...
@@ -114,9 +84,6 @@ class UniwebHomePage(MetadataPageMixin, Page):
ImageChooserBlock
(
label
=
"
obrázek
"
),
label
=
"
galerie
"
,
icon
=
"
image
"
),
),
(
"
text_section
"
,
TextSectionBlock
()),
(
"
columns_section
"
,
ColumnsSectionBlock
()),
(
"
gallery_section
"
,
GallerySectionBlock
()),
],
verbose_name
=
"
obsah stránky
"
,
blank
=
True
,
...
...
@@ -174,7 +141,7 @@ class UniwebFlexiblePage(Page, SubpageMixin, MetadataPageMixin):
content
=
StreamField
(
[
(
"
title
"
,
blocks
.
CharBlock
(
label
=
"
nadpis
"
,
icon
=
"
title
"
)),
(
"
text
"
,
blocks
.
RichTextBlock
(
label
=
"
text
"
)),
(
"
text
"
,
blocks
.
RichTextBlock
(
label
=
"
text
"
,
features
=
RICH_TEXT_FEATURES
)),
(
"
text_columns
"
,
ColumnsTextBlock
()),
(
"
gallery
"
,
...
...
@@ -182,9 +149,6 @@ class UniwebFlexiblePage(Page, SubpageMixin, MetadataPageMixin):
ImageChooserBlock
(
label
=
"
obrázek
"
),
label
=
"
galerie
"
,
icon
=
"
image
"
),
),
(
"
text_section
"
,
TextSectionBlock
()),
(
"
columns_section
"
,
ColumnsSectionBlock
()),
(
"
gallery_section
"
,
GallerySectionBlock
()),
],
verbose_name
=
"
obsah stránky
"
,
blank
=
True
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment