Media URLs with ids in them are now like /u/cwebber/m/id:4112/ rather than /u/cwebber/m/4112/

This avoids some potential name collision issues.

This commit sponsored by Asokan Pichai.  Thank you!
This commit is contained in:
Christopher Allan Webber
2013-02-26 13:38:11 -06:00
parent 397c22d139
commit 7de20e5234
2 changed files with 27 additions and 18 deletions

View File

@@ -150,8 +150,10 @@ class MediaEntryMixin(object):
@property
def slug_or_id(self):
return (self.slug or self.id)
if self.slug:
return self.slug
else:
return u'id:%s' % self.id
def url_for_self(self, urlgen, **extra_args):
"""