##// END OF EJS Templates
Don't store threads list of a tag, cause this data can be got from thread's tags relations
Don't store threads list of a tag, cause this data can be got from thread's tags relations

File last commit:

r872:752c0b44 default
r909:ffe54c08 default
Show More
banned.py
19 lines | 595 B | text/x-python | PythonLexer
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"""
context = self.get_context_data(request=request)
ban = get_object_or_404(Ban, ip=utils.get_client_ip(request))
context['ban_reason'] = ban.reason
# TODO Use dict here
return render(request, 'boards/staticpages/banned.html',
context_instance=context)