context must be a dict rather than RequestContext.
Request Method: | GET |
---|---|
Request URL: | http://fast-torrent.club/topic/8/31233/30/ |
Django Version: | 4.1.1 |
Exception Type: | TypeError |
Exception Value: | context must be a dict rather than RequestContext. |
Exception Location: | ./venv/lib/python3.10/site-packages/django/template/context.py, line 278, in make_context |
Python Executable: | /usr/bin/uwsgi-core |
Python Version: | 3.10.12 |
Python Path: | ['.', '', '/lib/python310.zip', '/lib/python3.10', '/lib/python3.10/lib-dynload', './venv/lib/python3.10/site-packages'] |
Server time: | Tue, 19 Mar 2024 12:57:36 +0000 |
./venv/lib/python3.10/site-packages/django/core/handlers/exception.py
, line 55, in inner
return inner
else:
@wraps(get_response)
def inner(request):
try:
response = get_response(request)…
except Exception as exc:
response = response_for_exception(request, exc)
return response
return inner
Variable | Value |
---|---|
exc | TypeError('context must be a dict rather than RequestContext.') |
get_response | <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7f99a24e37f0>> |
request | <WSGIRequest: GET '/topic/8/31233/30/'> |
./venv/lib/python3.10/site-packages/django/core/handlers/base.py
, line 197, in _get_response
if response is None:
wrapped_callback = self.make_view_atomic(callback)
# If it is an asynchronous view, run it in a subthread.
if asyncio.iscoroutinefunction(wrapped_callback):
wrapped_callback = async_to_sync(wrapped_callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)…
except Exception as e:
response = self.process_exception_by_middleware(e, request)
if response is None:
raise
# Complain if the view returned None (a common error).
Variable | Value |
---|---|
callback | <function post_list at 0x7f99a21920e0> |
callback_args | () |
callback_kwargs | {'pages': 30, 'pagination_id': 8, 'topic_id': 31233} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <CsrfViewMiddleware get_response=convert_exception_to_response.<locals>.inner>> |
request | <WSGIRequest: GET '/topic/8/31233/30/'> |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f99a24e37f0> |
wrapped_callback | <function post_list at 0x7f99a21920e0> |
././diamandas/myghtyboard/postwrapper.py
, line 828, in post_list
# forumperms = request.user_perms
#
import datetime
# TODO: разобраться как сделать вывод если этот шаблон вообще используется
return django_object_list(…
request,
posts,
paginate_by=int( pages ),
page=int( pagination_id ),
context_processors=[forumContext],
extra_context={
Variable | Value |
---|---|
_lastVisiteDate | datetime.datetime(2023, 11, 17, 18, 29, 8, 718209, tzinfo=datetime.timezone.utc) |
cache_time | 900 |
cnt | range(1, 11) |
current_page | 8 |
datetime | <module 'datetime' from '/usr/lib/python3.10/datetime.py'> |
form | '' |
forum | <Forum: Обсуждение Фильмов> |
is_authenticated | False |
is_author | False |
max | 10 |
min_date | datetime.datetime(2024, 3, 19, 12, 42, 36, 867977) |
mode | '' |
now | datetime.datetime(2024, 3, 19, 12, 57, 36, 867977) |
opened | True |
page_end | 10 |
page_first | 1 |
page_last | 0 |
page_list | ['30', '15', '50'] |
page_next | 9 |
page_prev | 7 |
page_start | 6 |
pager_renge | 2 |
pages | 30 |
pagination_id | 8 |
posts | <QuerySet [<Post: Новый комментарий от woin12>, <Post: Новый комментарий от Lora Pol>, <Post: Новый комментарий от NILLL>, <Post: Новый комментарий от dr.ishka>, <Post: Новый комментарий от Crow200>, <Post: Новый комментарий от Momento mori>, <Post: Новый комментарий от ЖIНОЧКА>, <Post: Новый комментарий от Lora Pol>, <Post: Новый комментарий от Li_Winchester>, <Post: Новый комментарий от woin12>, <Post: Новый комментарий от zero80>, <Post: Новый комментарий от Lora Pol>, <Post: Новый комментарий от twodots>, <Post: Новый комментарий от Brodyaga>, <Post: Новый комментарий от Оз>, <Post: Новый комментарий от annedev>, <Post: Новый комментарий от Li_Winchester>, <Post: Новый комментарий от Lulu>, <Post: Новый комментарий от chepurnoy1>, <Post: Новый комментарий от А мне 3 и Я>, '...(remaining elements truncated)...']> |
request | <WSGIRequest: GET '/topic/8/31233/30/'> |
session_date | {'forum_pages': 30, 'pages': 15} |
session_id | None |
settings | <SiteSettings: 1:defaults> |
topic | <Topic: Заточенные кепки> |
topic_id | 31233 |
././diamandas/myghtyboard/postwrapper.py
, line 680, in django_object_list
c[key] = value()
else:
c[key] = value
if not template_name:
model = queryset.model
template_name = "%s/%s_list.html" % (model._meta.app_label, model._meta.object_name.lower())
t = template_loader.get_template(template_name)
return HttpResponse(t.render(c), mimetype=mimetype)…
def post_list( request, topic_id, pagination_id , pages=None ):
pager_renge = 2
Variable | Value |
---|---|
allow_empty | True |
c | [{'True': True, 'False': False, 'None': None}, {'object_list': <QuerySet [<Post: Новый комментарий от BeSt >, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от Вован500>, <Post: Новый комментарий от [Rec]омендатель >, <Post: Новый комментарий от Novoross1838>, <Post: Новый комментарий от ШумЕрм>, <Post: Новый комментарий от butch.1980>, <Post: Новый комментарий от nowoden>, <Post: Новый комментарий от Shama42>, <Post: Новый комментарий от Cartman_Bro>, <Post: Новый комментарий от id17336443>, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от zotik3>, <Post: Новый комментарий от Messcer>, <Post: Новый комментарий от lammar>, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от Юнкер>, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от Юнкер>, <Post: Новый комментарий от id140332405>, '...(remaining elements truncated)...']>, 'paginator': <django.core.paginator.Paginator object at 0x7f99a0124a30>, 'page_obj': <Page 8 of 10>, 'is_paginated': True, 'results_per_page': 30, 'has_next': True, 'has_previous': True, 'page': 8, 'next': 9, 'previous': 7, 'first_on_page': 211, 'last_on_page': 240, 'pages': 10, 'hits': 292, 'page_range': range(1, 11)}, {}, {'header': 'Заточенные кепки - Обсуждение Фильмов', 'title': 'Обсуждение Фильмов - Заточенные кепки', 'action': '/forum/add_post/31233/', 'path_items': (('Главная', '/'), ('Форум', '/forum/'), (<Forum: Обсуждение Фильмов>, '/forum/3/'), (<Topic: Заточенные кепки>, False)), 'page_first': 1, 'page_range': [6, 7, 8, 9, 10], 'page_last': 0, 'page_prev': 7, 'page_next': 9, 'page_end': 10, 'add_limit_count': 10, 'mode': '', 'is_authenticated': False, 'opened': True, 'is_author': False, 'topic': <Topic: Заточенные кепки>, 'cnt': range(1, 11), 'forum_id': 3, 'form': '', 'forum_name': <Forum: Обсуждение Фильмов>, 'current_user': 'AnonymousUser', 'cache_id': 'post31233_page8_of30_', 'cache_time': 30, 'pages': '30', 'page_list': ['30', '15', '50'], 'lastVisiteDate': datetime.datetime(2023, 11, 17, 18, 29, 8, 718209, tzinfo=datetime.timezone.utc), 'lastEditDate': datetime.datetime(2024, 3, 17, 12, 57, 36, 869471), 'min_date': datetime.datetime(2024, 3, 19, 12, 42, 36, 867977)}] |
context_processors | [<function forum at 0x7f99a22b3eb0>] |
extra_context | {'action': '/forum/add_post/31233/', 'add_limit_count': 10, 'cache_id': 'post31233_page8_of30_', 'cache_time': 30, 'cnt': range(1, 11), 'current_user': 'AnonymousUser', 'form': '', 'forum_id': 3, 'forum_name': <Forum: Обсуждение Фильмов>, 'header': 'Заточенные кепки - Обсуждение Фильмов', 'is_authenticated': False, 'is_author': False, 'lastEditDate': datetime.datetime(2024, 3, 17, 12, 57, 36, 869471), 'lastVisiteDate': datetime.datetime(2023, 11, 17, 18, 29, 8, 718209, tzinfo=datetime.timezone.utc), 'min_date': datetime.datetime(2024, 3, 19, 12, 42, 36, 867977), 'mode': '', 'opened': True, 'page_end': 10, 'page_first': 1, 'page_last': 0, 'page_list': ['30', '15', '50'], 'page_next': 9, 'page_prev': 7, 'page_range': [6, 7, 8, 9, 10], 'pages': '30', 'path_items': (('Главная', '/'), ('Форум', '/forum/'), (<Forum: Обсуждение Фильмов>, '/forum/3/'), (<Topic: Заточенные кепки>, False)), 'title': 'Обсуждение Фильмов - Заточенные кепки', 'topic': <Topic: Заточенные кепки>} |
key | 'min_date' |
mimetype | None |
page | 8 |
page_number | 8 |
page_obj | <Page 8 of 10> |
paginate_by | 30 |
paginator | <django.core.paginator.Paginator object at 0x7f99a0124a30> |
queryset | <QuerySet [<Post: Новый комментарий от woin12>, <Post: Новый комментарий от Lora Pol>, <Post: Новый комментарий от NILLL>, <Post: Новый комментарий от dr.ishka>, <Post: Новый комментарий от Crow200>, <Post: Новый комментарий от Momento mori>, <Post: Новый комментарий от ЖIНОЧКА>, <Post: Новый комментарий от Lora Pol>, <Post: Новый комментарий от Li_Winchester>, <Post: Новый комментарий от woin12>, <Post: Новый комментарий от zero80>, <Post: Новый комментарий от Lora Pol>, <Post: Новый комментарий от twodots>, <Post: Новый комментарий от Brodyaga>, <Post: Новый комментарий от Оз>, <Post: Новый комментарий от annedev>, <Post: Новый комментарий от Li_Winchester>, <Post: Новый комментарий от Lulu>, <Post: Новый комментарий от chepurnoy1>, <Post: Новый комментарий от А мне 3 и Я>, '...(remaining elements truncated)...']> |
request | <WSGIRequest: GET '/topic/8/31233/30/'> |
t | <django.template.backends.django.Template object at 0x7f999f74c7f0> |
template_loader | <module 'django.template.loader' from '/home/webmaster/fasttorrent_ru3/venv/lib/python3.10/site-packages/django/template/loader.py'> |
template_name | 'myghtyboard/post_list.html' |
template_object_name | 'object' |
value | datetime.datetime(2024, 3, 19, 12, 42, 36, 867977) |
./venv/lib/python3.10/site-packages/django/template/backends/django.py
, line 58, in render
self.backend = backend
@property
def origin(self):
return self.template.origin
def render(self, context=None, request=None):
context = make_context(…
context, request, autoescape=self.backend.engine.autoescape
)
try:
return self.template.render(context)
except TemplateDoesNotExist as exc:
reraise(exc, self.backend)
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {'object_list': <QuerySet [<Post: Новый комментарий от BeSt >, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от Вован500>, <Post: Новый комментарий от [Rec]омендатель >, <Post: Новый комментарий от Novoross1838>, <Post: Новый комментарий от ШумЕрм>, <Post: Новый комментарий от butch.1980>, <Post: Новый комментарий от nowoden>, <Post: Новый комментарий от Shama42>, <Post: Новый комментарий от Cartman_Bro>, <Post: Новый комментарий от id17336443>, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от zotik3>, <Post: Новый комментарий от Messcer>, <Post: Новый комментарий от lammar>, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от Юнкер>, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от Юнкер>, <Post: Новый комментарий от id140332405>, '...(remaining elements truncated)...']>, 'paginator': <django.core.paginator.Paginator object at 0x7f99a0124a30>, 'page_obj': <Page 8 of 10>, 'is_paginated': True, 'results_per_page': 30, 'has_next': True, 'has_previous': True, 'page': 8, 'next': 9, 'previous': 7, 'first_on_page': 211, 'last_on_page': 240, 'pages': 10, 'hits': 292, 'page_range': range(1, 11)}, {}, {'header': 'Заточенные кепки - Обсуждение Фильмов', 'title': 'Обсуждение Фильмов - Заточенные кепки', 'action': '/forum/add_post/31233/', 'path_items': (('Главная', '/'), ('Форум', '/forum/'), (<Forum: Обсуждение Фильмов>, '/forum/3/'), (<Topic: Заточенные кепки>, False)), 'page_first': 1, 'page_range': [6, 7, 8, 9, 10], 'page_last': 0, 'page_prev': 7, 'page_next': 9, 'page_end': 10, 'add_limit_count': 10, 'mode': '', 'is_authenticated': False, 'opened': True, 'is_author': False, 'topic': <Topic: Заточенные кепки>, 'cnt': range(1, 11), 'forum_id': 3, 'form': '', 'forum_name': <Forum: Обсуждение Фильмов>, 'current_user': 'AnonymousUser', 'cache_id': 'post31233_page8_of30_', 'cache_time': 30, 'pages': '30', 'page_list': ['30', '15', '50'], 'lastVisiteDate': datetime.datetime(2023, 11, 17, 18, 29, 8, 718209, tzinfo=datetime.timezone.utc), 'lastEditDate': datetime.datetime(2024, 3, 17, 12, 57, 36, 869471), 'min_date': datetime.datetime(2024, 3, 19, 12, 42, 36, 867977)}] |
request | None |
self | <django.template.backends.django.Template object at 0x7f999f74c7f0> |
./venv/lib/python3.10/site-packages/django/template/context.py
, line 278, in make_context
def make_context(context, request=None, **kwargs):
"""
Create a suitable Context from a plain dict and optionally an HttpRequest.
"""
if context is not None and not isinstance(context, dict):
raise TypeError(…
"context must be a dict rather than %s." % context.__class__.__name__
)
if request is None:
context = Context(context, **kwargs)
else:
# The following pattern is required to ensure values from
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {'object_list': <QuerySet [<Post: Новый комментарий от BeSt >, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от Вован500>, <Post: Новый комментарий от [Rec]омендатель >, <Post: Новый комментарий от Novoross1838>, <Post: Новый комментарий от ШумЕрм>, <Post: Новый комментарий от butch.1980>, <Post: Новый комментарий от nowoden>, <Post: Новый комментарий от Shama42>, <Post: Новый комментарий от Cartman_Bro>, <Post: Новый комментарий от id17336443>, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от zotik3>, <Post: Новый комментарий от Messcer>, <Post: Новый комментарий от lammar>, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от Юнкер>, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от Юнкер>, <Post: Новый комментарий от id140332405>, '...(remaining elements truncated)...']>, 'paginator': <django.core.paginator.Paginator object at 0x7f99a0124a30>, 'page_obj': <Page 8 of 10>, 'is_paginated': True, 'results_per_page': 30, 'has_next': True, 'has_previous': True, 'page': 8, 'next': 9, 'previous': 7, 'first_on_page': 211, 'last_on_page': 240, 'pages': 10, 'hits': 292, 'page_range': range(1, 11)}, {}, {'header': 'Заточенные кепки - Обсуждение Фильмов', 'title': 'Обсуждение Фильмов - Заточенные кепки', 'action': '/forum/add_post/31233/', 'path_items': (('Главная', '/'), ('Форум', '/forum/'), (<Forum: Обсуждение Фильмов>, '/forum/3/'), (<Topic: Заточенные кепки>, False)), 'page_first': 1, 'page_range': [6, 7, 8, 9, 10], 'page_last': 0, 'page_prev': 7, 'page_next': 9, 'page_end': 10, 'add_limit_count': 10, 'mode': '', 'is_authenticated': False, 'opened': True, 'is_author': False, 'topic': <Topic: Заточенные кепки>, 'cnt': range(1, 11), 'forum_id': 3, 'form': '', 'forum_name': <Forum: Обсуждение Фильмов>, 'current_user': 'AnonymousUser', 'cache_id': 'post31233_page8_of30_', 'cache_time': 30, 'pages': '30', 'page_list': ['30', '15', '50'], 'lastVisiteDate': datetime.datetime(2023, 11, 17, 18, 29, 8, 718209, tzinfo=datetime.timezone.utc), 'lastEditDate': datetime.datetime(2024, 3, 17, 12, 57, 36, 869471), 'min_date': datetime.datetime(2024, 3, 19, 12, 42, 36, 867977)}] |
kwargs | {'autoescape': True} |
request | None |
AnonymousUser
No GET data
No POST data
No FILES data
Variable | Value |
---|---|
forum_pages | 30 |
Variable | Value |
---|---|
CONTENT_LENGTH | '' |
CONTENT_TYPE | '' |
DOCUMENT_ROOT | '/etc/nginx/html' |
HTTP_ACCEPT | '*/*' |
HTTP_CONNECTION | 'close' |
HTTP_HOST | 'fast-torrent.club' |
HTTP_REFERER | 'http://fast-fiml.ru/topic/8/31233/30/' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_X_FORWARDED_FOR | '3.85.63.190' |
HTTP_X_FORWARDED_PROTO | 'http' |
HTTP_X_REAL_IP | '3.85.63.190' |
PATH_INFO | '********************' |
QUERY_STRING | '' |
REMOTE_ADDR | '5.61.59.230' |
REMOTE_PORT | '48732' |
REQUEST_METHOD | 'GET' |
REQUEST_SCHEME | 'http' |
REQUEST_URI | '/topic/8/31233/30/' |
SCRIPT_NAME | '' |
SERVER_NAME | 'www.fast-torrent.ru' |
SERVER_PORT | '80' |
SERVER_PROTOCOL | 'HTTP/1.0' |
Setting | Value |
---|
You’re seeing this error because you have DEBUG = True
in your
Django settings file. Change that to False
, and Django will
display a standard page generated by the handler for this status code.