Use ResponseException for various places rather than needing to check the return value for responseness

This commit is contained in:
Danielle McLean 2018-07-03 09:51:51 +10:00
parent 7d17a92793
commit 065619772e
Signed by untrusted user: 00dani
GPG key ID: 8EB789DDF3ABD240
8 changed files with 17 additions and 26 deletions

View file

@ -24,10 +24,6 @@ def index(request, page=None):
entries = user.entries.filter(kind__in=kinds.on_home)
entries = pagination.paginate(queryset=entries, reverse=url, page=page)
# If we got a valid HTTP response, just return it without rendering.
if hasattr(entries, 'content'):
return entries
return {
'user': user,
'entries': entries,