SciPost Code Repository
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SciPost
Manage
Activity
Members
Labels
Plan
Issues
119
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
SciPost
SciPost
Commits
3e6ab859
Commit
3e6ab859
authored
1 year ago
by
George Katsikas
Browse files
Options
Downloads
Patches
Plain Diff
enable unaccent for submissions and in pool
parent
7f7409d5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scipost_django/submissions/forms/__init__.py
+13
-13
13 additions, 13 deletions
scipost_django/submissions/forms/__init__.py
scipost_django/submissions/migrations/0144_enable_unaccent.py
+14
-0
14 additions, 0 deletions
...ost_django/submissions/migrations/0144_enable_unaccent.py
with
27 additions
and
13 deletions
scipost_django/submissions/forms/__init__.py
+
13
−
13
View file @
3e6ab859
...
...
@@ -456,11 +456,11 @@ class SubmissionPoolSearchForm(forms.Form):
)
if
self
.
cleaned_data
.
get
(
"
author
"
):
submissions
=
submissions
.
filter
(
author_list__icontains
=
self
.
cleaned_data
.
get
(
"
author
"
)
author_list__
unaccent__
icontains
=
self
.
cleaned_data
.
get
(
"
author
"
)
)
if
self
.
cleaned_data
.
get
(
"
title
"
):
submissions
=
submissions
.
filter
(
title__icontains
=
self
.
cleaned_data
.
get
(
"
title
"
)
title__
unaccent__
icontains
=
self
.
cleaned_data
.
get
(
"
title
"
)
)
if
self
.
cleaned_data
.
get
(
"
identifier
"
):
submissions
=
submissions
.
filter
(
...
...
@@ -2414,9 +2414,9 @@ class ReportForm(forms.ModelForm):
}
)
self
.
fields
[
"
f
ile
_
attachment
"
].
label
=
"
File attachment (2MB limit; for a figure or similar - please avoid annotated pdfs)
"
self
.
fields
[
"
file_attachment
"
].
label
=
(
"
F
ile
attachment
(2MB limit; for a figure or similar - please avoid annotated pdfs)
"
)
# Required fields on submission; optional on save as draft
if
"
save_submit
"
in
self
.
data
:
...
...
@@ -3019,11 +3019,11 @@ class SubmissionCycleChoiceForm(forms.ModelForm):
self
.
fields
[
"
refereeing_cycle
"
].
choices
=
SUBMISSION_CYCLE_CHOICES
other_submissions
=
self
.
instance
.
other_versions
.
all
()
if
other_submissions
:
self
.
fields
[
"
r
eferee
s_reinvite
"
].
queryset
=
RefereeInvitation
.
objects
.
filter
(
submission__in
=
other_submissions
)
.
distinct
()
self
.
fields
[
"
referees_reinvite
"
].
queryset
=
(
R
eferee
Invitation
.
objects
.
filter
(
submission__in
=
other_submissions
).
distinct
()
)
def
save
(
self
):
"""
...
...
@@ -3059,9 +3059,9 @@ class iThenticateReportForm(forms.ModelForm):
self
.
add_error
(
None
,
"
Preprint document not found. Please upload the pdf manually.
"
)
self
.
fields
[
"
file
"
]
=
forms
.
FileField
(
)
# Add this field now it's needed
self
.
fields
[
"
file
"
]
=
(
forms
.
FileField
()
)
# Add this field now it's needed
elif
not
doc_id
and
cleaned_data
.
get
(
"
file
"
):
cleaned_data
[
"
document
"
]
=
cleaned_data
[
"
file
"
].
read
()
elif
doc_id
:
...
...
This diff is collapsed.
Click to expand it.
scipost_django/submissions/migrations/0144_enable_unaccent.py
0 → 100644
+
14
−
0
View file @
3e6ab859
# Generated by Django 3.2.18 on 2024-02-02 11:02
from
django.db
import
migrations
from
django.contrib.postgres.operations
import
UnaccentExtension
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
"
submissions
"
,
"
0143_submission_auto_updated_fellowship
"
),
]
operations
=
[
UnaccentExtension
(),
]
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