Working on pro theme

master
Nick Sergeant 2012-08-06 00:11:12 -04:00
parent 0a1aa0f838
commit d8018a953c
2 changed files with 12 additions and 15 deletions

View File

@ -1,6 +1,7 @@
from django.shortcuts import get_object_or_404, render_to_response from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from annoying.functions import get_object_or_None from annoying.functions import get_object_or_None
from django.template import RequestContext
from django.conf import settings
from snipts.models import Snipt from snipts.models import Snipt
@ -28,12 +29,10 @@ def blog_list(request, username_or_custom_slug=None):
context['snipts'] = context['snipts'][:20] context['snipts'] = context['snipts'][:20]
return rss(request, context) return rss(request, context)
#if request.blog_user.profile.is_pro: if request.blog_user.profile.is_pro and settings.DEBUG:
#template = 'blogs/themes/pro-adams/list.html' template = 'blogs/themes/pro-adams/list.html'
#else: else:
#template = 'blogs/themes/default/list.html' template = 'blogs/themes/default/list.html'
template = 'blogs/themes/default/list.html'
return render_to_response( return render_to_response(
template, template,
@ -62,12 +61,10 @@ def blog_post(request, username_or_custom_slug):
'snipt': snipt, 'snipt': snipt,
} }
#if request.blog_user.profile.is_pro: if request.blog_user.profile.is_pro and settings.DEBUG:
#template = 'blogs/themes/pro-adams/post.html' template = 'blogs/themes/pro-adams/post.html'
#else: else:
#template = 'blogs/themes/default/post.html' template = 'blogs/themes/default/post.html'
template = 'blogs/themes/default/post.html'
return render_to_response( return render_to_response(
template, template,

View File

@ -22,7 +22,7 @@
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/snipt.css?26" /> <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/snipt.css?26" />
{% if has_snipts and not detail %} {% if has_snipts and not detail %}
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ request.path }}?rss{% if not public %}&api_key={{ request.user.api_key.key }}{% endif %}" /> <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ request.path }}?rss{% if not public %}&amp;api_key={{ request.user.api_key.key }}{% endif %}" />
{% endif %} {% endif %}
<!--[if IE]> <!--[if IE]>
@ -367,7 +367,7 @@
{% include 'snipts/snipt-js-template.html' %} {% include 'snipts/snipt-js-template.html' %}
{% include 'snipts/snipt-edit-js-template.html' %} {% include 'snipts/snipt-edit-js-template.html' %}
</div> </div>
{% if not debug %} {% if not debug %}
<script type="text/javascript"> <script type="text/javascript">
var _gauges = _gauges || []; var _gauges = _gauges || [];