Mercurial > public > sg101
comparison antispam/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 | a8dc08cc5db4 |
children | 0219fafab7a6 |
comparison
equal
deleted
inserted
replaced
1031:e1c03da72818 | 1032:e932f2ecd4a7 |
---|---|
1 """Views for the antispam application.""" | 1 """Views for the antispam application.""" |
2 | 2 |
3 from django.shortcuts import render_to_response | 3 from django.shortcuts import render |
4 from django.template import RequestContext | |
5 | 4 |
6 | 5 |
7 def suspended(request): | 6 def suspended(request): |
8 """This view checks the user's status for suspension and displays an | 7 """This view checks the user's status for suspension and displays an |
9 appropriate message. | 8 appropriate message. |
10 """ | 9 """ |
11 is_active = request.user.is_active | 10 is_active = request.user.is_active |
12 | 11 |
13 return render_to_response('antispam/suspended.html', { | 12 return render(request, 'antispam/suspended.html', { |
14 'is_active': is_active, | 13 'is_active': is_active, |
15 }, | 14 }) |
16 context_instance = RequestContext(request)) |