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
00812366
Commit
00812366
authored
3 months ago
by
Alexa Valentová
Browse files
Options
Downloads
Patches
Plain Diff
update file size limits
parent
c274d7a5
No related branches found
No related tags found
2 merge requests
!1208
Release
,
!1201
Release career template test
Pipeline
#20309
passed
3 months ago
Stage: build
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main/forms.py
+2
-2
2 additions, 2 deletions
main/forms.py
main/templates/main/main_career_page.html
+3
-3
3 additions, 3 deletions
main/templates/main/main_career_page.html
with
5 additions
and
5 deletions
main/forms.py
+
2
−
2
View file @
00812366
...
@@ -19,7 +19,7 @@ class MultipleFileField(forms.FileField):
...
@@ -19,7 +19,7 @@ class MultipleFileField(forms.FileField):
kwargs
.
setdefault
(
"
widget
"
,
MultipleFileInput
())
kwargs
.
setdefault
(
"
widget
"
,
MultipleFileInput
())
super
().
__init__
(
*
args
,
**
kwargs
)
super
().
__init__
(
*
args
,
**
kwargs
)
TOTAL_MAX_FILE_SIZE
=
25
*
1024
*
1024
#
25
MB
TOTAL_MAX_FILE_SIZE
=
10
*
1024
*
1024
#
10
MB
def
clean
(
self
,
data
,
initial
=
None
):
def
clean
(
self
,
data
,
initial
=
None
):
single_file_clean
=
super
().
clean
single_file_clean
=
super
().
clean
...
@@ -59,7 +59,7 @@ def validate_file_type(file):
...
@@ -59,7 +59,7 @@ def validate_file_type(file):
)
)
def
validate_file_size
(
file
,
max_size
=
10
*
1024
*
1024
):
# Default:
10
MB
def
validate_file_size
(
file
,
max_size
=
5
*
1024
*
1024
):
# Default:
5
MB
if
file
.
size
>
max_size
:
if
file
.
size
>
max_size
:
raise
ValidationError
(
raise
ValidationError
(
f
"
Soubory mohou být max.
{
max_size
/
(
1024
*
1024
)
}
MB velké.
"
f
"
Soubory mohou být max.
{
max_size
/
(
1024
*
1024
)
}
MB velké.
"
...
...
This diff is collapsed.
Click to expand it.
main/templates/main/main_career_page.html
+
3
−
3
View file @
00812366
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
{{ form.cv_file }}
{{ form.cv_file }}
<small
class=
"text-grey-300"
>
(Povinné, max.
10
MB)
</small>
<small
class=
"text-grey-300"
>
(Povinné, max.
5
MB)
</small>
</section>
</section>
<section
class=
"flex flex-col gap-3 lg:items-center lg:flex-row"
>
<section
class=
"flex flex-col gap-3 lg:items-center lg:flex-row"
>
<label
<label
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
{{ form.cover_letter_file }}
{{ form.cover_letter_file }}
<small
class=
"text-grey-300"
>
(Povinný, max.
10
MB)
</small>
<small
class=
"text-grey-300"
>
(Povinný, max.
5
MB)
</small>
</section>
</section>
<section
class=
"flex flex-col gap-3 lg:items-center lg:flex-row"
>
<section
class=
"flex flex-col gap-3 lg:items-center lg:flex-row"
>
<label
<label
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
{{ form.other_files }}
{{ form.other_files }}
<small
class=
"text-grey-300"
>
<small
class=
"text-grey-300"
>
(Max.
10
MB na jeden soubor,
25
MB celkem)
(Max.
5
MB na jeden soubor,
10
MB celkem)
</small>
</small>
</div>
</div>
</section>
</section>
...
...
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