##// END OF EJS Templates
Added next id list, previous id list and thread to the post XML output
Added next id list, previous id list and thread to the post XML output

File last commit:

r545:9c27ae2e 1.7-dev
r829:5301b1d8 decentral
Show More
banned.py
16 lines | 526 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
Added test for all views get requests. Fixed banned view failing this test
r545 context = self.get_context_data(request=request)
neko259
Rewriting views to class-based
r542
ban = get_object_or_404(Ban, ip=utils.get_client_ip(request))
context['ban_reason'] = ban.reason
return render(request, 'boards/staticpages/banned.html', context)