This commit is contained in:
2017-12-08 02:43:36 +03:00
parent ad4f5beb64
commit 78c434095a
3 changed files with 7 additions and 8 deletions

View File

@ -1,5 +1,5 @@
{% load staticfiles %}
{% comment %} {% load pagination_filters %} {% comment %}
{% load pagination_filters %}
<html>
<head>
<title>BLOG</title>

View File

@ -1,6 +1,5 @@
{% comment %}{% extends 'blog/base.html' %}{% endcomment %}
{% comment %}{% block content %}{% endcomment %}
{% extends 'blog/base.html' %}
{% block content %}
<div class="post">
<span class="delete"><a href='#deletionDialog';"><i class="fa fa-trash"></i></a></span>
<span class="edit"><a href="{% url 'post_edit' pk=post.pk %}"><i class="fa fa-pencil"></i></a></span>
@ -29,4 +28,4 @@
</div>
</div>
</div>
{% comment %}{% endblock %}{% endcomment %}
{% endblock %}

View File

@ -52,9 +52,9 @@ def post_list(request, page='1', tag=None):
except EmptyPage: # If page is out of range (e.g. 9999), deliver last page of results.
posts = paginator.page(paginator.num_pages)
#print dir(posts.paginator)
# return render_to_response('blog/post_list.html', {'posts': posts, 'latest': latest, 'cloud': tag_cloud, 'search_query': search_query})
content = {'post' : Post.objects.get(pk=1)}
return render(request, 'blog/post_detail.html')
return render_to_response('blog/post_list.html', {'posts': posts, 'latest': latest, 'cloud': tag_cloud, 'search_query': search_query})
# content = {'post' : Post.objects.get(pk=1)}
# return render(request, 'blog/post_detail.html')
def post_detail(request, pk):
post = get_object_or_404(Post, pk=pk)