Views for blog posts

master
Nick Sergeant 2012-09-17 15:53:07 -04:00
parent 3b35d1b801
commit 66e798136e
1 changed files with 4 additions and 0 deletions

View File

@ -70,6 +70,10 @@ def blog_post(request, username_or_custom_slug):
normal_snipts = normal_snipts.exclude(tags__name__in=['tmp'])
normal_snipts = normal_snipts[:3]
if snipt.user != request.user:
snipt.views = snipt.views + 1
snipt.save()
context = {
'blog_user': request.blog_user,
'detail': True,