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
b0a1adab
Verified
Commit
b0a1adab
authored
1 year ago
by
Alexa Valentová
Browse files
Options
Downloads
Patches
Plain Diff
fix field prepopulation
parent
e4c681bb
Branches
Branches containing commit
No related tags found
2 merge requests
!987
Release - fix ChoiceField prepopulation
,
!986
fix ChoiecField prepopulation
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
shared/blocks/base.py
+5
-2
5 additions, 2 deletions
shared/blocks/base.py
uniweb/models.py
+1
-3
1 addition, 3 deletions
uniweb/models.py
with
6 additions
and
5 deletions
shared/blocks/base.py
+
5
−
2
View file @
b0a1adab
...
...
@@ -680,8 +680,11 @@ class ChartDataset(blocks.StructBlock):
def
get_redmine_projects
():
projects
=
requests
.
get
(
"
https://redmine.pirati.cz/projects.json?limit=10000
"
)
projects
.
raise_for_status
()
if
projects
.
ok
:
projects
=
projects
.
json
()[
"
projects
"
]
else
:
projects
=
[]
return
[(
project
[
"
id
"
],
project
[
"
name
"
])
for
project
in
projects
]
...
...
This diff is collapsed.
Click to expand it.
uniweb/models.py
+
1
−
3
View file @
b0a1adab
import
random
from
captcha.fields
import
CaptchaField
from
django
import
forms
from
django.db
import
models
from
django.utils.translation
import
gettext_lazy
from
modelcluster.contrib.taggit
import
ClusterTaggableManager
...
...
@@ -79,7 +78,7 @@ class AlignBlock(blocks.StructBlock):
"""
align
=
blocks
.
ChoiceBlock
(
ALIGN_CHOICES
,
label
=
"
zarovnání
"
,
default
=
LEFT
,
widget
=
forms
.
RadioSelect
ALIGN_CHOICES
,
label
=
"
zarovnání
"
,
default
=
LEFT
)
def
get_context
(
self
,
value
,
parent_context
=
None
):
...
...
@@ -226,7 +225,6 @@ class CalendarAgendaBlock(blocks.StructBlock):
CALENDAR_EVENTS_CHOICES
,
label
=
"
druh událostí
"
,
default
=
FUTURE
,
widget
=
forms
.
RadioSelect
,
)
class
Meta
:
...
...
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