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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Maják
Commits
a3a56792
Commit
a3a56792
authored
4 days ago
by
Alexa Valentová
Browse files
Options
Downloads
Patches
Plain Diff
hotfix
parent
a5d9c58f
No related branches found
Branches containing commit
No related tags found
2 merge requests
!1283
Release
,
!1282
hotfix
Pipeline
#20855
passed
4 days ago
Stage: build
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
uniweb/migrations/0135_uniwebformpage_subscribe_to_ecomail.py
+18
-0
18 additions, 0 deletions
...eb/migrations/0135_uniwebformpage_subscribe_to_ecomail.py
uniweb/models.py
+10
-2
10 additions, 2 deletions
uniweb/models.py
with
28 additions
and
2 deletions
uniweb/migrations/0135_uniwebformpage_subscribe_to_ecomail.py
0 → 100644
+
18
−
0
View file @
a3a56792
# Generated by Django 5.0.7 on 2025-03-26 06:34
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'
uniweb
'
,
'
0134_uniwebhomepage_fbevents_id
'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'
uniwebformpage
'
,
name
=
'
subscribe_to_ecomail
'
,
field
=
models
.
BooleanField
(
default
=
False
,
verbose_name
=
'
Automaticky odebírat vyplněné údaje do Ecomail NL?
'
),
),
]
This diff is collapsed.
Click to expand it.
uniweb/models.py
+
10
−
2
View file @
a3a56792
...
...
@@ -496,6 +496,11 @@ class UniwebFormPage(
),
)
subscribe_to_ecomail
=
models
.
BooleanField
(
verbose_name
=
"
Automaticky odebírat vyplněné údaje do Ecomail NL?
"
,
default
=
False
,
)
### PANELS
content_panels
=
AbstractForm
.
content_panels
+
[
...
...
@@ -511,7 +516,7 @@ class UniwebFormPage(
submissions_panels
=
[
FormSubmissionsPanel
()]
advanced_panels
=
[
FieldPanel
(
"
show_in_parent_page
"
)]
advanced_panels
=
[
FieldPanel
(
"
show_in_parent_page
"
)
,
FieldPanel
(
"
subscribe_to_ecomail
"
)
]
edit_handler
=
TabbedInterface
(
[
...
...
@@ -535,7 +540,10 @@ class UniwebFormPage(
def
serve
(
self
,
request
):
if
request
.
method
==
"
GET
"
and
self
.
show_in_parent_page
:
return
redirect
(
self
.
parent_page
.
url
)
if
hasattr
(
self
,
"
parent_page
"
):
return
redirect
(
self
.
parent_page
.
url
)
else
:
return
redirect
(
"
/
"
)
return
super
().
serve
(
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