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
Container registry
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Maják
Commits
9bc97f70
Commit
9bc97f70
authored
Jul 24, 2020
by
jan.bednarik
Browse files
Options
Downloads
Patches
Plain Diff
majak: Improve comments in code
parent
ad559ac9
No related branches found
No related tags found
2 merge requests
!59
majak: Improve comments in code
,
!58
majak: Improve comments in code
Pipeline
#928
passed
Jul 24, 2020
Stage: build
Changes
4
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
districts/models.py
+8
-0
8 additions, 0 deletions
districts/models.py
home/models.py
+10
-0
10 additions, 0 deletions
home/models.py
senat_campaign/models.py
+42
-2
42 additions, 2 deletions
senat_campaign/models.py
senate/models.py
+8
-0
8 additions, 0 deletions
senate/models.py
with
68 additions
and
2 deletions
districts/models.py
+
8
−
0
View file @
9bc97f70
...
...
@@ -9,10 +9,14 @@ from tuning import help
class
DistrictsHomePage
(
MetadataPageMixin
,
Page
):
### FIELDS
matomo_id
=
models
.
IntegerField
(
"
Matomo ID pro sledování návštěvnosti
"
,
blank
=
True
,
null
=
True
)
### PANELS
promote_panels
=
[
MultiFieldPanel
(
[
...
...
@@ -29,7 +33,11 @@ class DistrictsHomePage(MetadataPageMixin, Page):
FieldPanel
(
"
matomo_id
"
),
]
### RELATIONS
subpage_types
=
[]
### OTHERS
class
Meta
:
verbose_name
=
"
Krajský rozcestník
"
This diff is collapsed.
Click to expand it.
home/models.py
+
10
−
0
View file @
9bc97f70
...
...
@@ -4,12 +4,22 @@ from wagtail.core.models import Page
class
HomeIndexPage
(
Page
):
### FIELDS
body
=
RichTextField
(
"
obsah
"
)
### PANELS
content_panels
=
Page
.
content_panels
+
[
FieldPanel
(
"
body
"
),
]
### RELATIONS
subpage_types
=
[]
### OTHERS
class
Meta
:
verbose_name
=
"
Maják homepage
"
...
...
This diff is collapsed.
Click to expand it.
senat_campaign/models.py
+
42
−
2
View file @
9bc97f70
...
...
@@ -54,6 +54,8 @@ class ContactBlock(blocks.StructBlock):
class
SenatCampaignHomePage
(
Page
,
MetadataPageMixin
,
CalendarMixin
):
### FIELDS
# top section
headline
=
models
.
CharField
(
"
podtitulek pod jménem
"
,
max_length
=
250
,
blank
=
True
)
top_photo
=
models
.
ForeignKey
(
...
...
@@ -127,6 +129,8 @@ class SenatCampaignHomePage(Page, MetadataPageMixin, CalendarMixin):
"
Matomo ID pro sledování návštěvnosti
"
,
blank
=
True
,
null
=
True
)
### PANELS
content_panels
=
Page
.
content_panels
+
[
MultiFieldPanel
(
[
...
...
@@ -185,12 +189,16 @@ class SenatCampaignHomePage(Page, MetadataPageMixin, CalendarMixin):
StreamFieldPanel
(
"
contacts
"
),
]
### RELATIONS
subpage_types
=
[
"
senat_campaign.SenatCampaignNewsIndexPage
"
,
"
senat_campaign.SenatCampaignProgramPage
"
,
"
senat_campaign.SenatCampaignCookiesPage
"
,
]
### OTHERS
# flag for rendering anchor links in menu
is_home
=
True
...
...
@@ -276,8 +284,9 @@ class SenatCampaignHomePage(Page, MetadataPageMixin, CalendarMixin):
class
SenatCampaignNewsIndexPage
(
Page
,
SubpageMixin
,
MetadataPageMixin
):
parent_page_types
=
[
"
senat_campaign.SenatCampaignHomePage
"
]
subpage_types
=
[
"
senat_campaign.SenatCampaignNewsPage
"
]
### FIELDS
### PANELS
promote_panels
=
[
MultiFieldPanel
(
...
...
@@ -294,6 +303,13 @@ class SenatCampaignNewsIndexPage(Page, SubpageMixin, MetadataPageMixin):
settings_panels
=
[]
### RELATIONS
parent_page_types
=
[
"
senat_campaign.SenatCampaignHomePage
"
]
subpage_types
=
[
"
senat_campaign.SenatCampaignNewsPage
"
]
### OTHERS
# flag for rendering anchor links in menu
is_home
=
False
...
...
@@ -308,6 +324,8 @@ class SenatCampaignNewsIndexPage(Page, SubpageMixin, MetadataPageMixin):
class
SenatCampaignNewsPage
(
Page
,
SubpageMixin
,
MetadataPageMixin
):
### FIELDS
date
=
models
.
DateField
(
"
datum
"
)
perex
=
models
.
TextField
(
"
perex
"
)
body
=
RichTextField
(
"
článek
"
,
blank
=
True
)
...
...
@@ -321,6 +339,8 @@ class SenatCampaignNewsPage(Page, SubpageMixin, MetadataPageMixin):
# we will use photo as search image
search_image
=
None
### PANELS
content_panels
=
Page
.
content_panels
+
[
FieldPanel
(
"
date
"
),
FieldPanel
(
"
perex
"
),
...
...
@@ -345,9 +365,13 @@ class SenatCampaignNewsPage(Page, SubpageMixin, MetadataPageMixin):
),
]
### RELATIONS
parent_page_types
=
[
"
senat_campaign.SenatCampaignNewsIndexPage
"
]
subpage_types
=
[]
### OTHERS
# flag for rendering anchor links in menu
is_home
=
False
...
...
@@ -394,6 +418,8 @@ class ProgramBlock(blocks.StructBlock):
class
SenatCampaignProgramPage
(
Page
,
SubpageMixin
,
MetadataPageMixin
):
### FIELDS
committee_preference
=
StreamField
(
[(
"
committee
"
,
blocks
.
CharBlock
(
label
=
"
výbor či komise
"
))],
verbose_name
=
"
preferované výbory a komise
"
,
...
...
@@ -403,6 +429,8 @@ class SenatCampaignProgramPage(Page, SubpageMixin, MetadataPageMixin):
[(
"
item
"
,
ProgramBlock
())],
verbose_name
=
"
programové body
"
,
blank
=
True
)
### PANELS
content_panels
=
Page
.
content_panels
+
[
StreamFieldPanel
(
"
committee_preference
"
),
StreamFieldPanel
(
"
content
"
),
...
...
@@ -423,9 +451,13 @@ class SenatCampaignProgramPage(Page, SubpageMixin, MetadataPageMixin):
settings_panels
=
[]
### RELATIONS
parent_page_types
=
[
"
senat_campaign.SenatCampaignHomePage
"
]
subpage_types
=
[]
### OTHERS
# flag for rendering anchor links in menu
is_home
=
False
...
...
@@ -434,8 +466,12 @@ class SenatCampaignProgramPage(Page, SubpageMixin, MetadataPageMixin):
class
SenatCampaignCookiesPage
(
Page
,
SubpageMixin
,
MetadataPageMixin
):
### FIELDS
body
=
RichTextField
(
"
obsah
"
,
blank
=
True
)
### PANELS
content_panels
=
Page
.
content_panels
+
[
FieldPanel
(
"
body
"
,
classname
=
"
full
"
),
]
...
...
@@ -455,9 +491,13 @@ class SenatCampaignCookiesPage(Page, SubpageMixin, MetadataPageMixin):
settings_panels
=
[]
### RELATIONS
parent_page_types
=
[
"
senat_campaign.SenatCampaignHomePage
"
]
subpage_types
=
[]
### OTHERS
# flag for rendering anchor links in menu
is_home
=
False
...
...
This diff is collapsed.
Click to expand it.
senate/models.py
+
8
−
0
View file @
9bc97f70
...
...
@@ -31,6 +31,8 @@ class PersonBlock(blocks.StructBlock):
class
SenateHomePage
(
MetadataPageMixin
,
Page
):
### FIELDS
senators
=
StreamField
(
[(
"
item
"
,
PersonBlock
())],
verbose_name
=
"
naši senátoři
"
,
blank
=
True
)
...
...
@@ -41,6 +43,8 @@ class SenateHomePage(MetadataPageMixin, Page):
"
Matomo ID pro sledování návštěvnosti
"
,
blank
=
True
,
null
=
True
)
### PANELS
content_panels
=
Page
.
content_panels
+
[
StreamFieldPanel
(
"
senators
"
),
StreamFieldPanel
(
"
candidates
"
),
...
...
@@ -62,7 +66,11 @@ class SenateHomePage(MetadataPageMixin, Page):
FieldPanel
(
"
matomo_id
"
),
]
### RELATIONS
subpage_types
=
[]
### OTHERS
class
Meta
:
verbose_name
=
"
Senátní rozcestník
"
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