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
2e425b5b
Commit
2e425b5b
authored
7 years ago
by
Jorran de Wit
Browse files
Options
Downloads
Patches
Plain Diff
Fix typo
parent
d5ac44ce
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
commentaries/forms.py
+1
-1
1 addition, 1 deletion
commentaries/forms.py
commentaries/views.py
+5
-9
5 additions, 9 deletions
commentaries/views.py
with
6 additions
and
10 deletions
commentaries/forms.py
+
1
−
1
View file @
2e425b5b
...
...
@@ -20,7 +20,7 @@ class DOIToQueryForm(forms.Form):
VALID_DOI_REGEXP
=
r
'
^(?i)10.\d{4,9}/[-._;()/:A-Z0-9]+$
'
doi
=
forms
.
RegexField
(
regex
=
VALID_DOI_REGEXP
,
strip
=
True
,
help_text
=
strings
.
doi_query_help_text
,
error_mess
x
ages
=
{
'
invalid
'
:
strings
.
doi_query_invalid
},
error_messages
=
{
'
invalid
'
:
strings
.
doi_query_invalid
},
widget
=
forms
.
TextInput
({
'
label
'
:
'
DOI
'
,
'
placeholder
'
:
strings
.
doi_query_placeholder
...
...
This diff is collapsed.
Click to expand it.
commentaries/views.py
+
5
−
9
View file @
2e425b5b
import
re
import
requests
from
django.shortcuts
import
get_object_or_404
,
render
from
django.contrib
import
messages
from
django.contrib.auth.decorators
import
permission_required
from
django.contrib.auth.mixins
import
LoginRequiredMixin
from
django.core.mail
import
EmailMessage
from
django.core.urlresolvers
import
reverse
,
reverse_lazy
from
django.db.models
import
Q
from
django.shortcuts
import
redirect
from
django.template.loader
import
render_to_string
from
django.views.generic.edit
import
CreateView
,
FormView
from
django.views.generic.edit
import
CreateView
from
django.views.generic.list
import
ListView
from
django.utils.decorators
import
method_decorator
from
django.http
import
Http404
from
.models
import
Commentary
from
.forms
import
DOIToQueryForm
,
ArxivQueryForm
,
VetCommentaryForm
,
\
CommentarySearchForm
,
RequestPublishedArticleForm
,
RequestArxivPreprintForm
from
.forms
import
DOIToQueryForm
,
ArxivQueryForm
,
VetCommentaryForm
,
RequestCommentaryForm
,
\
CommentarySearchForm
,
RequestPublishedArticleForm
,
RequestArxivPreprintForm
from
comments.models
import
Comment
from
comments.forms
import
CommentForm
from
scipost.models
import
Contributor
from
scipost.services
import
ArxivCaller
import
strings
...
...
@@ -31,6 +25,7 @@ import strings
def
request_commentary
(
request
):
return
render
(
request
,
'
commentaries/request_commentary.html
'
)
@method_decorator
(
permission_required
(
'
scipost.can_request_commentary_pages
'
,
raise_exception
=
True
),
name
=
'
dispatch
'
)
class
RequestCommentary
(
CreateView
):
...
...
@@ -111,6 +106,7 @@ def vet_commentary_requests(request):
context
=
{
'
contributor
'
:
contributor
,
'
commentary_to_vet
'
:
commentary_to_vet
,
'
form
'
:
form
}
return
render
(
request
,
'
commentaries/vet_commentary_requests.html
'
,
context
)
@permission_required
(
'
scipost.can_vet_commentary_requests
'
,
raise_exception
=
True
)
def
vet_commentary_request_ack
(
request
,
commentary_id
):
if
request
.
method
==
'
POST
'
:
...
...
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