Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
IGWN Computing and Software
GraceDB
GraceDB Server
Commits
4c3fa2b5
Commit
4c3fa2b5
authored
15 years ago
by
Brian Moe
Browse files
Options
Downloads
Patches
Plain Diff
RSS feeds no longer show Test events unless explicitly requested
parent
2bc67ce3
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
gracedb/feeds.py
+11
-6
11 additions, 6 deletions
gracedb/feeds.py
gracedb/urls.py
+1
-1
1 addition, 1 deletion
gracedb/urls.py
with
12 additions
and
7 deletions
gracedb/feeds.py
+
11
−
6
View file @
4c3fa2b5
...
@@ -8,16 +8,21 @@ from django.template import RequestContext
...
@@ -8,16 +8,21 @@ from django.template import RequestContext
from
django.shortcuts
import
render_to_response
from
django.shortcuts
import
render_to_response
from
models
import
Event
,
Group
from
models
import
Event
,
Group
from
views
import
view
,
search
from
views
import
view
,
search
,
index
class
EventFeed
(
Feed
):
class
EventFeed
(
Feed
):
def
get_object
(
self
,
bits
):
def
get_object
(
self
,
bits
):
# [] , ['cbc'], ['cbc','lowmass']
# [] , ['cbc'], ['cbc','lowmass']
objs
=
Event
.
objects
.
order_by
(
"
-id
"
)
if
'
test
'
not
in
bits
:
# Filter out test group
testGroup
=
Group
.
objects
.
filter
(
name__iexact
=
'
Test
'
)
if
testGroup
.
count
():
objs
=
objs
.
exclude
(
group
=
testGroup
[
0
])
if
len
(
bits
)
not
in
[
0
,
1
,
2
]:
if
len
(
bits
)
not
in
[
0
,
1
,
2
]:
raise
FeedDoesNotExist
raise
FeedDoesNotExist
if
not
bits
:
if
not
bits
:
title
=
"
GraCEDB Events
"
title
=
"
GraCEDb Events
"
objs
=
Event
.
objects
.
order_by
(
"
-id
"
)
else
:
else
:
group
=
Group
.
objects
.
filter
(
name__iexact
=
bits
[
0
])
group
=
Group
.
objects
.
filter
(
name__iexact
=
bits
[
0
])
if
not
group
.
count
():
if
not
group
.
count
():
...
@@ -25,7 +30,7 @@ class EventFeed(Feed):
...
@@ -25,7 +30,7 @@ class EventFeed(Feed):
group
=
group
[
0
]
group
=
group
[
0
]
objs
=
Event
.
objects
.
filter
(
group
=
group
)
objs
=
Event
.
objects
.
filter
(
group
=
group
)
if
len
(
bits
)
==
1
:
if
len
(
bits
)
==
1
:
title
=
"
GraCED
B
Events
for %s Group
"
%
group
.
name
title
=
"
GraCED
b %s
Events
"
%
group
.
name
else
:
else
:
requestedtype
=
bits
[
1
]
requestedtype
=
bits
[
1
]
type
=
[(
c
,
t
)
for
(
c
,
t
)
in
Event
.
ANALYSIS_TYPE_CHOICES
\
type
=
[(
c
,
t
)
for
(
c
,
t
)
in
Event
.
ANALYSIS_TYPE_CHOICES
\
...
@@ -33,7 +38,7 @@ class EventFeed(Feed):
...
@@ -33,7 +38,7 @@ class EventFeed(Feed):
if
not
type
:
if
not
type
:
raise
FeedDoesNotExist
raise
FeedDoesNotExist
typecode
,
type
=
type
[
0
]
typecode
,
type
=
type
[
0
]
title
=
"
GraCED
B Events for %s / %
s
"
%
(
group
.
name
,
type
)
title
=
"
GraCED
b %s / %s Event
s
"
%
(
group
.
name
,
type
)
objs
=
objs
.
filter
(
analysisType
=
typecode
)
objs
=
objs
.
filter
(
analysisType
=
typecode
)
return
title
,
objs
[:
10
]
return
title
,
objs
[:
10
]
...
@@ -43,7 +48,7 @@ class EventFeed(Feed):
...
@@ -43,7 +48,7 @@ class EventFeed(Feed):
def
link
(
self
,
obj
):
def
link
(
self
,
obj
):
# This is the link around the title for the entire feed.
# This is the link around the title for the entire feed.
return
reverse
(
search
)
return
reverse
(
"
home
"
)
def
item_link
(
self
,
obj
):
def
item_link
(
self
,
obj
):
return
reverse
(
view
,
args
=
[
obj
.
graceid
()])
return
reverse
(
view
,
args
=
[
obj
.
graceid
()])
...
...
This diff is collapsed.
Click to expand it.
gracedb/urls.py
+
1
−
1
View file @
4c3fa2b5
...
@@ -4,7 +4,7 @@ from django.conf.urls.defaults import *
...
@@ -4,7 +4,7 @@ from django.conf.urls.defaults import *
#import django.views.generic.list_detail
#import django.views.generic.list_detail
urlpatterns
=
patterns
(
'
gracedb.gracedb.views
'
,
urlpatterns
=
patterns
(
'
gracedb.gracedb.views
'
,
(
r
'
^$
'
,
'
index
'
),
url
(
r
'
^$
'
,
'
index
'
,
name
=
"
home
"
),
url
(
r
'
^create/$
'
,
'
create
'
,
name
=
"
create
"
),
url
(
r
'
^create/$
'
,
'
create
'
,
name
=
"
create
"
),
url
(
r
'
^search/$
'
,
'
search
'
,
name
=
"
search
"
),
url
(
r
'
^search/$
'
,
'
search
'
,
name
=
"
search
"
),
url
(
r
'
^view/(?P<graceid>[\w\d]+)
'
,
'
view
'
,
name
=
"
view
"
),
url
(
r
'
^view/(?P<graceid>[\w\d]+)
'
,
'
view
'
,
name
=
"
view
"
),
...
...
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