All pastes #120797 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-08-07 15:38 UTC
rendered paste body
def detail(request):
    year = kwargs['year']
    month = kwargs['month']
    day = kwargs['day']
    slug = kwargs['slug']
    try:
        p = Post.objects.get(year=kwargs['year'],month=['month'], day=['day'], slug=['slug'])
    except Post.DoesNotExist:
        raise Http404
    return render_to_response('blog/detail.html', {'post': p})