comparison smiley/views.py @ 1032:e932f2ecd4a7

Django 1.8 warnings / tech debt cleanup.
author Brian Neal <bgneal@gmail.com>
date Sat, 26 Dec 2015 15:10:55 -0600
parents ee87ea74d46b
children
comparison
equal deleted inserted replaced
1031:e1c03da72818 1032:e932f2ecd4a7
1 """ 1 """
2 Views for the Smiley application. 2 Views for the Smiley application.
3 """ 3 """
4 from django.shortcuts import render_to_response 4 from django.shortcuts import render
5 from django.template import RequestContext
6 from django.contrib.auth.decorators import login_required 5 from django.contrib.auth.decorators import login_required
7 from django.views.decorators.http import require_GET 6 from django.views.decorators.http import require_GET
8 7
9 from smiley.models import Smiley 8 from smiley.models import Smiley
10 9
11 @login_required 10 @login_required
12 @require_GET 11 @require_GET
13 def farm(request, extra=False): 12 def farm(request, extra=False):
14 return render_to_response('smiley/smiley_farm.html', { 13 return render(request, 'smiley/smiley_farm.html', {
15 'smilies': Smiley.objects.get_smilies(extra), 14 'smilies': Smiley.objects.get_smilies(extra),
16 }, 15 })
17 context_instance = RequestContext(request))
18