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
2abf856f
Commit
2abf856f
authored
2 years ago
by
OndraPetrzilka
Browse files
Options
Downloads
Patches
Plain Diff
new fields for PersonPage
parent
1a4a4fbd
No related branches found
No related tags found
3 merge requests
!607
Pirati.cz
,
!584
Feature/pirati cz ondra
,
!575
Feature/pirati cz
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
main/migrations/0006_mainpersonpage_after_name_mainpersonpage_before_name_and_more.py
+58
-0
58 additions, 0 deletions
...sonpage_after_name_mainpersonpage_before_name_and_more.py
main/models.py
+21
-3
21 additions, 3 deletions
main/models.py
with
79 additions
and
3 deletions
main/migrations/0006_mainpersonpage_after_name_mainpersonpage_before_name_and_more.py
0 → 100644
+
58
−
0
View file @
2abf856f
# Generated by Django 4.0.7 on 2022-08-23 08:25
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'
main
'
,
'
0005_mainpersonpage_twitter_username_and_more
'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'
mainpersonpage
'
,
name
=
'
after_name
'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
16
,
null
=
True
,
verbose_name
=
'
Tituly za jménem
'
),
),
migrations
.
AddField
(
model_name
=
'
mainpersonpage
'
,
name
=
'
before_name
'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
16
,
null
=
True
,
verbose_name
=
'
Tituly před jménem
'
),
),
migrations
.
AddField
(
model_name
=
'
mainpersonpage
'
,
name
=
'
email
'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
128
,
null
=
True
,
verbose_name
=
'
E-mail
'
),
),
migrations
.
AddField
(
model_name
=
'
mainpersonpage
'
,
name
=
'
facebook
'
,
field
=
models
.
URLField
(
blank
=
True
,
null
=
True
,
verbose_name
=
'
Odkaz na Facebook
'
),
),
migrations
.
AddField
(
model_name
=
'
mainpersonpage
'
,
name
=
'
instagram
'
,
field
=
models
.
URLField
(
blank
=
True
,
null
=
True
,
verbose_name
=
'
Odkaz na Instagram
'
),
),
migrations
.
AddField
(
model_name
=
'
mainpersonpage
'
,
name
=
'
phone
'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
16
,
null
=
True
,
verbose_name
=
'
Telefonní kontakt
'
),
),
migrations
.
AddField
(
model_name
=
'
mainpersonpage
'
,
name
=
'
position
'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
128
,
null
=
True
,
verbose_name
=
'
Pozice/povolání
'
),
),
migrations
.
AddField
(
model_name
=
'
mainpersonpage
'
,
name
=
'
twitter
'
,
field
=
models
.
URLField
(
blank
=
True
,
null
=
True
,
verbose_name
=
'
Odkaz na Twitter
'
),
),
migrations
.
AlterField
(
model_name
=
'
mainpersonpage
'
,
name
=
'
twitter_username
'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
32
,
null
=
True
,
verbose_name
=
'
Uživatelské jméno twitter pro získání příspěvků
'
),
),
]
This diff is collapsed.
Click to expand it.
main/models.py
+
21
−
3
View file @
2abf856f
...
@@ -335,10 +335,20 @@ class MainPeoplePage(ExtendedMetadataPageMixin, SubpageMixin, MetadataPageMixin,
...
@@ -335,10 +335,20 @@ class MainPeoplePage(ExtendedMetadataPageMixin, SubpageMixin, MetadataPageMixin,
class
MainPersonPage
(
ExtendedMetadataPageMixin
,
SubpageMixin
,
MetadataPageMixin
,
Page
):
class
MainPersonPage
(
ExtendedMetadataPageMixin
,
SubpageMixin
,
MetadataPageMixin
,
Page
):
### FIELDS
### FIELDS
before_name
=
models
.
CharField
(
"
Tituly před jménem
"
,
max_length
=
16
,
blank
=
True
,
null
=
True
)
after_name
=
models
.
CharField
(
"
Tituly za jménem
"
,
max_length
=
16
,
blank
=
True
,
null
=
True
)
position
=
models
.
CharField
(
"
Pozice/povolání
"
,
max_length
=
128
,
blank
=
True
,
null
=
True
)
perex
=
models
.
TextField
()
perex
=
models
.
TextField
()
text
=
RichTextField
()
text
=
RichTextField
()
twitter_username
=
models
.
CharField
(
"
Uživatelské jméno twitter
"
,
blank
=
True
,
null
=
True
,
max_length
=
32
)
twitter_username
=
models
.
CharField
(
"
Uživatelské jméno twitter pro získání příspěvků
"
,
blank
=
True
,
null
=
True
,
max_length
=
32
)
email
=
models
.
CharField
(
"
E-mail
"
,
max_length
=
128
,
blank
=
True
,
null
=
True
)
phone
=
models
.
CharField
(
"
Telefonní kontakt
"
,
max_length
=
16
,
blank
=
True
,
null
=
True
)
facebook
=
models
.
URLField
(
"
Odkaz na Facebook
"
,
blank
=
True
,
null
=
True
)
twitter
=
models
.
URLField
(
"
Odkaz na Twitter
"
,
blank
=
True
,
null
=
True
)
instagram
=
models
.
URLField
(
"
Odkaz na Instagram
"
,
blank
=
True
,
null
=
True
)
settings_panels
=
[]
settings_panels
=
[]
...
@@ -349,9 +359,17 @@ class MainPersonPage(ExtendedMetadataPageMixin, SubpageMixin, MetadataPageMixin,
...
@@ -349,9 +359,17 @@ class MainPersonPage(ExtendedMetadataPageMixin, SubpageMixin, MetadataPageMixin,
### PANELS
### PANELS
content_panels
=
Page
.
content_panels
+
[
content_panels
=
Page
.
content_panels
+
[
FieldPanel
(
'
before_name
'
),
FieldPanel
(
'
after_name
'
),
FieldPanel
(
'
position
'
),
FieldPanel
(
'
perex
'
),
FieldPanel
(
'
perex
'
),
FieldPanel
(
'
twitter_username
'
),
FieldPanel
(
'
twitter_username
'
),
FieldPanel
(
'
text
'
)
FieldPanel
(
'
text
'
),
FieldPanel
(
'
email
'
),
FieldPanel
(
'
phone
'
),
FieldPanel
(
'
facebook
'
),
FieldPanel
(
'
twitter
'
),
FieldPanel
(
'
instagram
'
),
]
]
def
get_context
(
self
,
request
):
def
get_context
(
self
,
request
):
...
...
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