module 'PIL.Image' has no attribute 'ANTIALIAS'
Request Method: | GET |
---|---|
Request URL: | http://edanyam.ru/tvorozhno-orehovyij-pirog-so-slivami/ |
Django Version: | 2.2.1 |
Exception Type: | AttributeError |
Exception Value: | module 'PIL.Image' has no attribute 'ANTIALIAS' |
Exception Location: | /var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/sorl/thumbnail/engines/pil_engine.py in _scale, line 208 |
Python Executable: | /var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/bin/python3 |
Python Version: | 3.10.12 |
Python Path: | ['/var/www/edanyam_ru_usr/data/www/edanyam.ru', '/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/bin', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages'] |
Server time: | Пт, 29 Мар 2024 10:01:26 +0300 |
In template /var/www/edanyam_ru_usr/data/www/edanyam.ru/templates/base.html
, error at line 0
1 | {% load thumbnail %} |
---|---|
2 | {% load mptt_tags %} |
3 | |
4 | <!DOCTYPE html> |
5 | <html> |
6 | <head> |
7 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
8 | |
9 | {% block meta_title %} |
10 | <title> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/core/handlers/exception.py
in inner
This decorator is automatically applied to all middleware to ensure that
no middleware leaks an exception and that the next middleware in the stack
can rely on getting a response instead of an exception.
"""
@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 | AttributeError("module 'PIL.Image' has no attribute 'ANTIALIAS'") |
get_response | <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7fd83ec8e8f0>> |
request | <WSGIRequest: GET '/tvorozhno-orehovyij-pirog-so-slivami/'> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/core/handlers/base.py
in _get_response
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)
except Exception as e:
response = self.process_exception_by_middleware(e, request)…
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
view_name = callback.__name__
else: # CBV
Variable | Value |
---|---|
callback | <function show_recipe_or_article at 0x7fd83d81eb90> |
callback_args | () |
callback_kwargs | {'slug': 'tvorozhno-orehovyij-pirog-so-slivami'} |
middleware_method | <bound method CorsMiddleware.process_view of <corsheaders.middleware.CorsMiddleware object at 0x7fd83d9329e0>> |
request | <WSGIRequest: GET '/tvorozhno-orehovyij-pirog-so-slivami/'> |
resolver | <URLResolver 'edanyam.urls' (None:None) '^/'> |
resolver_match | ResolverMatch(func=edanyam.pages.views.show_recipe_or_article, args=(), kwargs={'slug': 'tvorozhno-orehovyij-pirog-so-slivami'}, url_name=None, app_names=[], namespaces=[], route=<str:slug>/) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7fd83ec8e8f0> |
urlconf | 'edanyam.urls' |
wrapped_callback | <function show_recipe_or_article at 0x7fd83d81eb90> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/core/handlers/base.py
in _get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
if response:
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)…
except Exception as e:
response = self.process_exception_by_middleware(e, request)
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
Variable | Value |
---|---|
callback | <function show_recipe_or_article at 0x7fd83d81eb90> |
callback_args | () |
callback_kwargs | {'slug': 'tvorozhno-orehovyij-pirog-so-slivami'} |
middleware_method | <bound method CorsMiddleware.process_view of <corsheaders.middleware.CorsMiddleware object at 0x7fd83d9329e0>> |
request | <WSGIRequest: GET '/tvorozhno-orehovyij-pirog-so-slivami/'> |
resolver | <URLResolver 'edanyam.urls' (None:None) '^/'> |
resolver_match | ResolverMatch(func=edanyam.pages.views.show_recipe_or_article, args=(), kwargs={'slug': 'tvorozhno-orehovyij-pirog-so-slivami'}, url_name=None, app_names=[], namespaces=[], route=<str:slug>/) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7fd83ec8e8f0> |
urlconf | 'edanyam.urls' |
wrapped_callback | <function show_recipe_or_article at 0x7fd83d81eb90> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/views/decorators/csrf.py
in wrapped_view
def csrf_exempt(view_func):
"""Mark a view function as being exempt from the CSRF view protection."""
# view_func.csrf_exempt = True would also work, but decorators are nicer
# if they don't have side effects, so return a new function.
def wrapped_view(*args, **kwargs):
return view_func(*args, **kwargs)…
wrapped_view.csrf_exempt = True
return wraps(view_func)(wrapped_view)
Variable | Value |
---|---|
args | (<WSGIRequest: GET '/tvorozhno-orehovyij-pirog-so-slivami/'>,) |
kwargs | {'slug': 'tvorozhno-orehovyij-pirog-so-slivami'} |
view_func | <function show_recipe_or_article at 0x7fd83d81ec20> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/utils/decorators.py
in _wrapped_view
if result is not None:
return result
if hasattr(middleware, 'process_view'):
result = middleware.process_view(request, view_func, args, kwargs)
if result is not None:
return result
try:
response = view_func(request, *args, **kwargs)…
except Exception as e:
if hasattr(middleware, 'process_exception'):
result = middleware.process_exception(request, e)
if result is not None:
return result
raise
Variable | Value |
---|---|
args | () |
kwargs | {'slug': 'tvorozhno-orehovyij-pirog-so-slivami'} |
middleware | <django.middleware.cache.CacheMiddleware object at 0x7fd83d8487f0> |
request | <WSGIRequest: GET '/tvorozhno-orehovyij-pirog-so-slivami/'> |
result | None |
view_func | <function show_recipe_or_article at 0x7fd83d81eb00> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/edanyam/pages/views.py
in show_recipe_or_article
if recipe.id not in request.session['viewed_recipes']:
request.session['viewed_recipes'].append(recipe.id)
recipe.shows += 1
recipe.save(update_fields=["shows"])
context = {'recipe': recipe, 'recipe_categories': recipe_categories, 'bread_crumbs': bread_crumbs, 'similar_recipes': similar_recipes}
return render(request, 'show_recipe.html', context)…
@csrf_exempt
@cache_page(10)
def profile(request, user_pk=None):
Variable | Value |
---|---|
auto_similar_recipes | <QuerySet [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]> |
bread_crumbs | {'parent': ('Выпечка', 'vypechka')} |
context | {'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]} |
manual_similar_recipes | <QuerySet []> |
recipe | <Recipe: Творожно-ореховый пирог со сливами> |
recipe_categories | <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]> |
request | <WSGIRequest: GET '/tvorozhno-orehovyij-pirog-so-slivami/'> |
similar_recipes | [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>] |
slug | 'tvorozhno-orehovyij-pirog-so-slivami' |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/shortcuts.py
in render
def render(request, template_name, context=None, content_type=None, status=None, using=None):
"""
Return a HttpResponse whose content is filled with the result of calling
django.template.loader.render_to_string() with the passed arguments.
"""
content = loader.render_to_string(template_name, context, request, using=using)…
return HttpResponse(content, content_type, status)
def redirect(to, *args, permanent=False, **kwargs):
"""
Return an HttpResponseRedirect to the appropriate URL for the arguments
Variable | Value |
---|---|
content_type | None |
context | {'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]} |
request | <WSGIRequest: GET '/tvorozhno-orehovyij-pirog-so-slivami/'> |
status | None |
template_name | 'show_recipe.html' |
using | None |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/template/loader.py
in render_to_string
template_name may be a string or a list of strings.
"""
if isinstance(template_name, (list, tuple)):
template = select_template(template_name, using=using)
else:
template = get_template(template_name, using=using)
return template.render(context, request)…
def _engine_list(using=None):
return engines.all() if using is None else [engines[using]]
Variable | Value |
---|---|
context | {'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]} |
request | <WSGIRequest: GET '/tvorozhno-orehovyij-pirog-so-slivami/'> |
template | <django.template.backends.django.Template object at 0x7fd83cb9f4f0> |
template_name | 'show_recipe.html' |
using | None |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/template/backends/django.py
in render
@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)
def copy_exception(exc, backend=None):
"""
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
request | <WSGIRequest: GET '/tvorozhno-orehovyij-pirog-so-slivami/'> |
self | <django.template.backends.django.Template object at 0x7fd83cb9f4f0> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/template/base.py
in render
def render(self, context):
"Display stage -- can be called many times"
with context.render_context.push_state(self):
if context.template is None:
with context.bind_template(self):
context.template_name = self.name
return self._render(context)…
else:
return self._render(context)
def compile_nodelist(self):
"""
Parse and compile the template source into a nodelist. If debug
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
self | <django.template.base.Template object at 0x7fd83c995660> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/test/utils.py
in instrumented_test_render
def instrumented_test_render(self, context):
"""
An instrumented Template render method, providing a signal that can be
intercepted by the test Client.
"""
template_rendered.send(sender=self, template=self, context=context)
return self.nodelist.render(context)…
class _TestState:
pass
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
self | <django.template.base.Template object at 0x7fd83c995660> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/template/base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)…
else:
bit = node
bits.append(str(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bits | [] |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
node | <ExtendsNode: extends 'base.html'> |
self | [<ExtendsNode: extends 'base.html'>] |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/template/base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)…
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.render_context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
self | <ExtendsNode: extends 'base.html'> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/template/loader_tags.py
in render
compiled_parent.nodelist.get_nodes_by_type(BlockNode)}
block_context.add_blocks(blocks)
break
# Call Template._render explicitly so the parser context stays
# the same.
with context.render_context.push_state(compiled_parent, isolated_context=False):
return compiled_parent._render(context)…
class IncludeNode(Node):
context_key = '__include_context'
def __init__(self, template, *args, extra_context=None, isolated_context=False, **kwargs):
Variable | Value |
---|---|
block_context | <django.template.loader_tags.BlockContext object at 0x7fd83cb6ad40> |
blocks | {'content': <Block Node: content. Contents: [<TextNode: '\n '>]>, 'heads': <Block Node: heads. Contents: [<TextNode: '\n '>]>, 'js': <Block Node: js. Contents: [<TextNode: '\n'>]>, 'meta_title': <Block Node: meta_title. Contents: [<TextNode: '\n <title>\n '>, <IfNode>, <TextNode: '\n '>, <IfNode>, <TextNode: '\n </title>\n '>]>, 'similar_recipes': <Block Node: similar_recipes. Contents: [<TextNode: '\n\n '>]>} |
compiled_parent | <django.template.base.Template object at 0x7fd83cbf39d0> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
node | <django.template.defaulttags.LoadNode object at 0x7fd83cb694e0> |
self | <ExtendsNode: extends 'base.html'> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/test/utils.py
in instrumented_test_render
def instrumented_test_render(self, context):
"""
An instrumented Template render method, providing a signal that can be
intercepted by the test Client.
"""
template_rendered.send(sender=self, template=self, context=context)
return self.nodelist.render(context)…
class _TestState:
pass
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
self | <django.template.base.Template object at 0x7fd83cbf39d0> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/template/base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)…
else:
bit = node
bits.append(str(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | ('\n' ' </div>\n' '\n' '\n' '\n' '\n' '\n' '\n' '\n' ' <div class="col-md-8 col-sm-9" style="padding-top:20px">\n' ' ') |
bits | ['', '\n', '', '\n' '\n' '<!DOCTYPE html>\n' '<html>\n' '<head>\n' ' <meta name="viewport" content="width=device-width, initial-scale=1">\n' '\n' ' ', '\n' ' <title>\n' ' \n' ' Творожно-ореховый пирог со сливами рецепт с фото\n' ' \n' ' \n' ' </title>\n' ' ', '\n\n ', '', '\n\n ', '', '\n\n ', '\n' ' <meta name="description" content="Творожно-ореховый пирог со ' 'сливами. Испеките пирог со сливками по нашему рецепту с фото пошагово всего ' 'за 1 час!"/>\n' ' ', '\n\n ', '', '\n' '\n' '\n' ' <meta name="blitz" content="mu-7bfbc1cd-89722bb8-f09b5fe3-647d49ce">\n' ' <link rel="stylesheet" href="/static/css/bootstrap.css">\n' ' <link rel="stylesheet" href="/static/css/jquery.fileupload.css">\n' ' <link rel="stylesheet" href="/static/css/jquery.fileupload-ui.css">\n' ' <link rel="stylesheet" href="/static/css/jquery.timepicker.css">\n' ' <link rel="icon" href="/static/edanyam-logo.svg" />\n' ' <script type="text/javascript" src="/static/js/j.js"></script>\n' ' <link rel="stylesheet" ' 'href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">\n' '\n' ' <script async ' 'src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>\n' ' <script>\n' ' (adsbygoogle = window.adsbygoogle || []).push({\n' ' google_ad_client: "ca-pub-5989320783595236",\n' ' enable_page_level_ads: true\n' ' });\n' ' </script>\n' '\n' ' <script type="text/javascript" ' 'src="https://vk.com/js/api/openapi.js?169"></script>\n' ' <script type="text/javascript">\n' ' VK.init({apiId: ', '2412847', ', onlyWidgets: true});\n' ' </script>\n' ' <script type="text/javascript">\n' ' var timer;\n' '\n' ' var top_pos = (screen.height/2)-240;\n' ' var left_pos = (screen.width/2)-320;\n' ' var params = ' '"menubar=now,location=yes,resizable=yes,scrollbars=yes,status=yes,width=640,height=480,left="+left_pos+",top="+top_pos;\n' '\n' ' $(document).ready(function(){\n' '\n' '\n' ' ', '\n' " $('#login-button').click(function(){\n" " $('#login-modal').show()\n" ' })\n' " $('.social-login').click(function(){\n" " var oauth_url = $(this).data('oauth-url');\n" " var win = window.open(oauth_url+'?next=/popup-login-done/', " "'login', params);\n" " if(win.name != 'login') {\n" ' ' "window.location=oauth_url+'?next=/tvorozhno-orehovyij-pirog-so-slivami/';\n" ' }\n' ' win.onunload = function(){\n' ' location.reload();\n' ' };\n' ' })\n' ' ', '\n' '\n' " $('.nav-main li').hover(\n" ' function() {\n' " var img = $( 'img', this );\n" " img.css('background-position-y', '-138px');\n" ' }, function() {\n' " var img = $( 'img', this );\n" " img.css('background-position-y', '-90px');\n" " $('.nav-main li.active').each(\n" ' function() {\n' " var img = $( 'img', this );\n" " img.css('background-position-y', '-138px');\n" ' }\n' ' );\n' ' }\n' ' );\n' " $('.nav-main li.active').each(\n" ' function() {\n' " var img = $( 'img', this );\n" " img.css('background-position-y', '-138px');\n" ' }\n' ' );\n' ' ', '', '\n' '\n' ' });\n' ' </script>\n' '\n' ' <style>\n' ' #login-button{\n' ' font-size: 12px;\n' ' border-radius: 2px;\n' ' padding: 7px 7px;\n' ' color: #aaa;\n' ' cursor: pointer;\n' '\n' ' }\n' '\n' ' #share-liked-modal{\n' ' width: 270px;\n' ' height: 200px;\n' ' position: fixed;\n' ' display: none;\n' ' top:… <trimmed 47547 bytes string> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
node | <Block Node: content. Contents: [<TextNode: '\n '>]> |
self | [<django.template.defaulttags.LoadNode object at 0x7fd83cb694e0>, <TextNode: '\n'>, <django.template.defaulttags.LoadNode object at 0x7fd83cb68f10>, <TextNode: '\n\n<!DOCTYPE html>\n<html>\n'>, <Block Node: meta_title. Contents: [<TextNode: '\n <title>\n '>, <IfNode>, <TextNode: '\n '>, <IfNode>, <TextNode: '\n </title>\n '>]>, <TextNode: '\n\n '>, <IfNode>, <TextNode: '\n\n '>, <IfNode>, <TextNode: '\n\n '>, <IfNode>, <TextNode: '\n\n '>, <IfNode>, <TextNode: '\n\n\n <meta name="blitz"'>, <Variable Node: vk_key>, <TextNode: ', onlyWidgets: true});\n '>, <IfNode>, <TextNode: "\n\n $('.nav-main li">, <IfNode>, <TextNode: '\n\n });\n </script>'>, <Block Node: heads. Contents: [<TextNode: '\n '>]>, <TextNode: '\n</head>\n\n<body>\n\n'>, <IfNode>, <TextNode: '\n\n\n<div class="container"'>, <IfNode>, <TextNode: '\n\n </div>\n </di'>, <IfNode>, <TextNode: '"><a href="/category/holo'>, <IfNode>, <TextNode: '"><a href="/category/supy'>, <IfNode>, <TextNode: '"><a href="/category/vtor'>, <IfNode>, <TextNode: '"><a href="/category/sala'>, <IfNode>, <TextNode: '"><a href="/category/vype'>, <IfNode>, <TextNode: '"><a target="_blank" href'>, <IfNode>, <TextNode: '"><a href="/articles/"><i'>, <IfNode>, <TextNode: '"><a href="/authors/"><im'>, <IfNode>, <TextNode: '\n <div class="row" sty'>, <Variable Node: query>, <TextNode: '" style="border-radius: 0'>, <mptt.templatetags.mptt_tags.RecurseTreeNode object at 0x7fd83cc2c6d0>, <TextNode: '\n <ul class="m'>, <ForNode: for timer in time_filters, tail_len: 5>, <TextNode: '\n </ul>\n '>, <IfNode>, <TextNode: '\n </div>\n\n\n\n\n\n\n\n '>, <Block Node: content. Contents: [<TextNode: '\n '>]>, <TextNode: '\n </div>\n\n '>, <IfNode>, <TextNode: '\n\n '>, <Block Node: similar_recipes. Contents: [<TextNode: '\n\n '>]>, <TextNode: '\n '>, <IfNode>, <TextNode: '\n </div>\n </div'>, <IfNode>, <TextNode: '\n\n\n <div class="row" s'>, <IfNode>, <TextNode: '\n\n\n'>, <IfNode>, <TextNode: '\n<!-- ###################'>, <Block Node: js. Contents: [<TextNode: '\n'>]>, <TextNode: '\n\n<div id="edit_cat_conta'>] |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/template/base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)…
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.render_context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
self | <Block Node: content. Contents: [<TextNode: '\n '>]> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/template/loader_tags.py
in render
push = block = block_context.pop(self.name)
if block is None:
block = self
# Create new block so we can store context without thread-safety issues.
block = type(self)(block.name, block.nodelist)
block.context = context
context['block'] = block
result = block.nodelist.render(context)…
if push is not None:
block_context.push(self.name, push)
return result
def super(self):
if not hasattr(self, 'context'):
Variable | Value |
---|---|
block | <Block Node: content. Contents: [<TextNode: '\n<div itemscope="" itemty'>, <IfNode>, <TextNode: ' href="/category/'>, <Variable Node: bread_crumbs.parent.1>, <TextNode: '/">'>, <Variable Node: bread_crumbs.parent.0>, <TextNode: '</a> / '>, <IfNode>, <TextNode: ' '>, <Variable Node: recipe.name>, <TextNode: '\n</small>\n\n\n\n <div sty'>, <Variable Node: recipe.name>, <TextNode: '</h1>\n <i class="glyph'>, <Variable Node: recipe.author>, <TextNode: '</span>\n <i class="gly'>, <IfNode>, <IfNode>, <TextNode: '" itemprop="cookTime">'>, <Variable Node: recipe.time_to_cook|time:"H:i">, <TextNode: '</time>\n <span itempr'>, <Variable Node: recipe.id>, <TextNode: '"><i class="glyphicon gly'>, <Variable Node: recipe.rating|default:"0">, <TextNode: '</span><meta itemprop="ra'>, <Variable Node: recipe.shows>, <TextNode: '" title="Просмотров '>, <Variable Node: recipe.shows>, <TextNode: '"><i class="fa fa-eye" st'>, <Variable Node: recipe.shows|intword>, <TextNode: '</span></span>\n </span'>, <IfNode>, <TextNode: '\n '>, <IfNode>, <TextNode: '\n\n <span style="displa'>, <ThumbnailNode>, <TextNode: '\n '>, <ThumbnailNode>, <TextNode: '\n<div class="row" style="'>, <Variable Node: recipe.full_description|safe|linebreaks>, <TextNode: '\n</div>\n</div>\n'>, <IfNode>, <TextNode: '\n'>, <IfNode>, <TextNode: '\n\n\n <span itemprop="re'>, <Variable Node: recipe.default_portions_count>, <TextNode: '</span>\n\n <div class="row'>, <IfNode>, <TextNode: '\n <div class="col-sm-6">'>, <IfNode>, <TextNode: '\n\n </div>\n\n\n</div>\n\n\n </'>, <ForNode: for step in recipe.step_set.all, tail_len: 9>, <TextNode: '\n </div>\n</div>\n\n\n\n<spa'>, <IfNode>, <TextNode: '><i class="glyphicon glyp'>, <Variable Node: recipe.rating|default:"0">, <TextNode: '</span>)</span>\n\n<div cla'>, <IfNode>, <TextNode: '\n\n\n<div id="share-liked-m'>]> |
block_context | <django.template.loader_tags.BlockContext object at 0x7fd83cb6ad40> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
push | <Block Node: content. Contents: [<TextNode: '\n<div itemscope="" itemty'>, <IfNode>, <TextNode: ' href="/category/'>, <Variable Node: bread_crumbs.parent.1>, <TextNode: '/">'>, <Variable Node: bread_crumbs.parent.0>, <TextNode: '</a> / '>, <IfNode>, <TextNode: ' '>, <Variable Node: recipe.name>, <TextNode: '\n</small>\n\n\n\n <div sty'>, <Variable Node: recipe.name>, <TextNode: '</h1>\n <i class="glyph'>, <Variable Node: recipe.author>, <TextNode: '</span>\n <i class="gly'>, <IfNode>, <IfNode>, <TextNode: '" itemprop="cookTime">'>, <Variable Node: recipe.time_to_cook|time:"H:i">, <TextNode: '</time>\n <span itempr'>, <Variable Node: recipe.id>, <TextNode: '"><i class="glyphicon gly'>, <Variable Node: recipe.rating|default:"0">, <TextNode: '</span><meta itemprop="ra'>, <Variable Node: recipe.shows>, <TextNode: '" title="Просмотров '>, <Variable Node: recipe.shows>, <TextNode: '"><i class="fa fa-eye" st'>, <Variable Node: recipe.shows|intword>, <TextNode: '</span></span>\n </span'>, <IfNode>, <TextNode: '\n '>, <IfNode>, <TextNode: '\n\n <span style="displa'>, <ThumbnailNode>, <TextNode: '\n '>, <ThumbnailNode>, <TextNode: '\n<div class="row" style="'>, <Variable Node: recipe.full_description|safe|linebreaks>, <TextNode: '\n</div>\n</div>\n'>, <IfNode>, <TextNode: '\n'>, <IfNode>, <TextNode: '\n\n\n <span itemprop="re'>, <Variable Node: recipe.default_portions_count>, <TextNode: '</span>\n\n <div class="row'>, <IfNode>, <TextNode: '\n <div class="col-sm-6">'>, <IfNode>, <TextNode: '\n\n </div>\n\n\n</div>\n\n\n </'>, <ForNode: for step in recipe.step_set.all, tail_len: 9>, <TextNode: '\n </div>\n</div>\n\n\n\n<spa'>, <IfNode>, <TextNode: '><i class="glyphicon glyp'>, <Variable Node: recipe.rating|default:"0">, <TextNode: '</span>)</span>\n\n<div cla'>, <IfNode>, <TextNode: '\n\n\n<div id="share-liked-m'>]> |
self | <Block Node: content. Contents: [<TextNode: '\n '>]> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/template/base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)…
else:
bit = node
bits.append(str(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | ('\n' '\n' ' </div>\n' '\n' '\n' '</div>\n' '\n' '\n' ' </div>\n' '</div>\n' '\n' '\n' '<div class="row">\n' ' <div class="col-md-12" style="margin-top:15px">\n' ' <b style="font-size: 12pt">Этапы приготовления</b>\n' ' </div>\n' '</div>\n' '<div itemprop="recipeInstructions">\n' ' ') |
bits | ['\n' '<div itemscope="" itemtype="http://schema.org/Recipe">\n' '<small style="margin-top: -3px; display: block">\n' '<a href="/">Кулинарные рецепты блюд с фото</a> / <a ', 'itemprop="recipeCategory"', ' href="/category/', 'vypechka', '/">', 'Выпечка', '</a> / ', '', ' ', 'Творожно-ореховый пирог со сливами', '\n' '</small>\n' '\n' '\n' '\n' ' <div style="margin-top:0px">\n' ' <script type="text/javascript" src="//yandex.st/share/share.js" ' 'charset="utf-8"></script>\n' ' <div style="margin-left: -5px" class="yashare-auto-init" ' 'data-yashareL10n="ru" data-yashareType="button" ' 'data-yashareQuickServices="vkontakte,facebook,twitter,odnoklassniki,moimir"></div></div>\n' ' <h1 itemprop="name">', 'Творожно-ореховый пирог со сливами', '</h1>\n' ' <i class="glyphicon glyphicon-user" style="color: #f27405; margin-right: ' '3px; "></i><span itemprop="author.name" style="vertical-align: text-top; ' 'font-size: 9pt; font-weight: bold">', 'lubasya', '</span>\n' ' <i class="glyphicon glyphicon-time" style="color: #f27405; margin-right: ' '3px; margin-left: 20px"></i><time style="vertical-align: text-top; ' 'font-size: 8pt; font-weight: bold" datetime="PT', '01H', '', '" itemprop="cookTime">', '01:00', '</time>\n' ' <span itemprop="aggregateRating" itemscope ' 'itemtype="http://schema.org/AggregateRating">\n' ' <span id="rate_recipe" class="rate_recipe" data-rid="', '157', '"><i class="glyphicon glyphicon-heart" style="color: #f27405; cursor: ' 'pointer; margin-right: -1px; margin-left: 20px"></i> <span id="rating" ' 'class="rating" itemprop="reviewCount" style="vertical-align: text-top; ' 'font-size: 8pt; font-weight: bold">', '10', '</span><meta itemprop="ratingValue" content="5" /></span>\n' ' <span alt="Просмотров ', '325871', '" title="Просмотров ', '325871', '"><i class="fa fa-eye" style="vertical-align: text-top; color: #f27405; ' 'cursor: pointer; margin-right: -1px; margin-left: 20px"></i> <span ' 'id="shows" style="vertical-align: text-top; font-size: 8pt; font-weight: ' 'bold">', '326 тыс', '</span></span>\n </span>\n ', '', '\n ', '', '\n' '\n' ' <span style="display: none;" itemprop="recipeCuisine">Русский</span>\n' '\n' ' ', '\n' ' <div style="position: relative">\n' ' <img itemprop="image" ' 'src="/media/cache/f2/ae/f2ae42c9d9b1cbb9f73aa6be5b50d4b6.jpg" ' 'title="Творожно-ореховый пирог со сливами" alt="Творожно-ореховый пирог со ' 'сливами" style="width: 100%; height:100%" />\n' ' <div style="padding: 7px 9px; position: absolute; top: 0; background: ' '#f27405; color: #fff; text-align: center; line-height: 0.8 ">\n' ' \n' ' <span style="font-size: 15pt; font-family: ' 'arial">1</span><br>\n' ' <span style="font-size: 9pt; font-family: ' 'arial">час</span>\n' ' \n' ' </div>\n' ' </div>\n' ' <!--div src="/media/cache/f2/ae/f2ae42c9d9b1cbb9f73aa6be5b50d4b6.jpg" ' 'style="background: ' "url('/media/cache/f2/ae/f2ae42c9d9b1cbb9f73aa6be5b50d4b6.jpg'); " 'background-size: 100%;width: 100%; padding-top: 56.25%; position: ' 'relative"></div-->\n' '\n' ' ', '\n ', '\n' ' <img itemprop="thumbnailUrl" ' 'src="/media/cache/a3/9d/a39d424264cf10c2acf59e225607095b.jpg" width="70" ' 'height="70" title="Творожно-ореховый пирог со сливами" ' 'alt="Творожно-ореховый пирог со сливами" style="display: none;" />\n' ' ', '\n' '<div class="row" style="margin-top:15px">\n' ' <div class="col-md-12" itemprop="description">\n' ' ', '<p>Пирог со сливами очень прост в выпечке. Слегка влажноватый и с ярко ' 'выраженным ореховым вкусом. Очень вкусный, советую! Испеките пирог со ' 'сливками по нашему рецепту с фото пошагово всего за 1 час!</p>', '\n</div>\n</div>\n', '', '\n', '', '\n\n\n <span itemprop="recipeYield" style="display: none;">', '1', '</span>\n' '\n' ' <div class="row" style="margin-top:15px">\n' ' <div class="col-md-12">\n' ' <b style="font-size: 12pt">Ингре… <trimmed 8466 bytes string> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
node | <ForNode: for step in recipe.step_set.all, tail_len: 9> |
self | [<TextNode: '\n<div itemscope="" itemty'>, <IfNode>, <TextNode: ' href="/category/'>, <Variable Node: bread_crumbs.parent.1>, <TextNode: '/">'>, <Variable Node: bread_crumbs.parent.0>, <TextNode: '</a> / '>, <IfNode>, <TextNode: ' '>, <Variable Node: recipe.name>, <TextNode: '\n</small>\n\n\n\n <div sty'>, <Variable Node: recipe.name>, <TextNode: '</h1>\n <i class="glyph'>, <Variable Node: recipe.author>, <TextNode: '</span>\n <i class="gly'>, <IfNode>, <IfNode>, <TextNode: '" itemprop="cookTime">'>, <Variable Node: recipe.time_to_cook|time:"H:i">, <TextNode: '</time>\n <span itempr'>, <Variable Node: recipe.id>, <TextNode: '"><i class="glyphicon gly'>, <Variable Node: recipe.rating|default:"0">, <TextNode: '</span><meta itemprop="ra'>, <Variable Node: recipe.shows>, <TextNode: '" title="Просмотров '>, <Variable Node: recipe.shows>, <TextNode: '"><i class="fa fa-eye" st'>, <Variable Node: recipe.shows|intword>, <TextNode: '</span></span>\n </span'>, <IfNode>, <TextNode: '\n '>, <IfNode>, <TextNode: '\n\n <span style="displa'>, <ThumbnailNode>, <TextNode: '\n '>, <ThumbnailNode>, <TextNode: '\n<div class="row" style="'>, <Variable Node: recipe.full_description|safe|linebreaks>, <TextNode: '\n</div>\n</div>\n'>, <IfNode>, <TextNode: '\n'>, <IfNode>, <TextNode: '\n\n\n <span itemprop="re'>, <Variable Node: recipe.default_portions_count>, <TextNode: '</span>\n\n <div class="row'>, <IfNode>, <TextNode: '\n <div class="col-sm-6">'>, <IfNode>, <TextNode: '\n\n </div>\n\n\n</div>\n\n\n </'>, <ForNode: for step in recipe.step_set.all, tail_len: 9>, <TextNode: '\n </div>\n</div>\n\n\n\n<spa'>, <IfNode>, <TextNode: '><i class="glyphicon glyp'>, <Variable Node: recipe.rating|default:"0">, <TextNode: '</span>)</span>\n\n<div cla'>, <IfNode>, <TextNode: '\n\n\n<div id="share-liked-m'>] |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/template/base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)…
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.render_context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
self | <ForNode: for step in recipe.step_set.all, tail_len: 9> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/template/defaulttags.py
in render
unpacked_vars = dict(zip(self.loopvars, item))
pop_context = True
context.update(unpacked_vars)
else:
context[self.loopvars[0]] = item
for node in self.nodelist_loop:
nodelist.append(node.render_annotated(context))…
if pop_context:
# Pop the loop variables pushed on to the context to avoid
# the context ending up in an inconsistent state when other
# tags (e.g., include and with) push data to context.
context.pop()
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
i | 1 |
item | <Step: Step object (1322)> |
len_values | 13 |
loop_dict | {'counter': 2, 'counter0': 1, 'first': False, 'last': False, 'parentloop': {}, 'revcounter': 12, 'revcounter0': 11} |
node | <ThumbnailNode> |
nodelist | ['\n' ' <div class="row" style="margin-bottom: 40px">\n' ' <div class="col-md-6">\n' '\n' ' ', '\n' ' <img src="/media/cache/31/64/3164b9bf4037a97d2b098e5828e57ff9.jpg" ' 'style="display: none">\n' ' <div style="background: ' "url('/media/cache/31/64/3164b9bf4037a97d2b098e5828e57ff9.jpg'); " 'background-size: 100%;width: 100%; padding-top: 67.25%; position: ' 'relative">\n' ' <div style="text-align: center; padding-top: 10px; width: ' '40px; font-weight: bold; height: 40px; position: absolute; top: 0; ' 'background: #f6911f; color: #fff; ">\n' ' 1\n' ' </div>\n' ' </div>\n' ' <span style="display: none" ' 'itemprop="image">https://edanyam.ru/media/cache/31/64/3164b9bf4037a97d2b098e5828e57ff9.jpg</span>\n' ' ', '\n</div>\n<div class="col-md-6">\n ', '<p>Заранее достаем масло из холодильника.</p>', '\n <span style="display: none" itemprop="text">', 'Заранее достаем масло из холодильника.', '</span>\n</div>\n</div>\n<div class="row edit_step" id="edit_step_', '1321', '"></div>\n ', '\n' ' <div class="row" style="margin-bottom: 40px">\n' ' <div class="col-md-6">\n' '\n' ' '] |
num_loopvars | 1 |
parentloop | {} |
pop_context | False |
self | <ForNode: for step in recipe.step_set.all, tail_len: 9> |
unpack | False |
values | <QuerySet [<Step: Step object (1321)>, <Step: Step object (1322)>, <Step: Step object (1323)>, <Step: Step object (1324)>, <Step: Step object (1325)>, <Step: Step object (1326)>, <Step: Step object (1327)>, <Step: Step object (1328)>, <Step: Step object (1329)>, <Step: Step object (1330)>, <Step: Step object (1331)>, <Step: Step object (1332)>, <Step: Step object (1333)>]> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/django/template/base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)…
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.render_context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
self | <ThumbnailNode> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/sorl/thumbnail/templatetags/thumbnail.py
in render
A Node that renders safely
"""
nodelist_empty = NodeList()
def render(self, context):
try:
return self._render(context)…
except Exception:
if sorl_settings.THUMBNAIL_DEBUG:
raise
error_message = 'Thumbnail tag failed'
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
self | <ThumbnailNode> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/sorl/thumbnail/templatetags/thumbnail.py
in _render
if key == 'options':
options.update(value)
else:
options[key] = value
thumbnail = None
if file_:
thumbnail = get_thumbnail(file_, geometry, **options)…
elif sorl_settings.THUMBNAIL_DUMMY:
thumbnail = DummyImageFile(geometry)
if not thumbnail or (isinstance(thumbnail, DummyImageFile) and self.nodelist_empty):
if self.nodelist_empty:
return self.nodelist_empty.render(context)
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'recipe': <Recipe: Творожно-ореховый пирог со сливами>, 'recipe_categories': <TreeQuerySet [<Category: Выпечка>, <Category: сладкие пироги>]>, 'bread_crumbs': {'parent': ('Выпечка', 'vypechka')}, 'similar_recipes': [<Recipe: Хлебные палочки>, <Recipe: Творожная запеканка на кефире >, <Recipe: Печенье Ёлочки на Новый год>]}] |
expr | <django.template.base.FilterExpression object at 0x7fd83cd09ea0> |
file_ | <ImageFieldFile: images/da8f5eebde8e9ae0adbe9c1664c2b32c.jpg> |
geometry | '424' |
key | 'watermark_size' |
noresolve | {'False': False, 'None': None, 'True': True} |
options | {'watermark': 'watermark.png', 'watermark_alpha': 0.5, 'watermark_pos': 'center', 'watermark_size': '100%'} |
self | <ThumbnailNode> |
thumbnail | None |
value | '100%' |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/sorl/thumbnail/shortcuts.py
in get_thumbnail
from sorl.thumbnail import default
def get_thumbnail(file_, geometry_string, **options):
"""
A shortcut for the Backend ``get_thumbnail`` method
"""
return default.backend.get_thumbnail(file_, geometry_string, **options)…
def delete(file_, delete_file=True):
"""
A shortcut for the Backend ``delete`` method
"""
Variable | Value |
---|---|
file_ | <ImageFieldFile: images/da8f5eebde8e9ae0adbe9c1664c2b32c.jpg> |
geometry_string | '424' |
options | {'watermark': 'watermark.png', 'watermark_alpha': 0.5, 'watermark_pos': 'center', 'watermark_size': '100%'} |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/sorl/thumbnail/base.py
in get_thumbnail
# We might as well set the size since we have the image in memory
image_info = default.engine.get_image_info(source_image)
options['image_info'] = image_info
size = default.engine.get_image_size(source_image)
source.set_size(size)
try:
self._create_thumbnail(source_image, geometry_string, options,…
thumbnail)
self._create_alternative_resolutions(source_image, geometry_string,
options, thumbnail.name)
finally:
default.engine.cleanup(source_image)
Variable | Value |
---|---|
attr | 'THUMBNAIL_BLUR' |
cached | None |
file_ | <ImageFieldFile: images/da8f5eebde8e9ae0adbe9c1664c2b32c.jpg> |
geometry_string | '424' |
image_info | {'jfif': 257, 'jfif_density': (1, 1), 'jfif_unit': 0, 'jfif_version': (1, 1)} |
key | 'blur' |
name | 'cache/97/f0/97f04fe8a26a45ea5b0ba97e8f95143d.jpg' |
options | {'colorspace': 'RGB', 'crop': False, 'cropbox': None, 'format': 'JPEG', 'image_info': {'jfif': 257, 'jfif_density': (1, 1), 'jfif_unit': 0, 'jfif_version': (1, 1)}, 'padding': False, 'padding_color': '#ffffff', 'quality': 95, 'rounded': None, 'upscale': True, 'watermark': 'watermark.png', 'watermark_alpha': 0.5, 'watermark_pos': 'center', 'watermark_size': '100%'} |
self | <sorl.thumbnail.base.ThumbnailBackend object at 0x7fd83d87bca0> |
size | (4928, 3264) |
source | <sorl.thumbnail.images.ImageFile object at 0x7fd83cd34c70> |
source_image | <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=4928x3264 at 0x7FD83CD34FA0> |
thumbnail | <sorl.thumbnail.images.ImageFile object at 0x7fd83cd37820> |
value | 0 |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/sorl/thumbnail/base.py
in _create_thumbnail
"""
Creates the thumbnail by using default.engine
"""
logger.debug('Creating thumbnail file [%s] at [%s] with [%s]',
thumbnail.name, geometry_string, options)
ratio = default.engine.get_image_ratio(source_image, options)
geometry = parse_geometry(geometry_string, ratio)
image = default.engine.create(source_image, geometry, options)…
default.engine.write(image, options, thumbnail)
# It's much cheaper to set the size here
size = default.engine.get_image_size(image)
thumbnail.set_size(size)
def _create_alternative_resolutions(self, source_image, geometry_string,
Variable | Value |
---|---|
geometry | (424, 281) |
geometry_string | '424' |
options | {'colorspace': 'RGB', 'crop': False, 'cropbox': None, 'format': 'JPEG', 'image_info': {'jfif': 257, 'jfif_density': (1, 1), 'jfif_unit': 0, 'jfif_version': (1, 1)}, 'padding': False, 'padding_color': '#ffffff', 'quality': 95, 'rounded': None, 'upscale': True, 'watermark': 'watermark.png', 'watermark_alpha': 0.5, 'watermark_pos': 'center', 'watermark_size': '100%'} |
ratio | 1.5098039215686274 |
self | <sorl.thumbnail.base.ThumbnailBackend object at 0x7fd83d87bca0> |
source_image | <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=4928x3264 at 0x7FD83CD34FA0> |
thumbnail | <sorl.thumbnail.images.ImageFile object at 0x7fd83cd37820> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/sorl_watermarker/engines/base.py
in wrapped
padding = False
if watermark_before_padding:
if options.get("padding") and self.get_image_size(image) != geometry:
# remove padding option, add it later
padding = options["padding"]
options["padding"] = False
image = fn(self, image, geometry, options)…
if watermark_before_padding:
if padding and self.get_image_size(image) != geometry:
# add padding after watermark
options["padding"] = padding
image = self.padding(image, geometry, options)
Variable | Value |
---|---|
fn | <function WatermarkEngineBase.create at 0x7fd83cc7c8b0> |
geometry | (424, 281) |
image | <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=4928x3264 at 0x7FD83CD34FA0> |
options | {'colorspace': 'RGB', 'crop': False, 'cropbox': None, 'format': 'JPEG', 'image_info': {'jfif': 257, 'jfif_density': (1, 1), 'jfif_unit': 0, 'jfif_version': (1, 1)}, 'padding': False, 'padding_color': '#ffffff', 'quality': 95, 'rounded': None, 'upscale': True, 'watermark': 'watermark.png', 'watermark_alpha': 0.5, 'watermark_pos': 'center', 'watermark_size': '100%'} |
padding | False |
self | <sorl_watermarker.engines.pil_engine.Engine object at 0x7fd83cbda6b0> |
watermark_before_padding | True |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/sorl_watermarker/engines/base.py
in create
Extend sorl.thumbnail base engine to support watermarks.
"""
name = "BaseEngine"
@handle_padding
def create(self, image, geometry, options):
image = super(WatermarkEngineBase, self).create(image, geometry, options)…
if (
settings.THUMBNAIL_WATERMARK_ALWAYS
or "watermark" in options
or "watermark_pos" in options
or "watermark_size" in options
or "watermark_alpha" in options
Variable | Value |
---|---|
__class__ | <class 'sorl_watermarker.engines.base.WatermarkEngineBase'> |
geometry | (424, 281) |
image | <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=4928x3264 at 0x7FD83CD34FA0> |
options | {'colorspace': 'RGB', 'crop': False, 'cropbox': None, 'format': 'JPEG', 'image_info': {'jfif': 257, 'jfif_density': (1, 1), 'jfif_unit': 0, 'jfif_version': (1, 1)}, 'padding': False, 'padding_color': '#ffffff', 'quality': 95, 'rounded': None, 'upscale': True, 'watermark': 'watermark.png', 'watermark_alpha': 0.5, 'watermark_pos': 'center', 'watermark_size': '100%'} |
self | <sorl_watermarker.engines.pil_engine.Engine object at 0x7fd83cbda6b0> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/sorl/thumbnail/engines/base.py
in create
"""
Processing conductor, returns the thumbnail as an image engine instance
"""
image = self.cropbox(image, geometry, options)
image = self.orientation(image, geometry, options)
image = self.colorspace(image, geometry, options)
image = self.remove_border(image, options)
image = self.scale(image, geometry, options)…
image = self.crop(image, geometry, options)
image = self.rounded(image, geometry, options)
image = self.blur(image, geometry, options)
image = self.padding(image, geometry, options)
return image
Variable | Value |
---|---|
geometry | (424, 281) |
image | <PIL.Image.Image image mode=RGB size=4928x3264 at 0x7FD83CD37DF0> |
options | {'colorspace': 'RGB', 'crop': False, 'cropbox': None, 'format': 'JPEG', 'image_info': {'jfif': 257, 'jfif_density': (1, 1), 'jfif_unit': 0, 'jfif_version': (1, 1)}, 'padding': False, 'padding_color': '#ffffff', 'quality': 95, 'rounded': None, 'upscale': True, 'watermark': 'watermark.png', 'watermark_alpha': 0.5, 'watermark_pos': 'center', 'watermark_size': '100%'} |
self | <sorl_watermarker.engines.pil_engine.Engine object at 0x7fd83cbda6b0> |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/sorl/thumbnail/engines/base.py
in scale
upscale = options['upscale']
x_image, y_image = map(float, self.get_image_size(image))
factor = self._calculate_scaling_factor(x_image, y_image, geometry, options)
if factor < 1 or upscale:
width = toint(x_image * factor)
height = toint(y_image * factor)
image = self._scale(image, width, height)…
return image
def crop(self, image, geometry, options):
"""
Wrapper for ``_crop``
Variable | Value |
---|---|
factor | 0.08603896103896104 |
geometry | (424, 281) |
height | 281 |
image | <PIL.Image.Image image mode=RGB size=4928x3264 at 0x7FD83CD37DF0> |
options | {'colorspace': 'RGB', 'crop': False, 'cropbox': None, 'format': 'JPEG', 'image_info': {'jfif': 257, 'jfif_density': (1, 1), 'jfif_unit': 0, 'jfif_version': (1, 1)}, 'padding': False, 'padding_color': '#ffffff', 'quality': 95, 'rounded': None, 'upscale': True, 'watermark': 'watermark.png', 'watermark_alpha': 0.5, 'watermark_pos': 'center', 'watermark_size': '100%'} |
self | <sorl_watermarker.engines.pil_engine.Engine object at 0x7fd83cbda6b0> |
upscale | True |
width | 424 |
x_image | 4928.0 |
y_image | 3264.0 |
/var/www/edanyam_ru_usr/data/www/edanyam.ru/venv/lib/python3.10/site-packages/sorl/thumbnail/engines/pil_engine.py
in _scale
image = image.crop((0, slice_height, image_width, image_height))
image_height -= slice_height
return image
def _scale(self, image, width, height):
return image.resize((width, height), resample=Image.ANTIALIAS)…
def _crop(self, image, width, height, x_offset, y_offset):
return image.crop((x_offset, y_offset,
width + x_offset, height + y_offset))
def _rounded(self, image, r):
Variable | Value |
---|---|
height | 281 |
image | <PIL.Image.Image image mode=RGB size=4928x3264 at 0x7FD83CD37DF0> |
self | <sorl_watermarker.engines.pil_engine.Engine object at 0x7fd83cbda6b0> |
width | 424 |
AnonymousUser
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
HTTP_ACCEPT | '*/*' |
HTTP_CONNECTION | 'upgrade' |
HTTP_HOST | 'edanyam.ru' |
HTTP_REFERER | 'http://edanyam.ru/tvorozhno-orehovyij-pirog-so-slivami/' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_X_FORWARDED_FOR | '44.193.29.184' |
HTTP_X_FORWARDED_HOST | 'edanyam.ru' |
HTTP_X_REAL_IP | '44.193.29.184' |
PATH_INFO | '/tvorozhno-orehovyij-pirog-so-slivami/' |
QUERY_STRING | '' |
RAW_URI | '/tvorozhno-orehovyij-pirog-so-slivami/' |
REMOTE_ADDR | '' |
REQUEST_METHOD | 'GET' |
SCRIPT_NAME | '' |
SERVER_NAME | 'edanyam.ru' |
SERVER_PORT | '80' |
SERVER_PROTOCOL | 'HTTP/1.1' |
SERVER_SOFTWARE | 'gunicorn/21.2.0' |
gunicorn.socket | <socket.socket fd=10, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0, laddr=/var/www/edanyam_ru_usr/data/www/edanyam.ru/gunicorn/gunicorn.sock> |
wsgi.errors | <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7fd83c997d30> |
wsgi.file_wrapper | '' |
wsgi.input | <gunicorn.http.body.Body object at 0x7fd83c997550> |
wsgi.input_terminated | True |
wsgi.multiprocess | True |
wsgi.multithread | False |
wsgi.run_once | False |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
edanyam.settings.local
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | (('AK', 'vl.cm@ya.ru'),) |
ALLOWED_HOSTS | ['www.edanyam.ru', 'edanyam.ru', '127.0.0.1', '45.128.204.126', '198.199.126.223', 'admin.edanyam.ru', 'http://localhost:8000', 'localhost'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'auth.User' |
AUTH_USER_MODULE | 'users.CustomUser' |
BASE_DIR | '/var/www/edanyam_ru_usr/data/www/edanyam.ru' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_BACKEND | 'memcached://127.0.0.1:11211/' |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CORS_ALLOW_CREDENTIALS | True |
CORS_ORIGIN_ALLOW_ALL | False |
CORS_ORIGIN_WHITELIST | ('http://localhost:8000', 'http://localhost', 'http://127.0.0.1', 'http://198.199.126.223', 'https://198.199.126.223', 'https://www.edanyam.ru', 'https://edanyam.ru', 'https://admin.edanyam.ru', 'https://edanyam-fghg5.ondigitalocean.app') |
CROPPED_PHOTOS_FOLDER | '/var/www/edanyam_ru_usr/data/www/edanyam.ru/media/cropped_photos' |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_NAME | 'csrftoken' |
CSRF_COOKIE_PATH | '/' |
CSRF_COOKIE_SAMESITE | 'Lax' |
CSRF_COOKIE_SECURE | False |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | [] |
CSRF_USE_SESSIONS | False |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.mysql', 'HOST': '', 'NAME': 'edanyam_ru', 'OPTIONS': {'charset': 'utf8mb4'}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'edanyam_ru'}} |
DATABASE_ROUTERS | [] |
DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS | 1000 |
DATETIME_FORMAT | 'N j, Y, P' |
DATETIME_INPUT_FORMATS | ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y'] |
DATE_FORMAT | 'N j, Y' |
DATE_INPUT_FORMATS | ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] |
DEBUG | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
DEBUG_TOOLBAR_PATCH_SETTINGS | False |
DECIMAL_SEPARATOR | '.' |
DEFAULT_CHARSET | 'utf-8' |
DEFAULT_CONTENT_TYPE | 'text/html' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
DEFAULT_FROM_EMAIL | 'edanyamru@yandex.ru' |
DEFAULT_HOST | 'edanyam' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | 'django.core.mail.backends.filebased.EmailBackend' |
EMAIL_FILE_PATH | '/var/www/edanyam_ru_usr/data/www/edanyam.ru/mails' |
EMAIL_HOST | 'smtp.yandex.ru' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | 'edanyamru@yandex.ru' |
EMAIL_PORT | 587 |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_LOCALTIME | False |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | True |
FILE_CHARSET | 'utf-8' |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ('django.core.files.uploadhandler.TemporaryFileUploadHandler',) |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
FILE_UPLOAD_PERMISSIONS | 420 |
FILE_UPLOAD_TEMP_DIR | None |
FIRST_DAY_OF_WEEK | 0 |
FIXTURE_DIRS | [] |
FORCE_SCRIPT_NAME | None |
FORMAT_MODULE_PATH | None |
FORM_RENDERER | 'django.forms.renderers.TemplatesSetting' |
GRAPHENE | {'MIDDLEWARE': ['graphql_jwt.middleware.JSONWebTokenMiddleware'], 'RELAY_CONNECTION_MAX_LIMIT': 1000, 'SCHEMA': 'edanyam.schema.schema'} |
HOME_FOLDER | '/var/www/edanyam_ru_usr/data/www/edanyam.ru' |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'django.contrib.admin', 'django.forms', 'django_extensions', 'el_pagination', 'graphene_django', 'django_filters', 'mptt', 'sorl.thumbnail', 'edanyam', 'edanyam.utils', 'edanyam.users', 'edanyam.recipe', 'edanyam.ingredients', 'edanyam.categories', 'edanyam.pages', 'edanyam.ads', 'edanyam.ajax', 'debug_toolbar', 'corsheaders', 'django_summernote', 'django_hosts') |
INTERNAL_IPS | ['127.0.0.1', '10.0.2.2'] |
LANGUAGES | [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] |
LANGUAGES_BIDI | ['he', 'ar', 'fa', 'ur'] |
LANGUAGE_CODE | 'ru-ru' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_NAME | 'django_language' |
LANGUAGE_COOKIE_PATH | '/' |
LOCALE_PATHS | ('/var/www/edanyam_ru_usr/data/www/edanyam.ru/locale',) |
LOGGING | {'disable_existing_loggers': False, 'formatters': {'simple': {'format': '%(levelname)s %(message)s'}, 'verbose': {'datefmt': '%d/%b/%Y %H:%M:%S', 'format': '[%(asctime)s] %(levelname)s ' '[%(name)s:%(lineno)s] %(message)s \n' '\n'}}, 'handlers': {'file': {'class': 'logging.FileHandler', 'filename': '/var/www/edanyam_ru_usr/data/www/edanyam.ru/edanyam.log', 'formatter': 'verbose', 'level': 'ERROR'}}, 'loggers': {'MYAPP': {'handlers': ['file'], 'level': 'ERROR'}, 'django': {'handlers': ['file'], 'level': 'ERROR', 'propagate': True}}, 'version': 1} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGIN_URL | '/accounts/login/' |
LOGOUT_REDIRECT_URL | None |
MANAGERS | (('AK', 'vl.cm@ya.ru'),) |
MEDIA_ROOT | '/var/www/edanyam_ru_usr/data/www/edanyam.ru/media' |
MEDIA_TEMP | '/var/www/edanyam_ru_usr/data/www/edanyam.ru/media/temp' |
MEDIA_URL | '/media/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | ['django_hosts.middleware.HostsRequestMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware', 'corsheaders.middleware.CorsMiddleware', 'django_hosts.middleware.HostsResponseMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
ORIGINAL_PHOTOS_FOLDER | '/var/www/edanyam_ru_usr/data/www/edanyam.ru/media/original_photos' |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
REGISTRATION_OPEN | False |
ROOT_HOSTCONF | 'edanyam.hosts' |
ROOT_URLCONF | 'edanyam.urls' |
SECRET_KEY | '********************' |
SECURE_BROWSER_XSS_FILTER | False |
SECURE_CONTENT_TYPE_NOSNIFF | False |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
SECURE_HSTS_PRELOAD | False |
SECURE_HSTS_SECONDS | 0 |
SECURE_PROXY_SSL_HEADER | None |
SECURE_REDIRECT_EXEMPT | [] |
SECURE_SSL_HOST | None |
SECURE_SSL_REDIRECT | False |
SERVER_EMAIL | 'root@localhost' |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_AGE | 1209600 |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_HTTPONLY | True |
SESSION_COOKIE_NAME | 'sessionid' |
SESSION_COOKIE_PATH | '/' |
SESSION_COOKIE_SAMESITE | 'Lax' |
SESSION_COOKIE_SECURE | False |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
SESSION_FILE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | True |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'edanyam.settings.local' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
SITE_ID | 1 |
STATICFILES_DIRS | ('/var/www/edanyam_ru_usr/data/www/edanyam.ru/custom_static',) |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/var/www/edanyam_ru_usr/data/www/edanyam.ru/static' |
STATIC_URL | '/static/' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/var/www/edanyam_ru_usr/data/www/edanyam.ru/templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'edanyam.context_processor.general_context_processor']}}] |
TEST_NON_SERIALIZED_APPS | [] |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
THOUSAND_SEPARATOR | ',' |
THUMBNAIL_DEBUG | True |
THUMBNAIL_ENGINE | 'sorl_watermarker.engines.pil_engine.Engine' |
THUMBNAIL_WATERMARK | 'watermark.png' |
TIME_FORMAT | 'P' |
TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
TIME_ZONE | 'Europe/Moscow' |
USE_I18N | True |
USE_L10N | False |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | False |
USE_X_FORWARDED_HOST | False |
USE_X_FORWARDED_PORT | False |
VK_KEY | '********************' |
VK_SECRET | '********************' |
WSGI_APPLICATION | 'edanyam.wsgi.application' |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
YEAR_MONTH_FORMAT | 'F Y' |
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.