projects
/
htsworkflow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f58cf4
)
Add get_absolute_url to Library model and use it for linking from both the
author
Diane Trout
<diane@caltech.edu>
Wed, 4 Mar 2009 20:10:35 +0000
(20:10 +0000)
committer
Diane Trout
<diane@caltech.edu>
Wed, 4 Mar 2009 20:10:35 +0000
(20:10 +0000)
index and detail view to the public detail page.
htsworkflow/frontend/samples/models.py
patch
|
blob
|
history
diff --git
a/htsworkflow/frontend/samples/models.py
b/htsworkflow/frontend/samples/models.py
index 9301d4f3eb788d5c1d3d63d493a671059dea38e3..a3c27abe7a793b74ae4be15b3d3d325af7767e26 100644
(file)
--- a/
htsworkflow/frontend/samples/models.py
+++ b/
htsworkflow/frontend/samples/models.py
@@
-228,6
+228,10
@@
class Library(models.Model):
def public(self):
SITE_ROOT = '/'
- summary_url =
urlparse.urljoin(SITE_ROOT, 'library/%s' % (self.library_id)
)
+ summary_url =
self.get_absolute_url(
)
return '<a href="%s">S</a>' % (summary_url,)
public.allow_tags = True
+
+ @models.permalink
+ def get_absolute_url(self):
+ return ('htsworkflow.frontend.samples.views.library_to_flowcells', [str(self.id)])