Permalink
Browse files

Fixed several errors with the sites

git-svn-id: file:///Users/brian/Backups/S3/backups/Wednesday/brian/svn/djog/trunk@46 95ab7de8-677b-4562-a266-b8acc9dd993c
  • Loading branch information...
1 parent 1d4cbb7 commit afbcbd4c356215128536c7c91b4579631490dc0c @alex alex committed Oct 23, 2007
View
7 djog/sites.py
@@ -1,4 +1,5 @@
+from django.core import urlresolvers
from django.http import HttpResponseRedirect
from django.views.generic.date_based import *
from django.shortcuts import render_to_response
@@ -69,7 +70,7 @@ def entry(self, request, **kwargs):
def entries_by_tag(self, request, slug):
tag = Tag.objects.get(slug=slug)
entries = Entry.objects.filter(tags__slug=slug)
- return render_to_response('blog/tag_list.html', {
+ return render_to_response('djog/tag_list.html', {
'entries': entries,
'tag': tag,
}, context_instance=RequestContext(request))
@@ -79,12 +80,12 @@ def feed(self, request, url):
def search(self, request):
if not request.GET.has_key('s'):
- return HttpResponseRedirect('/blog/')
+ return HttpResponseRedirect(urlresolvers.reverse('djog_index'))
search = smart_str(request.GET['s'])
results = Entry.objects.filter(
Q(title__icontains=search) | Q(text__icontains=search)
)
- return render_to_response('blog/search.html', {
+ return render_to_response('djog/search.html', {
'term': search,
'results': results,
}, context_instance=RequestContext(request))
View
2 djog/templates/djog/entry_date.html
@@ -8,7 +8,7 @@
{% block content %}
{% load comments %}
{% for entry in object_list %}
-{% get_free_comment_count for blog.entry entry.pk as comment_count %}
+{% get_free_comment_count for djog.entry entry.pk as comment_count %}
{% include "entry.html" %}
{% endfor %}
{% endblock %}
View
6 djog/templates/djog/entry_detail.html
@@ -61,8 +61,8 @@ <h3 id="trackbacks">{{ object.incomingtrackback_set.count }} Trackback{{ object.
</div>
</div>
<div class="clear"></div>
-{% get_free_comment_count for blog.entry object.pk as comment_count %}
-{% get_free_comment_list for blog.entry object.pk as comment_list %}
+{% get_free_comment_count for djog.entry object.pk as comment_count %}
+{% get_free_comment_list for djog.entry object.pk as comment_list %}
<div class="comments_template_wrap">
<div class="comments_template">
<h3 id="comments">{{ comment_count }} Response{{ comment_count|pluralize }} to "{{ object.title }}"</h3>
@@ -78,7 +78,7 @@ <h3 id="comments">{{ comment_count }} Response{{ comment_count|pluralize }} to "
{% endfor %}
</ol>
<h3 id="respond">Leave a Reply</h3>
- {% free_comment_form for blog.entry object.pk %}
+ {% free_comment_form for djog.entry object.pk %}
</div>
</div>
View
2 djog/templates/djog/search.html
@@ -8,7 +8,7 @@
{% if results %}
{% load comments %}
{% for entry in results %}
-{% get_free_comment_count for blog.entry entry.pk as comment_count %}
+{% get_free_comment_count for djog.entry entry.pk as comment_count %}
{% include "entry.html" %}
{% endfor %}
{% else %}
View
2 djog/templates/djog/tag_list.html
@@ -7,7 +7,7 @@
{% block content %}
{% load comments %}
{% for entry in entries %}
-{% get_free_comment_count for blog.entry entry.pk as comment_count %}
+{% get_free_comment_count for djog.entry entry.pk as comment_count %}
{% include "entry.html" %}
{% endfor %}
{% endblock %}

0 comments on commit afbcbd4

Please sign in to comment.