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
9b5e129c
Commit
9b5e129c
authored
9 years ago
by
Jean-Sébastien Caux
Browse files
Options
Downloads
Patches
Plain Diff
Add first RSS feed for latest comments
parent
cc703cff
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
scipost/feeds.py
+27
-0
27 additions, 0 deletions
scipost/feeds.py
scipost/templates/scipost/registration_invitations.html
+2
-2
2 additions, 2 deletions
scipost/templates/scipost/registration_invitations.html
scipost/urls.py
+4
-0
4 additions, 0 deletions
scipost/urls.py
with
33 additions
and
2 deletions
scipost/feeds.py
0 → 100644
+
27
−
0
View file @
9b5e129c
from
django.contrib.syndication.views
import
Feed
from
django.core.urlresolvers
import
reverse
from
comments.models
import
Comment
class
LatestCommentFeed
(
Feed
):
title
=
"
SciPost Latest Comments
"
link
=
"
/
"
def
items
(
self
):
return
Comment
.
objects
.
filter
(
status__gte
=
0
).
order_by
(
'
-date_submitted
'
)[:
5
]
def
item_title
(
self
,
item
):
return
item
.
comment_text
[:
50
]
# def item_description(self, item):
# return item.description
def
item_link
(
self
,
item
):
if
item
.
commentary
:
return
reverse
(
'
commentaries:commentary
'
,
kwargs
=
{
'
arxiv_or_DOI_string
'
:
item
.
commentary
.
arxiv_or_DOI_string
})
elif
item
.
submission
:
return
reverse
(
'
submissions:submission
'
,
kwargs
=
{
'
submission_id
'
:
item
.
submission
.
id
})
elif
item
.
thesislink
:
return
reverse
(
'
theses:thesis
'
,
kwargs
=
{
'
thesislink_id
'
:
item
.
thesislink
.
id
})
else
:
return
reverse
(
'
scipost:index
'
)
This diff is collapsed.
Click to expand it.
scipost/templates/scipost/registration_invitations.html
+
2
−
2
View file @
9b5e129c
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<hr
class=
"hr12"
/>
<hr
class=
"hr12"
/>
<section>
<section>
<div
class=
"flex-greybox"
>
<div
class=
"flex-greybox"
>
<h2>
Invitations sent (response pending):
</h2>
<h2>
Invitations sent (response pending)
EF ({{ nr_sent_reg_inv_fellows }}), C ({{ nr_sent_reg_inv_contrib }})
:
</h2>
</div>
</div>
<hr
class=
"hr6"
/>
<hr
class=
"hr6"
/>
<h3>
Editorial Fellows ({{ nr_sent_reg_inv_fellows }})
</h3>
<h3>
Editorial Fellows ({{ nr_sent_reg_inv_fellows }})
</h3>
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
<hr
class=
"hr12"
/>
<hr
class=
"hr12"
/>
<section>
<section>
<div
class=
"flex-greybox"
>
<div
class=
"flex-greybox"
>
<h2>
Invitations sent (responded):
</h2>
<h2>
Invitations sent (responded)
EF ({{ nr_resp_reg_inv_fellows }}), C ({{ nr_resp_reg_inv_contrib }})
:
</h2>
</div>
</div>
<hr
class=
"hr6"
/>
<hr
class=
"hr6"
/>
<h3>
Editorial Fellows ({{ nr_resp_reg_inv_fellows }})
</h3>
<h3>
Editorial Fellows ({{ nr_resp_reg_inv_fellows }})
</h3>
...
...
This diff is collapsed.
Click to expand it.
scipost/urls.py
+
4
−
0
View file @
9b5e129c
...
@@ -2,6 +2,7 @@ from django.conf.urls import include, patterns, url
...
@@ -2,6 +2,7 @@ from django.conf.urls import include, patterns, url
from
django.views.generic
import
TemplateView
from
django.views.generic
import
TemplateView
from
.
import
views
from
.
import
views
from
.feeds
import
LatestCommentFeed
urlpatterns
=
[
urlpatterns
=
[
url
(
r
'
^$
'
,
views
.
index
,
name
=
'
index
'
),
url
(
r
'
^$
'
,
views
.
index
,
name
=
'
index
'
),
...
@@ -56,4 +57,7 @@ urlpatterns = [
...
@@ -56,4 +57,7 @@ urlpatterns = [
url
(
r
'
^claim_thesis_authorship/(?P<thesis_id>[0-9]+)/(?P<claim>[0-1])$
'
,
views
.
claim_thesis_authorship
,
name
=
'
claim_thesis_authorship
'
),
url
(
r
'
^claim_thesis_authorship/(?P<thesis_id>[0-9]+)/(?P<claim>[0-1])$
'
,
views
.
claim_thesis_authorship
,
name
=
'
claim_thesis_authorship
'
),
url
(
r
'
^vet_authorship_claims$
'
,
views
.
vet_authorship_claims
,
name
=
"
vet_authorship_claims
"
),
url
(
r
'
^vet_authorship_claims$
'
,
views
.
vet_authorship_claims
,
name
=
"
vet_authorship_claims
"
),
url
(
r
'
^vet_authorship_claim/(?P<claim_id>[0-9]+)/(?P<claim>[0-1])$
'
,
views
.
vet_authorship_claim
,
name
=
'
vet_authorship_claim
'
),
url
(
r
'
^vet_authorship_claim/(?P<claim_id>[0-9]+)/(?P<claim>[0-1])$
'
,
views
.
vet_authorship_claim
,
name
=
'
vet_authorship_claim
'
),
# Feeds
url
(
r
'
^latest_comment/feed/$
'
,
LatestCommentFeed
()),
]
]
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