X-Git-Url: http://gitweb.fperrin.net/?p=djsite.git;a=blobdiff_plain;f=quotes%2Fviews.py;h=4e66378bc6ea8cc8ad5acf7937afae14c5002350;hp=9bed533b045f73e0385f32c934e5c780d3cc2b70;hb=c0ce9798b8cb154c7fd1d4a1a9c6ab52c197be5c;hpb=060697325678491b635afba501ffae7abe09c468 diff --git a/quotes/views.py b/quotes/views.py index 9bed533..4e66378 100644 --- a/quotes/views.py +++ b/quotes/views.py @@ -7,6 +7,7 @@ from .models import Author, Work, Quote, QuoteTag # Create your views here. def onequote(request, quote_id): q = Quote.objects.get(id=quote_id) + q.incr_display() context = { 'quote' : q } return render(request, 'quotes/onequote.html', context) @@ -21,11 +22,13 @@ def tags(request, tag_id): def author(request, author_id): author = Author.objects.get(id=author_id) + author.incr_display() context = { 'author' : author } return render(request, 'quotes/author.html', context) def work(request, work_id): work = Work.objects.get(id=work_id) + work.incr_display() context = { 'work': work } return render(request, 'quotes/work.html', context)