##// END OF EJS Templates
Download image in chunks and limit size even if the server has no...
Download image in chunks and limit size even if the server has no content-lenght or lies

File last commit:

r918:06775760 default
r965:b4b69de3 default
Show More
banned.py
17 lines | 492 B | text/x-python | PythonLexer
neko259
Rewriting views to class-based
r542 from django.shortcuts import get_object_or_404, render
from boards import utils
from boards.models import Ban
from boards.views.base import BaseBoardView
class BannedView(BaseBoardView):
def get(self, request):
"""Show the page that notifies that user is banned"""
neko259
Fixed calls to render shortcut to use dict instead of context instance
r918 params = dict()
neko259
Rewriting views to class-based
r542
ban = get_object_or_404(Ban, ip=utils.get_client_ip(request))
neko259
Fixed calls to render shortcut to use dict instead of context instance
r918 params['ban_reason'] = ban.reason
neko259
Updates to support django 1.7
r872
neko259
Fixed calls to render shortcut to use dict instead of context instance
r918 return render(request, 'boards/staticpages/banned.html', params)