SciPost Code Repository
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SciPost
Manage
Activity
Members
Labels
Plan
Issues
118
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
2cba97d1
Commit
2cba97d1
authored
7 months ago
by
George Katsikas
Browse files
Options
Downloads
Patches
Plain Diff
add types to editorial (EIC) recommendation
parent
1f1a7e9c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scipost_django/submissions/models/recommendation.py
+9
-7
9 additions, 7 deletions
scipost_django/submissions/models/recommendation.py
with
9 additions
and
7 deletions
scipost_django/submissions/models/recommendation.py
+
9
−
7
View file @
2cba97d1
...
@@ -22,6 +22,8 @@ from ..managers import EICRecommendationQuerySet
...
@@ -22,6 +22,8 @@ from ..managers import EICRecommendationQuerySet
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
scipost.models
import
Contributor
from
scipost.models
import
Contributor
from
submissions.models
import
Submission
from
journals.models
import
Journal
class
EICRecommendation
(
SubmissionRelatedObjectMixin
,
models
.
Model
):
class
EICRecommendation
(
SubmissionRelatedObjectMixin
,
models
.
Model
):
...
@@ -34,7 +36,7 @@ class EICRecommendation(SubmissionRelatedObjectMixin, models.Model):
...
@@ -34,7 +36,7 @@ class EICRecommendation(SubmissionRelatedObjectMixin, models.Model):
reject, it is voted on by chosen Fellows of the appropriate Editorial College.
reject, it is voted on by chosen Fellows of the appropriate Editorial College.
"""
"""
submission
=
models
.
ForeignKey
(
submission
=
models
.
ForeignKey
[
"
Submission
"
]
(
"
submissions.Submission
"
,
"
submissions.Submission
"
,
on_delete
=
models
.
CASCADE
,
on_delete
=
models
.
CASCADE
,
related_name
=
"
eicrecommendations
"
,
related_name
=
"
eicrecommendations
"
,
...
@@ -54,7 +56,7 @@ class EICRecommendation(SubmissionRelatedObjectMixin, models.Model):
...
@@ -54,7 +56,7 @@ class EICRecommendation(SubmissionRelatedObjectMixin, models.Model):
remarks_for_editorial_college
=
models
.
TextField
(
remarks_for_editorial_college
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
"
optional remarks for the
"
"
Editorial College
"
blank
=
True
,
verbose_name
=
"
optional remarks for the
"
"
Editorial College
"
)
)
for_journal
=
models
.
ForeignKey
(
for_journal
=
models
.
ForeignKey
[
"
Journal
"
]
(
"
journals.Journal
"
,
blank
=
True
,
null
=
True
,
on_delete
=
models
.
SET_NULL
"
journals.Journal
"
,
blank
=
True
,
null
=
True
,
on_delete
=
models
.
SET_NULL
)
)
recommendation
=
models
.
SmallIntegerField
(
choices
=
EIC_REC_CHOICES
)
recommendation
=
models
.
SmallIntegerField
(
choices
=
EIC_REC_CHOICES
)
...
@@ -65,16 +67,16 @@ class EICRecommendation(SubmissionRelatedObjectMixin, models.Model):
...
@@ -65,16 +67,16 @@ class EICRecommendation(SubmissionRelatedObjectMixin, models.Model):
active
=
models
.
BooleanField
(
default
=
True
)
active
=
models
.
BooleanField
(
default
=
True
)
# Editorial Fellows who have assessed this recommendation:
# Editorial Fellows who have assessed this recommendation:
eligible_to_vote
=
models
.
ManyToManyField
(
eligible_to_vote
=
models
.
ManyToManyField
[
"
EICRecommendation
"
,
"
Contributor
"
]
(
"
scipost.Contributor
"
,
blank
=
True
,
related_name
=
"
eligible_to_vote
"
"
scipost.Contributor
"
,
blank
=
True
,
related_name
=
"
eligible_to_vote
"
)
)
voted_for
=
models
.
ManyToManyField
(
voted_for
=
models
.
ManyToManyField
[
"
EICRecommendation
"
,
"
Contributor
"
]
(
"
scipost.Contributor
"
,
blank
=
True
,
related_name
=
"
voted_for
"
"
scipost.Contributor
"
,
blank
=
True
,
related_name
=
"
voted_for
"
)
)
voted_against
=
models
.
ManyToManyField
(
voted_against
=
models
.
ManyToManyField
[
"
EICRecommendation
"
,
"
Contributor
"
]
(
"
scipost.Contributor
"
,
blank
=
True
,
related_name
=
"
voted_against
"
"
scipost.Contributor
"
,
blank
=
True
,
related_name
=
"
voted_against
"
)
)
voted_abstain
=
models
.
ManyToManyField
(
voted_abstain
=
models
.
ManyToManyField
[
"
EICRecommendation
"
,
"
Contributor
"
]
(
"
scipost.Contributor
"
,
blank
=
True
,
related_name
=
"
voted_abstain
"
"
scipost.Contributor
"
,
blank
=
True
,
related_name
=
"
voted_abstain
"
)
)
voting_deadline
=
models
.
DateTimeField
(
"
date submitted
"
,
default
=
timezone
.
now
)
voting_deadline
=
models
.
DateTimeField
(
"
date submitted
"
,
default
=
timezone
.
now
)
...
@@ -175,7 +177,7 @@ class EICRecommendation(SubmissionRelatedObjectMixin, models.Model):
...
@@ -175,7 +177,7 @@ class EICRecommendation(SubmissionRelatedObjectMixin, models.Model):
if
self
.
for_journal
is
not
None
if
self
.
for_journal
is
not
None
else
"
Any/all journals
"
else
"
Any/all journals
"
)
)
def
get_for_journal_short_display
(
self
):
def
get_for_journal_short_display
(
self
):
"""
Return `for_journal` field short display.
"""
"""
Return `for_journal` field short display.
"""
return
(
return
(
...
...
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