Esempio n. 1
0
def static_pages(request, page):
    post = get_object_or_404(Post, slug=page)
    post.hit_views()
    return render_to_response('post/page.html',
            {'post': post,
             'current': post.slug,
             'comment_meta': get_comment_cookie_meta(request),
             },
             context_instance=RequestContext(request),
            )
Esempio n. 2
0
def static_pages(request, page):
    post = get_object_or_404(Post, slug=page)
    post.hit_views()
    return render_to_response(
        'post/page.html',
        {
            'post': post,
            'current': post.slug,
            'comment_meta': get_comment_cookie_meta(request),
        },
        context_instance=RequestContext(request),
    )
Esempio n. 3
0
def single_post(request, post_id):
    post = get_object_or_404(Post, id=post_id)
    if not request.user.is_staff and not post.is_public():
        raise Http404

    post.hit_views()

    return render_to_response('post/post_detail.html', {
                'post': post,
                'comment_meta': get_comment_cookie_meta(request),
                },
                context_instance=RequestContext(request),
            )
Esempio n. 4
0
def single_post(request, post_id):
    post = get_object_or_404(Post, id=post_id)
    if not request.user.is_staff and not post.is_public():
        raise Http404

    post.hit_views()

    return render_to_response(
        'post/post_detail.html',
        {
            'post': post,
            'comment_meta': get_comment_cookie_meta(request),
        },
        context_instance=RequestContext(request),
    )