Blog slugs

master
Nick Sergeant 2012-06-04 15:58:03 -04:00
parent df2d4978c2
commit a77a01005a
1 changed files with 4 additions and 1 deletions

View File

@ -100,7 +100,10 @@ class Snipt(models.Model):
return '/{}/'.format(self.custom_slug)
if self.blog_post:
return '/{}/'.format(self.slug)
if self.user.id == 3:
return 'http://nicksergeant.com/{}/'.format(self.slug)
else:
return 'https://{}.snipt.net/{}/'.format(self.user.username, self.slug)
if self.public:
return '/{}/{}/'.format(self.user.username, self.slug)