forked from 0x2620/pandora
handle unicode usernames/titles
This commit is contained in:
parent
02333c2ad0
commit
62b07fcc8e
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ class Text(models.Model):
|
||||||
return cls.objects.get(user__username=username, name=name)
|
return cls.objects.get(user__username=username, name=name)
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
return '/texts/%s' % quote(self.get_id().replace('_', '\t').replace(' ', '_')).replace('/', '%2F')
|
return '/texts/%s' % quote(self.get_id().replace('_', '\t').replace(' ', '_').encode('utf-8')).replace('/', '%2F')
|
||||||
|
|
||||||
def get_absolute_pdf_url(self):
|
def get_absolute_pdf_url(self):
|
||||||
return '%s/text.pdf' % self.get_absolute_url()
|
return '%s/text.pdf' % self.get_absolute_url()
|
||||||
|
|
Loading…
Reference in a new issue