Setup for Ashley

master
Nick Sergeant 2012-09-18 12:37:11 -04:00
parent 9772400dd1
commit d5175d75b6
5 changed files with 66 additions and 36 deletions

View File

@ -35,3 +35,6 @@ class BlogMiddleware:
if host == 'nicksergeant.com':
request.blog_user = User.objects.get(id=3)
if host == 'ashleysergeant.com':
request.blog_user = User.objects.get(id=18)

View File

@ -5,6 +5,11 @@
<description>Nick Sergeant</description>
<title>Nick Sergeant</title>
<link>http://nicksergeant.com/?rss</link>
{% elif request.blog_user.username == 'ashley' %}
<atom:link href="http://ashleysergeant.com/?rss" rel="self" type="application/rss+xml" />
<description>Ashley Sergeant</description>
<title>Ashley Sergeant</title>
<link>http://ashleysergeant.com/?rss</link>
{% elif request.blog_user.username == 'rochacbruno' %}
<atom:link href="http://rochacbruno.com.br/?rss" rel="self" type="application/rss+xml" />
<description>Bruno Cezar Rocha</description>

View File

@ -52,13 +52,20 @@
Nick Sergeant
{% elif blog_user.username == 'blog' %}
Snipt Blog
{% elif blog_user.username == 'ashley' %}
Ashley Sergeant
{% else %}
{{ blog_user.username }}
{% endif %}
</a>
<p>
I'm a front-end web developer in Rochester, NY working on the <a href="http://amara.org/">Amara</a> project for <a href="http://pculture.org/">PCF</a>. I also created <a href="https://snipt.net/">Snipt</a>.
</p>
{% if blog_user.username == 'nick' %}
<p>
I'm a front-end web developer in Rochester, NY working on the <a href="http://amara.org/">Amara</a> project for <a href="http://pculture.org/">PCF</a>. I also created <a href="https://snipt.net/">Snipt</a>.
</p>
{% endif %}
{% if blog_user.username == 'ashley' %}
<p>Life is like photography, we use<br />the negatives to develop.</p>
{% endif %}
</div>
</header>
{% endblock %}
@ -67,37 +74,48 @@
{% block content %}{% endblock %}
</section>
<aside class="main">
<section class="module projects">
<h1>Notable projects</h1>
<ul>
<li><a href="https://snipt.net/">Snipt</a></li>
<li><a href="http://amara.org">Amara</a></li>
<li><a href="http://sidepros.com/">SidePros</a></li>
<li><a href="https://github.com/nicksergeant/billmonster/">Bill Monster</a></li>
<li><a href="http://craftofman.com/">Craft of Man</a></li>
<li><a href="http://afeedapart.com/">A Feed Apart</a></li>
<li><a href="http://rochestermade.com">Rochester Made</a></li>
<li><a href="http://refreshroc.org/">Refresh Rochester</a></li>
</ul>
</section>
<section class="module places">
<h1>Elsewhere</h1>
<ul>
<li><a href="mailto:nick@nicksergeant.com">Email</a></li>
<li><a href="https://twitter.com/nicksergeant">Twitter</a></li>
<li><a href="https://github.com/nicksergeant">GitHub</a></li>
<li><a href="http://www.linkedin.com/in/nicksergeant">LinkedIn</a></li>
<li><a href="http://portfolio.nicksergeant.com">Portfolio</a></li>
</ul>
</section>
<section class="module snipts">
<h1>Recent snipts</h1>
<ul>
{% for snipt in normal_snipts %}
<li><a href="{{ snipt.get_full_absolute_url }}">{{ snipt.title }}</a></li>
{% endfor %}
</ul>
</section>
{% if blog_user.username == 'nick' %}
<section class="module projects">
<h1>Notable projects</h1>
<ul>
<li><a href="https://snipt.net/">Snipt</a></li>
<li><a href="http://amara.org">Amara</a></li>
<li><a href="http://sidepros.com/">SidePros</a></li>
<li><a href="https://github.com/nicksergeant/billmonster/">Bill Monster</a></li>
<li><a href="http://craftofman.com/">Craft of Man</a></li>
<li><a href="http://afeedapart.com/">A Feed Apart</a></li>
<li><a href="http://rochestermade.com">Rochester Made</a></li>
<li><a href="http://refreshroc.org/">Refresh Rochester</a></li>
</ul>
</section>
<section class="module places">
<h1>Elsewhere</h1>
<ul>
<li><a href="mailto:nick@nicksergeant.com">Email</a></li>
<li><a href="https://twitter.com/nicksergeant">Twitter</a></li>
<li><a href="https://github.com/nicksergeant">GitHub</a></li>
<li><a href="http://www.linkedin.com/in/nicksergeant">LinkedIn</a></li>
<li><a href="http://portfolio.nicksergeant.com">Portfolio</a></li>
</ul>
</section>
<section class="module snipts">
<h1>Recent snipts</h1>
<ul>
{% for snipt in normal_snipts %}
<li><a href="{{ snipt.get_full_absolute_url }}">{{ snipt.title }}</a></li>
{% endfor %}
</ul>
</section>
{% endif %}
{% if blog_user.username == 'ashley' %}
<section class="module places">
<h1>Elsewhere</h1>
<ul>
<li><a href="mailto:ashley@ashleysergeant.com">Email</a></li>
<li><a href="https://twitter.com/ashleysergeant">Twitter</a></li>
</ul>
</section>
{% endif %}
</aside>
</section>
</div>

View File

@ -41,7 +41,7 @@ def blog_list(request, username_or_custom_slug=None):
context['snipts'] = context['snipts'][:20]
return rss(request, context)
if request.blog_user.profile.is_pro and request.blog_user.username == 'nick':
if request.blog_user.profile.is_pro and request.blog_user.username in ['nick', 'ashley']:
template = 'blogs/themes/pro-adams/list.html'
else:
template = 'blogs/themes/default/list.html'
@ -84,7 +84,7 @@ def blog_post(request, username_or_custom_slug):
'snipt': snipt,
}
if request.blog_user.profile.is_pro and request.blog_user.username == 'nick':
if request.blog_user.profile.is_pro and request.blog_user.username in ['nick', 'ashley']:
template = 'blogs/themes/pro-adams/post.html'
else:
template = 'blogs/themes/default/post.html'

View File

@ -120,6 +120,8 @@ class Snipt(models.Model):
return 'http://nick.snipt.localhost/{}/'.format(self.slug)
else:
return 'http://nicksergeant.com/{}/'.format(self.slug)
elif self.user.id == 18:
return 'http://ashleysergeant.com/{}/'.format(self.slug)
elif self.user.id == 2156:
return 'http://rochacbruno.com.br/{}/'.format(self.slug)
elif self.user.id == 10325:
@ -143,6 +145,8 @@ class Snipt(models.Model):
return 'http://nick.snipt.localhost/{}/'.format(self.slug)
else:
return 'http://nicksergeant.com/{}/'.format(self.slug)
elif self.user.id == 18:
return 'http://ashleysergeant.com/{}/'.format(self.slug)
elif self.user.id == 2156:
return 'http://rochacbruno.com.br/{}/'.format(self.slug)
elif self.user.id == 10325: