context must be a dict rather than RequestContext.
Request Method: | GET |
---|---|
Request URL: | http://www.fast-torrent.ru/topic/23/45476/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 05:24:19 +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/23/45476/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 0x7f99a2191fc0> |
callback_args | () |
callback_kwargs | {'pages': 30, 'pagination_id': 23, 'topic_id': 45476} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <CsrfViewMiddleware get_response=convert_exception_to_response.<locals>.inner>> |
request | <WSGIRequest: GET '/topic/23/45476/30/'> |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f99a24e37f0> |
wrapped_callback | <function post_list at 0x7f99a2191fc0> |
././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, 7, 24, 20, 27, 14, 453575, tzinfo=datetime.timezone.utc) |
cache_time | 900 |
cnt | range(1, 26) |
current_page | 23 |
datetime | <module 'datetime' from '/usr/lib/python3.10/datetime.py'> |
form | '' |
forum | <Forum: Обсуждение Фильмов> |
is_authenticated | False |
is_author | False |
max | 25 |
min_date | datetime.datetime(2024, 3, 19, 5, 9, 19, 527036) |
mode | '' |
now | datetime.datetime(2024, 3, 19, 5, 24, 19, 527036) |
opened | True |
page_end | 25 |
page_first | 1 |
page_last | 0 |
page_list | ['30', '15', '50'] |
page_next | 24 |
page_prev | 22 |
page_start | 21 |
pager_renge | 2 |
pages | 30 |
pagination_id | 23 |
posts | <QuerySet [<Post: Новый комментарий от Messcer>, <Post: Новый комментарий от edwardkz>, <Post: Новый комментарий от БАРМОЛЕЙ 197>, <Post: Новый комментарий от АНГЕЛ >, <Post: Новый комментарий от Napoleon>, <Post: Новый комментарий от ТёмиКВ>, <Post: Новый комментарий от Надир>, <Post: Новый комментарий от jacarta>, <Post: Новый комментарий от valdaichik>, <Post: Новый комментарий от baluu>, <Post: Новый комментарий от Proverka na dorogah>, <Post: Новый комментарий от mmm402>, <Post: Новый комментарий от Стратостат>, <Post: Новый комментарий от Remo_29Rus>, <Post: Новый комментарий от Джугашвили-И-С>, <Post: Новый комментарий от Kangoo>, <Post: Новый комментарий от Roskolnikov>, <Post: Новый комментарий от Nekit12ARB>, <Post: Новый комментарий от jamez>, <Post: Новый комментарий от Myrochkin_AV>, '...(remaining elements truncated)...']> |
request | <WSGIRequest: GET '/topic/23/45476/30/'> |
session_date | {'forum_pages': 30, 'pages': 15} |
session_id | None |
settings | <SiteSettings: 1:defaults> |
topic | <Topic: Ярость / Fury (2014)> |
topic_id | 45476 |
././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: Новый комментарий от MARKY MARK>, <Post: Новый комментарий от Nadipo>, <Post: Новый комментарий от дядя женя>, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от РОТМИСТР ТООТ>, <Post: Новый комментарий от Dupekmop Ta6ypemku>, <Post: Новый комментарий от umibaladav>, <Post: Новый комментарий от Nono>, <Post: Новый комментарий от barkmann>, <Post: Новый комментарий от Nono>, <Post: Новый комментарий от barkmann>, <Post: Новый комментарий от Nono>, <Post: Новый комментарий от Dupekmop Ta6ypemku>, <Post: Новый комментарий от Vivel>, <Post: Новый комментарий от emelya>, <Post: Новый комментарий от SHAYK>, <Post: Новый комментарий от slavaon>, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от Peter K>, <Post: Новый комментарий от Алексей Климков>, '...(remaining elements truncated)...']>, 'paginator': <django.core.paginator.Paginator object at 0x7f999f65d1b0>, 'page_obj': <Page 23 of 25>, 'is_paginated': True, 'results_per_page': 30, 'has_next': True, 'has_previous': True, 'page': 23, 'next': 24, 'previous': 22, 'first_on_page': 661, 'last_on_page': 690, 'pages': 25, 'hits': 743, 'page_range': range(1, 26)}, {}, {'header': 'Ярость / Fury (2014) - Обсуждение Фильмов', 'title': 'Обсуждение Фильмов - Ярость / Fury (2014)', 'action': '/forum/add_post/45476/', 'path_items': (('Главная', '/'), ('Форум', '/forum/'), (<Forum: Обсуждение Фильмов>, '/forum/3/'), (<Topic: Ярость / Fury (2014)>, False)), 'page_first': 1, 'page_range': [21, 22, 23, 24, 25], 'page_last': 0, 'page_prev': 22, 'page_next': 24, 'page_end': 25, 'add_limit_count': 10, 'mode': '', 'is_authenticated': False, 'opened': True, 'is_author': False, 'topic': <Topic: Ярость / Fury (2014)>, 'cnt': range(1, 26), 'forum_id': 3, 'form': '', 'forum_name': <Forum: Обсуждение Фильмов>, 'current_user': 'AnonymousUser', 'cache_id': 'post45476_page23_of30_', 'cache_time': 30, 'pages': '30', 'page_list': ['30', '15', '50'], 'lastVisiteDate': datetime.datetime(2023, 7, 24, 20, 27, 14, 453575, tzinfo=datetime.timezone.utc), 'lastEditDate': datetime.datetime(2024, 3, 17, 5, 24, 19, 528932), 'min_date': datetime.datetime(2024, 3, 19, 5, 9, 19, 527036)}] |
context_processors | [<function forum at 0x7f99a22b3d90>] |
extra_context | {'action': '/forum/add_post/45476/', 'add_limit_count': 10, 'cache_id': 'post45476_page23_of30_', 'cache_time': 30, 'cnt': range(1, 26), 'current_user': 'AnonymousUser', 'form': '', 'forum_id': 3, 'forum_name': <Forum: Обсуждение Фильмов>, 'header': 'Ярость / Fury (2014) - Обсуждение Фильмов', 'is_authenticated': False, 'is_author': False, 'lastEditDate': datetime.datetime(2024, 3, 17, 5, 24, 19, 528932), 'lastVisiteDate': datetime.datetime(2023, 7, 24, 20, 27, 14, 453575, tzinfo=datetime.timezone.utc), 'min_date': datetime.datetime(2024, 3, 19, 5, 9, 19, 527036), 'mode': '', 'opened': True, 'page_end': 25, 'page_first': 1, 'page_last': 0, 'page_list': ['30', '15', '50'], 'page_next': 24, 'page_prev': 22, 'page_range': [21, 22, 23, 24, 25], 'pages': '30', 'path_items': (('Главная', '/'), ('Форум', '/forum/'), (<Forum: Обсуждение Фильмов>, '/forum/3/'), (<Topic: Ярость / Fury (2014)>, False)), 'title': 'Обсуждение Фильмов - Ярость / Fury (2014)', 'topic': <Topic: Ярость / Fury (2014)>} |
key | 'min_date' |
mimetype | None |
page | 23 |
page_number | 23 |
page_obj | <Page 23 of 25> |
paginate_by | 30 |
paginator | <django.core.paginator.Paginator object at 0x7f999f65d1b0> |
queryset | <QuerySet [<Post: Новый комментарий от Messcer>, <Post: Новый комментарий от edwardkz>, <Post: Новый комментарий от БАРМОЛЕЙ 197>, <Post: Новый комментарий от АНГЕЛ >, <Post: Новый комментарий от Napoleon>, <Post: Новый комментарий от ТёмиКВ>, <Post: Новый комментарий от Надир>, <Post: Новый комментарий от jacarta>, <Post: Новый комментарий от valdaichik>, <Post: Новый комментарий от baluu>, <Post: Новый комментарий от Proverka na dorogah>, <Post: Новый комментарий от mmm402>, <Post: Новый комментарий от Стратостат>, <Post: Новый комментарий от Remo_29Rus>, <Post: Новый комментарий от Джугашвили-И-С>, <Post: Новый комментарий от Kangoo>, <Post: Новый комментарий от Roskolnikov>, <Post: Новый комментарий от Nekit12ARB>, <Post: Новый комментарий от jamez>, <Post: Новый комментарий от Myrochkin_AV>, '...(remaining elements truncated)...']> |
request | <WSGIRequest: GET '/topic/23/45476/30/'> |
t | <django.template.backends.django.Template object at 0x7f999f7202b0> |
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, 5, 9, 19, 527036) |
./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: Новый комментарий от MARKY MARK>, <Post: Новый комментарий от Nadipo>, <Post: Новый комментарий от дядя женя>, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от РОТМИСТР ТООТ>, <Post: Новый комментарий от Dupekmop Ta6ypemku>, <Post: Новый комментарий от umibaladav>, <Post: Новый комментарий от Nono>, <Post: Новый комментарий от barkmann>, <Post: Новый комментарий от Nono>, <Post: Новый комментарий от barkmann>, <Post: Новый комментарий от Nono>, <Post: Новый комментарий от Dupekmop Ta6ypemku>, <Post: Новый комментарий от Vivel>, <Post: Новый комментарий от emelya>, <Post: Новый комментарий от SHAYK>, <Post: Новый комментарий от slavaon>, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от Peter K>, <Post: Новый комментарий от Алексей Климков>, '...(remaining elements truncated)...']>, 'paginator': <django.core.paginator.Paginator object at 0x7f999f65d1b0>, 'page_obj': <Page 23 of 25>, 'is_paginated': True, 'results_per_page': 30, 'has_next': True, 'has_previous': True, 'page': 23, 'next': 24, 'previous': 22, 'first_on_page': 661, 'last_on_page': 690, 'pages': 25, 'hits': 743, 'page_range': range(1, 26)}, {}, {'header': 'Ярость / Fury (2014) - Обсуждение Фильмов', 'title': 'Обсуждение Фильмов - Ярость / Fury (2014)', 'action': '/forum/add_post/45476/', 'path_items': (('Главная', '/'), ('Форум', '/forum/'), (<Forum: Обсуждение Фильмов>, '/forum/3/'), (<Topic: Ярость / Fury (2014)>, False)), 'page_first': 1, 'page_range': [21, 22, 23, 24, 25], 'page_last': 0, 'page_prev': 22, 'page_next': 24, 'page_end': 25, 'add_limit_count': 10, 'mode': '', 'is_authenticated': False, 'opened': True, 'is_author': False, 'topic': <Topic: Ярость / Fury (2014)>, 'cnt': range(1, 26), 'forum_id': 3, 'form': '', 'forum_name': <Forum: Обсуждение Фильмов>, 'current_user': 'AnonymousUser', 'cache_id': 'post45476_page23_of30_', 'cache_time': 30, 'pages': '30', 'page_list': ['30', '15', '50'], 'lastVisiteDate': datetime.datetime(2023, 7, 24, 20, 27, 14, 453575, tzinfo=datetime.timezone.utc), 'lastEditDate': datetime.datetime(2024, 3, 17, 5, 24, 19, 528932), 'min_date': datetime.datetime(2024, 3, 19, 5, 9, 19, 527036)}] |
request | None |
self | <django.template.backends.django.Template object at 0x7f999f7202b0> |
./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: Новый комментарий от MARKY MARK>, <Post: Новый комментарий от Nadipo>, <Post: Новый комментарий от дядя женя>, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от РОТМИСТР ТООТ>, <Post: Новый комментарий от Dupekmop Ta6ypemku>, <Post: Новый комментарий от umibaladav>, <Post: Новый комментарий от Nono>, <Post: Новый комментарий от barkmann>, <Post: Новый комментарий от Nono>, <Post: Новый комментарий от barkmann>, <Post: Новый комментарий от Nono>, <Post: Новый комментарий от Dupekmop Ta6ypemku>, <Post: Новый комментарий от Vivel>, <Post: Новый комментарий от emelya>, <Post: Новый комментарий от SHAYK>, <Post: Новый комментарий от slavaon>, <Post: Новый комментарий от +++III+++>, <Post: Новый комментарий от Peter K>, <Post: Новый комментарий от Алексей Климков>, '...(remaining elements truncated)...']>, 'paginator': <django.core.paginator.Paginator object at 0x7f999f65d1b0>, 'page_obj': <Page 23 of 25>, 'is_paginated': True, 'results_per_page': 30, 'has_next': True, 'has_previous': True, 'page': 23, 'next': 24, 'previous': 22, 'first_on_page': 661, 'last_on_page': 690, 'pages': 25, 'hits': 743, 'page_range': range(1, 26)}, {}, {'header': 'Ярость / Fury (2014) - Обсуждение Фильмов', 'title': 'Обсуждение Фильмов - Ярость / Fury (2014)', 'action': '/forum/add_post/45476/', 'path_items': (('Главная', '/'), ('Форум', '/forum/'), (<Forum: Обсуждение Фильмов>, '/forum/3/'), (<Topic: Ярость / Fury (2014)>, False)), 'page_first': 1, 'page_range': [21, 22, 23, 24, 25], 'page_last': 0, 'page_prev': 22, 'page_next': 24, 'page_end': 25, 'add_limit_count': 10, 'mode': '', 'is_authenticated': False, 'opened': True, 'is_author': False, 'topic': <Topic: Ярость / Fury (2014)>, 'cnt': range(1, 26), 'forum_id': 3, 'form': '', 'forum_name': <Forum: Обсуждение Фильмов>, 'current_user': 'AnonymousUser', 'cache_id': 'post45476_page23_of30_', 'cache_time': 30, 'pages': '30', 'page_list': ['30', '15', '50'], 'lastVisiteDate': datetime.datetime(2023, 7, 24, 20, 27, 14, 453575, tzinfo=datetime.timezone.utc), 'lastEditDate': datetime.datetime(2024, 3, 17, 5, 24, 19, 528932), 'min_date': datetime.datetime(2024, 3, 19, 5, 9, 19, 527036)}] |
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 | 'www.fast-torrent.ru' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_X_FORWARDED_FOR | '54.172.169.199' |
HTTP_X_REAL_IP | '54.172.169.199' |
PATH_INFO | '********************' |
QUERY_STRING | '' |
REMOTE_ADDR | '45.142.212.135' |
REMOTE_PORT | '54396' |
REQUEST_METHOD | 'GET' |
REQUEST_SCHEME | 'http' |
REQUEST_URI | '/topic/23/45476/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.