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
e5570441
Commit
e5570441
authored
12 years ago
by
Brian Moe
Browse files
Options
Downloads
Patches
Plain Diff
Fiddling
parent
b0e114a4
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/api.py
+6
-0
6 additions, 0 deletions
gracedb/api.py
gracedb/urls_rest.py
+6
-0
6 additions, 0 deletions
gracedb/urls_rest.py
with
12 additions
and
0 deletions
gracedb/api.py
+
6
−
0
View file @
e5570441
...
...
@@ -6,8 +6,14 @@ import simplejson
from
gracedb.models
import
Event
from
piston.handler
import
BaseHandler
import
os
class
EventHandler
(
BaseHandler
):
model
=
Event
allowed_methods
=
(
'
GET
'
,)
def
download
(
request
,
graceid
,
filename
=
""
):
# Do not filename to be None. That messes up later os.path.join
filename
=
filename
or
""
...
...
This diff is collapsed.
Click to expand it.
gracedb/urls_rest.py
+
6
−
0
View file @
e5570441
from
django.conf.urls.defaults
import
*
from
piston.resource
import
Resource
from
gracedb.api
import
EventHandler
eventHandler
=
Resource
(
EventHandler
)
urlpatterns
=
patterns
(
'
gracedb.api
'
,
url
(
r
'
^events/[A-Z]?(?P<id>[\w\d]+)$
'
,
eventHandler
,
name
=
"
api_event
"
),
url
(
r
'
^events/(?P<graceid>[\w\d]+)/files/(?P<filename>.+)?$
'
,
'
download
'
,
name
=
"
download
"
),
url
(
r
'
^event/(?P<graceid>[\w\d]+)/files/(?P<filename>.+)?$
'
,
'
download
'
,
name
=
"
download2
"
),
)
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