Fix full abs url
parent
94dfa02eb2
commit
de3a2b62ed
|
@ -41,7 +41,7 @@ class BlogMiddleware:
|
|||
pass
|
||||
pass
|
||||
|
||||
if host == 'www.rochacbruno.com.br' or host == 'rochacbruno.com.br':
|
||||
if host == 'rochacbruno.com.br':
|
||||
request.blog_user = User.objects.get(id=2156)
|
||||
|
||||
if host == 'snipt.joshhudnall.com':
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
<title>Nick Sergeant</title>
|
||||
<link>http://nicksergeant.com/?rss</link>
|
||||
{% elif request.blog_user.username == 'rochacbruno' %}
|
||||
<atom:link href="http://www.rochacbruno.com.br/?rss" rel="self" type="application/rss+xml" />
|
||||
<atom:link href="http://rochacbruno.com.br/?rss" rel="self" type="application/rss+xml" />
|
||||
<description>Bruno Cezar Rocha</description>
|
||||
<title>Bruno Cezar Rocha</title>
|
||||
<link>http://www.rochacbruno.com.br/?rss</link>
|
||||
<link>http://rochacbruno.com.br/?rss</link>
|
||||
{% elif request.blog_user.username == 'joshhudnall' %}
|
||||
<atom:link href="http://snipt.joshhudnall.com/?rss" rel="self" type="application/rss+xml" />
|
||||
<description>Josh Hudnall</description>
|
||||
|
|
|
@ -116,7 +116,7 @@ class Snipt(models.Model):
|
|||
else:
|
||||
return 'http://nicksergeant.com/{}/'.format(self.slug)
|
||||
elif self.user.id == 2156:
|
||||
return 'http://www.rochacbruno.com.br/{}/'.format(self.slug)
|
||||
return 'http://rochacbruno.com.br/{}/'.format(self.slug)
|
||||
elif self.user.id == 10325:
|
||||
return 'http://snipt.joshhudnall.com/{}/'.format(self.slug)
|
||||
else:
|
||||
|
@ -135,6 +135,10 @@ class Snipt(models.Model):
|
|||
if self.blog_post:
|
||||
if self.user.id == 3:
|
||||
return 'http://nicksergeant.com/{}/'.format(self.slug)
|
||||
elif self.user.id == 2156:
|
||||
return 'http://rochacbruno.com.br/{}/'.format(self.slug)
|
||||
elif self.user.id == 10325:
|
||||
return 'http://snipt.joshhudnall.com/{}/'.format(self.slug)
|
||||
else:
|
||||
return 'https://{}.snipt.net/{}/'.format(self.user.username, self.slug)
|
||||
|
||||
|
|
Loading…
Reference in New Issue