projects
/
mediagoblin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ed4722
)
slug-style urls in previous and next urls look much better
author
Caleb Forbes Davis V
<caldavis@gmail.com>
Wed, 6 Jul 2011 02:40:00 +0000
(21:40 -0500)
committer
Caleb Forbes Davis V
<caldavis@gmail.com>
Wed, 6 Jul 2011 02:40:00 +0000
(21:40 -0500)
Bug #434 - identifies media by slug instead of _id in prev/next
mediagoblin/db/models.py
patch
|
blob
|
blame
|
history
diff --git
a/mediagoblin/db/models.py
b/mediagoblin/db/models.py
index 8aa35ca9c59d8085f3d1ef46c71c0520718b491a..c7506dbba371274d53dff3c4814409937edc19da 100644
(file)
--- a/
mediagoblin/db/models.py
+++ b/
mediagoblin/db/models.py
@@
-154,7
+154,7
@@
class MediaEntry(Document):
if cursor.count():
return urlgen('mediagoblin.user_pages.media_home',
user=self.uploader()['username'],
- media=unicode(cursor[0]['
_id
']))
+ media=unicode(cursor[0]['
slug
']))
def url_to_next(self, urlgen):
"""
@@
-167,7
+167,7
@@
class MediaEntry(Document):
if cursor.count():
return urlgen('mediagoblin.user_pages.media_home',
user=self.uploader()['username'],
- media=unicode(cursor[0]['
_id
']))
+ media=unicode(cursor[0]['
slug
']))
def uploader(self):
return self.db.User.find_one({'_id': self['uploader']})