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
fe18c28c
Commit
fe18c28c
authored
4 months ago
by
Alexa Valentová
Browse files
Options
Downloads
Patches
Plain Diff
fix file sending, update limits
parent
00812366
No related branches found
Branches containing commit
No related tags found
2 merge requests
!1208
Release
,
!1202
Feat/fix octo import
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
main/forms.py
+1
-1
1 addition, 1 deletion
main/forms.py
main/models.py
+5
-1
5 additions, 1 deletion
main/models.py
main/templates/main/main_career_page.html
+1
-1
1 addition, 1 deletion
main/templates/main/main_career_page.html
with
7 additions
and
3 deletions
main/forms.py
+
1
−
1
View file @
fe18c28c
...
...
@@ -19,7 +19,7 @@ class MultipleFileField(forms.FileField):
kwargs
.
setdefault
(
"
widget
"
,
MultipleFileInput
())
super
().
__init__
(
*
args
,
**
kwargs
)
TOTAL_MAX_FILE_SIZE
=
10
*
1024
*
1024
#
10
MB
TOTAL_MAX_FILE_SIZE
=
5
*
1024
*
1024
#
5
MB
def
clean
(
self
,
data
,
initial
=
None
):
single_file_clean
=
super
().
clean
...
...
This diff is collapsed.
Click to expand it.
main/models.py
+
5
−
1
View file @
fe18c28c
...
...
@@ -557,7 +557,7 @@ CV, motivační dopis a ostatní soubory jsou v přílohách. Názvy souborů:
Ostatní soubory:
{
other_files_names
}
Při otevírání souborů buďte opatrní, virový
sken ne
proběhl!
Při otevírání souborů buďte opatrní, virový proběhl
, ale nemusí být přesný
!
"""
),
# From email
...
...
@@ -566,11 +566,14 @@ Při otevírání souborů buďte opatrní, virový sken neproběhl!
self
.
recipient_emails
.
split
(
"
,
"
),
)
form
.
cleaned_data
[
"
cv_file
"
].
seek
(
0
)
email
.
attach
(
form
.
cleaned_data
[
"
cv_file
"
].
name
,
form
.
cleaned_data
[
"
cv_file
"
].
read
(),
form
.
cleaned_data
[
"
cv_file
"
].
content_type
,
)
form
.
cleaned_data
[
"
cover_letter_file
"
].
seek
(
0
)
email
.
attach
(
form
.
cleaned_data
[
"
cover_letter_file
"
].
name
,
form
.
cleaned_data
[
"
cover_letter_file
"
].
read
(),
...
...
@@ -578,6 +581,7 @@ Při otevírání souborů buďte opatrní, virový sken neproběhl!
)
for
file
in
form
.
cleaned_data
[
"
other_files
"
]:
file
.
seek
(
0
)
email
.
attach
(
file
.
name
,
file
.
read
(),
file
.
content_type
)
sent_successfully
=
email
.
send
()
...
...
This diff is collapsed.
Click to expand it.
main/templates/main/main_career_page.html
+
1
−
1
View file @
fe18c28c
...
...
@@ -110,7 +110,7 @@
{{ form.other_files }}
<small
class=
"text-grey-300"
>
(Max. 5 MB na jeden soubor,
10
MB celkem)
(Max. 5 MB na jeden soubor,
5
MB celkem)
</small>
</div>
</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