invalid literal for int() with base 10: '*'
Request Method: | GET |
---|---|
Request URL: | http://rafalopezclarinete.com/es/sobreagudas/?page=1&orden=2&todos=1 |
Django Version: | 1.10.8 |
Exception Type: | ValueError |
Exception Value: | invalid literal for int() with base 10: '*' |
Exception Location: | /var/www/clarinete/estadistica_cms_integration/cms_plugins.py in NuevoOrden, line 19 |
Python Executable: | /usr/bin/python3 |
Python Version: | 3.5.3 |
Python Path: | ['//usr/local/lib/python3.5/dist-packages', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux-gnu', '/usr/lib/python3.5/lib-dynload', '/usr/local/lib/python3.5/dist-packages', '/usr/lib/python3/dist-packages', '/var/www/clarinete/', '/var/www/clarinete/clarinete/'] |
Server time: | Vie, 29 Mar 2024 11:42:21 +0000 |
In template /var/www/clarinete/clarinete/templates/fullwidth.html
, error at line 8
1 | {% extends "base.html" %} |
---|---|
2 | {% load i18n cms_tags %} |
3 | |
4 | {% block body_class %}tpl-fullwidth{% endblock %} |
5 | |
6 | {% block content %} |
7 | <div class="container"> |
8 | {% with 940 as width %}{% placeholder content %}{% endwith %} |
9 | </div> |
10 | {% endblock %} |
11 |
//usr/local/lib/python3.5/dist-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, assigned=available_attrs(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 | ValueError("invalid literal for int() with base 10: '*'",) |
get_response | <bound method BaseHandler._legacy_get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7fd2185e5780>> |
request | <WSGIRequest: GET '/es/sobreagudas/?page=1&orden=2&todos=1'> |
//usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py
in _legacy_get_response
# Apply request middleware
for middleware_method in self._request_middleware:
response = middleware_method(request)
if response:
break
if response is None:
response = self._get_response(request)...
return response
Variable | Value |
---|---|
middleware_method | <bound method ToolbarMiddleware.process_request of <cms.middleware.toolbar.ToolbarMiddleware object at 0x7fd21830bb00>> |
request | <WSGIRequest: GET '/es/sobreagudas/?page=1&orden=2&todos=1'> |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7fd2185e5780> |
//usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py
in _get_response
"HttpResponse object. It returned None instead."
% (middleware_method.__self__.__class__.__name__)
)
try:
response = response.render()
except Exception as e:
response = self.process_exception_by_middleware(e, request)...
return response
def process_exception_by_middleware(self, exception, request):
"""
Pass the exception to the exception middleware. If no middleware
Variable | Value |
---|---|
callback | <function details at 0x7fd21824fe18> |
callback_args | () |
callback_kwargs | {'slug': 'sobreagudas'} |
middleware_method | <bound method ToolbarMiddleware.process_view of <cms.middleware.toolbar.ToolbarMiddleware object at 0x7fd21830bb00>> |
request | <WSGIRequest: GET '/es/sobreagudas/?page=1&orden=2&todos=1'> |
resolver | <RegexURLResolver 'clarinete.urls' (None:None) ^/> |
resolver_match | ResolverMatch(func=cms.views.details, args=(), kwargs={'slug': 'sobreagudas'}, url_name=pages-details-by-slug, app_names=[], namespaces=[]) |
response | <TemplateResponse status_code=200, "text/html; charset=utf-8"> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7fd2185e5780> |
wrapped_callback | <function details at 0x7fd21824fe18> |
//usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py
in _get_response
raise ValueError(
"%s.process_template_response didn't return an "
"HttpResponse object. It returned None instead."
% (middleware_method.__self__.__class__.__name__)
)
try:
response = response.render()...
except Exception as e:
response = self.process_exception_by_middleware(e, request)
return response
def process_exception_by_middleware(self, exception, request):
Variable | Value |
---|---|
callback | <function details at 0x7fd21824fe18> |
callback_args | () |
callback_kwargs | {'slug': 'sobreagudas'} |
middleware_method | <bound method ToolbarMiddleware.process_view of <cms.middleware.toolbar.ToolbarMiddleware object at 0x7fd21830bb00>> |
request | <WSGIRequest: GET '/es/sobreagudas/?page=1&orden=2&todos=1'> |
resolver | <RegexURLResolver 'clarinete.urls' (None:None) ^/> |
resolver_match | ResolverMatch(func=cms.views.details, args=(), kwargs={'slug': 'sobreagudas'}, url_name=pages-details-by-slug, app_names=[], namespaces=[]) |
response | <TemplateResponse status_code=200, "text/html; charset=utf-8"> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7fd2185e5780> |
wrapped_callback | <function details at 0x7fd21824fe18> |
//usr/local/lib/python3.5/dist-packages/django/template/response.py
in render
If the content has already been rendered, this is a no-op.
Returns the baked response instance.
"""
retval = self
if not self._is_rendered:
self.content = self.rendered_content...
for post_callback in self._post_render_callbacks:
newretval = post_callback(retval)
if newretval is not None:
retval = newretval
return retval
Variable | Value |
---|---|
retval | <TemplateResponse status_code=200, "text/html; charset=utf-8"> |
self | <TemplateResponse status_code=200, "text/html; charset=utf-8"> |
//usr/local/lib/python3.5/dist-packages/django/template/response.py
in rendered_content
This *does not* set the final content of the response. To set the
response content, you must either call render(), or set the
content explicitly using the value of this property.
"""
template = self.resolve_template(self.template_name)
context = self.resolve_context(self.context_data)
content = template.render(context, self._request)...
return content
def add_post_render_callback(self, callback):
"""Adds a new post-rendering callback.
If the response has already been rendered,
Variable | Value |
---|---|
context | {'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'has_change_permissions': False, 'has_view_permissions': True, 'lang': 'es'} |
self | <TemplateResponse status_code=200, "text/html; charset=utf-8"> |
template | <django.template.backends.django.Template object at 0x7fd2181b3278> |
//usr/local/lib/python3.5/dist-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 | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
request | <WSGIRequest: GET '/es/sobreagudas/?page=1&orden=2&todos=1'> |
self | <django.template.backends.django.Template object at 0x7fd2181b3278> |
//usr/local/lib/python3.5/dist-packages/django/template/base.py
in render
def render(self, context):
"Display stage -- can be called many times"
context.render_context.push()
try:
if context.template is None:
with context.bind_template(self):
context.template_name = self.name
return self._render(context)...
else:
return self._render(context)
finally:
context.render_context.pop()
def compile_nodelist(self):
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
self | <django.template.base.Template object at 0x7fd2181b3390> |
//usr/local/lib/python3.5/dist-packages/django/template/base.py
in _render
def __iter__(self):
for node in self.nodelist:
for subnode in node:
yield subnode
def _render(self, context):
return self.nodelist.render(context)...
def render(self, context):
"Display stage -- can be called many times"
context.render_context.push()
try:
if context.template is None:
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
self | <django.template.base.Template object at 0x7fd2181b3390> |
//usr/local/lib/python3.5/dist-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(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bits | [] |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
node | <ExtendsNode: extends "base.html"> |
self | [<ExtendsNode: extends "base.html">] |
//usr/local/lib/python3.5/dist-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.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
self | <ExtendsNode: extends "base.html"> |
//usr/local/lib/python3.5/dist-packages/django/template/loader_tags.py
in render
blocks = {n.name: n for n in
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.
return compiled_parent._render(context)...
class IncludeNode(Node):
context_key = '__include_context'
def __init__(self, template, *args, **kwargs):
Variable | Value |
---|---|
block_context | <django.template.loader_tags.BlockContext object at 0x7fd2180ea9b0> |
compiled_parent | <django.template.base.Template object at 0x7fd217fba7f0> |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
node | <ExtendsNode: extends "base_root.html"> |
self | <ExtendsNode: extends "base.html"> |
//usr/local/lib/python3.5/dist-packages/django/template/base.py
in _render
def __iter__(self):
for node in self.nodelist:
for subnode in node:
yield subnode
def _render(self, context):
return self.nodelist.render(context)...
def render(self, context):
"Display stage -- can be called many times"
context.render_context.push()
try:
if context.template is None:
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
self | <django.template.base.Template object at 0x7fd217fba7f0> |
//usr/local/lib/python3.5/dist-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(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bits | [] |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
node | <ExtendsNode: extends "base_root.html"> |
self | [<ExtendsNode: extends "base_root.html">] |
//usr/local/lib/python3.5/dist-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.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
self | <ExtendsNode: extends "base_root.html"> |
//usr/local/lib/python3.5/dist-packages/django/template/loader_tags.py
in render
blocks = {n.name: n for n in
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.
return compiled_parent._render(context)...
class IncludeNode(Node):
context_key = '__include_context'
def __init__(self, template, *args, **kwargs):
Variable | Value |
---|---|
block_context | <django.template.loader_tags.BlockContext object at 0x7fd2180ea9b0> |
blocks | {'body_class': <Block Node: body_class. Contents: [<TextNode: 'tpl-root'>]>, 'extend_root': <Block Node: extend_root. Contents: []>, 'extrahead': <Block Node: extrahead. Contents: [<TextNode: '\n <script type="tex'>]>, 'meta_description': <Block Node: meta_description. Contents: [<TextNode: '\n '>, <Tag: page_attribute>, <TextNode: '\n '>]>, 'meta_tags': <Block Node: meta_tags. Contents: [<TextNode: '\n <meta name="view'>, <django.template.defaulttags.SpacelessNode object at 0x7fd217f764a8>, <TextNode: '">\n '>]>, 'title': <Block Node: title. Contents: [<TextNode: '\n '>, <Tag: page_attribute>, <TextNode: ' - '>, <Variable Node: request.site.name>, <TextNode: '\n '>]>} |
compiled_parent | <django.template.base.Template object at 0x7fd217fbac88> |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
node | <django.template.defaulttags.LoadNode object at 0x7fd217f39978> |
self | <ExtendsNode: extends "base_root.html"> |
//usr/local/lib/python3.5/dist-packages/django/template/base.py
in _render
def __iter__(self):
for node in self.nodelist:
for subnode in node:
yield subnode
def _render(self, context):
return self.nodelist.render(context)...
def render(self, context):
"Display stage -- can be called many times"
context.render_context.push()
try:
if context.template is None:
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
self | <django.template.base.Template object at 0x7fd217fbac88> |
//usr/local/lib/python3.5/dist-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(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | '"></script>\n <![endif]-->\n ' |
bits | ['<!doctype html>', '', '\n<html lang="', 'es', '">\n' '<head>\n' ' <meta charset="utf-8">\n' ' <meta http-equiv="x-ua-compatible" content="ie=edge">\n' ' <title>\n' ' ', '\n Sobreagudas - \n ', '\n </title>\n ', '\n' ' <meta name="viewport" content="width=device-width,initial-scale=1">\n' ' <meta name="description" content="">\n' ' ', '\n <link rel="apple-touch-icon" href="', '/static/favicon.png', '">\n <link rel="icon" type="image/png" href="', '/static/favicon.png', '">\n <!--[if IE]><link rel="shortcut icon" href="', '/static/favicon.ico', '"><![endif]-->\n' ' <style>\n' ' body { visibility: hidden; }\n' ' @media (max-width: 600px) {\n' ' body { visibility: visible; }\n' ' .feature-visual img { width: 100%; }\n' ' .sr-only, .skip-links, .navbar-collapse { display: none; }\n' ' }\n' ' </style>\n' ' <!--[if lt IE 9]>\n' ' <script src="', '/static/js/libs/html5shiv.min.js', '"></script>\n <script src="', '/static/js/libs/respond.min.js', '"></script>\n <![endif]-->\n '] |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
node | <Tag: render_block> |
self | [<TextNode: '<!doctype html>'>, <django.template.defaulttags.LoadNode object at 0x7fd217f39978>, <TextNode: '\n<html lang="'>, <Variable Node: LANGUAGE_CODE>, <TextNode: '">\n<head>\n <meta chars'>, <Block Node: title. Contents: [<TextNode: '\n '>, <Tag: page_attribute>, <TextNode: ' - '>, <Variable Node: request.site.name>, <TextNode: '\n '>]>, <TextNode: '\n </title>\n '>, <Block Node: meta_tags. Contents: [<TextNode: '\n <meta name="view'>, <django.template.defaulttags.SpacelessNode object at 0x7fd217f764a8>, <TextNode: '">\n '>]>, <TextNode: '\n <link rel="apple-tou'>, <django.templatetags.static.StaticNode object at 0x7fd217ebd2b0>, <TextNode: '">\n <link rel="icon" t'>, <django.templatetags.static.StaticNode object at 0x7fd217ebd358>, <TextNode: '">\n <!--[if IE]><link '>, <django.templatetags.static.StaticNode object at 0x7fd217ebd4a8>, <TextNode: '"><![endif]-->\n <style'>, <django.templatetags.static.StaticNode object at 0x7fd217ebd9b0>, <TextNode: '"></script>\n <script s'>, <django.templatetags.static.StaticNode object at 0x7fd217ebd4e0>, <TextNode: '"></script>\n <![endif]'>, <Tag: render_block>] |
//usr/local/lib/python3.5/dist-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.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
self | <Tag: render_block> |
//usr/local/lib/python3.5/dist-packages/classytags/core.py
in render
"""
INTERNAL method to prepare rendering
Usually you should not override this method, but rather use render_tag.
"""
items = self.kwargs.items()
kwargs = dict([(key, value.resolve(context)) for key, value in items])
kwargs.update(self.blocks)
return self.render_tag(context, **kwargs)...
def render_tag(self, context, **kwargs):
"""
The method you should override in your custom tags
"""
raise NotImplementedError
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
items | dict_items([('postprocessor', <TemplateConstant: None>), ('name', <classytags.values.StringValue object at 0x7fd217ebd6a0>)]) |
kwargs | {'name': 'css', 'nodelist': [<TextNode: '\n '>, <Block Node: extrahead. Contents: [<TextNode: '\n <script type="tex'>]>, <TextNode: '\n '>, <Variable Node: ALDRYN_SNAKE.render_head>, <TextNode: '\n</head>\n<body id="page-t'>, <Variable Node: LANGUAGE_CODE>, <TextNode: ' '>, <Block Node: body_class. Contents: [<TextNode: 'tpl-root'>]>, <TextNode: '">\n'>, <django.template.loader_tags.IncludeNode object at 0x7fd217ebdfd0>, <TextNode: '\n'>, <Tag: cms_toolbar>], 'postprocessor': None} |
self | <Tag: render_block> |
//usr/local/lib/python3.5/dist-packages/sekizai/templatetags/sekizai_tags.py
in render_tag
Argument('postprocessor', required=False, default=None, resolve=False),
parser_class=SekizaiParser,
)
def render_tag(self, context, name, postprocessor, nodelist):
if not validate_context(context):
return nodelist.render(context)
rendered_contents = nodelist.render(context)...
varname = get_varname()
data = '\n'.join(context[varname][name])
if postprocessor:
func = import_processor(postprocessor)
data = func(context, data, name)
return '%s\n%s' % (data, rendered_contents)
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
name | 'css' |
nodelist | [<TextNode: '\n '>, <Block Node: extrahead. Contents: [<TextNode: '\n <script type="tex'>]>, <TextNode: '\n '>, <Variable Node: ALDRYN_SNAKE.render_head>, <TextNode: '\n</head>\n<body id="page-t'>, <Variable Node: LANGUAGE_CODE>, <TextNode: ' '>, <Block Node: body_class. Contents: [<TextNode: 'tpl-root'>]>, <TextNode: '">\n'>, <django.template.loader_tags.IncludeNode object at 0x7fd217ebdfd0>, <TextNode: '\n'>, <Tag: cms_toolbar>] |
postprocessor | None |
self | <Tag: render_block> |
//usr/local/lib/python3.5/dist-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(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | '\n' |
bits | ['\n ', '\n' ' <script type="text/javascript">\n' ' $(function() {\n' ' $("#id_seleccionar_todos").change(function () {\n' ' $("input:checkbox").prop(\'checked\', $(this).prop("checked"));\n' '\n' ' })\n' ' });\n' ' </script>\n' ' \n' ' ', '\n ', '', '\n</head>\n<body id="page-top" class="noscript lang-', 'es', ' ', 'tpl-fullwidth', '">\n', '\n\n', '\n'] |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
node | <Tag: cms_toolbar> |
self | [<TextNode: '\n '>, <Block Node: extrahead. Contents: [<TextNode: '\n <script type="tex'>]>, <TextNode: '\n '>, <Variable Node: ALDRYN_SNAKE.render_head>, <TextNode: '\n</head>\n<body id="page-t'>, <Variable Node: LANGUAGE_CODE>, <TextNode: ' '>, <Block Node: body_class. Contents: [<TextNode: 'tpl-root'>]>, <TextNode: '">\n'>, <django.template.loader_tags.IncludeNode object at 0x7fd217ebdfd0>, <TextNode: '\n'>, <Tag: cms_toolbar>] |
//usr/local/lib/python3.5/dist-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.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
self | <Tag: cms_toolbar> |
//usr/local/lib/python3.5/dist-packages/classytags/core.py
in render
"""
INTERNAL method to prepare rendering
Usually you should not override this method, but rather use render_tag.
"""
items = self.kwargs.items()
kwargs = dict([(key, value.resolve(context)) for key, value in items])
kwargs.update(self.blocks)
return self.render_tag(context, **kwargs)...
def render_tag(self, context, **kwargs):
"""
The method you should override in your custom tags
"""
raise NotImplementedError
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
items | dict_items([('name', <TemplateConstant: None>)]) |
kwargs | {'name': None, 'nodelist': [<TextNode: '\n\n'>, <Block Node: extend_root. Contents: []>, <TextNode: '\n\n'>, <TextNode: '\n<noscript id="deferred-s'>, <django.templatetags.static.StaticNode object at 0x7fd217f26208>, <TextNode: '">\n</noscript>\n<script>\n '>, <django.templatetags.static.StaticNode object at 0x7fd217f262b0>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fd217f26358>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fd217f26400>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fd217f264a8>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fd217f26550>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fd217f265f8>, <TextNode: '"></script>\n'>, <Tag: render_block>]} |
self | <Tag: cms_toolbar> |
//usr/local/lib/python3.5/dist-packages/cms/templatetags/cms_tags.py
in render_tag
with force_language(language):
# needed to populate the context with sekizai content
render_to_string('cms/toolbar/toolbar_javascript.html', flatten_context(context))
context['addons'] = mark_safe(toolbar.render_addons(context))
else:
language = None
# render everything below the tag
rendered_contents = nodelist.render(context)...
# sanity checks
if not request:
return rendered_contents
if not toolbar:
return rendered_contents
if not toolbar.show_toolbar:
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
language | None |
name | None |
nodelist | [<TextNode: '\n\n'>, <Block Node: extend_root. Contents: []>, <TextNode: '\n\n'>, <TextNode: '\n<noscript id="deferred-s'>, <django.templatetags.static.StaticNode object at 0x7fd217f26208>, <TextNode: '">\n</noscript>\n<script>\n '>, <django.templatetags.static.StaticNode object at 0x7fd217f262b0>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fd217f26358>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fd217f26400>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fd217f264a8>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fd217f26550>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fd217f265f8>, <TextNode: '"></script>\n'>, <Tag: render_block>] |
request | <WSGIRequest: GET '/es/sobreagudas/?page=1&orden=2&todos=1'> |
self | <Tag: cms_toolbar> |
toolbar | <cms.toolbar.toolbar.CMSToolbar object at 0x7fd217f090f0> |
//usr/local/lib/python3.5/dist-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(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | '\n\n' |
bits | ['\n\n'] |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
node | <Block Node: extend_root. Contents: []> |
self | [<TextNode: '\n\n'>, <Block Node: extend_root. Contents: []>, <TextNode: '\n\n'>, <TextNode: '\n<noscript id="deferred-s'>, <django.templatetags.static.StaticNode object at 0x7fd217f26208>, <TextNode: '">\n</noscript>\n<script>\n '>, <django.templatetags.static.StaticNode object at 0x7fd217f262b0>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fd217f26358>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fd217f26400>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fd217f264a8>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fd217f26550>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x7fd217f265f8>, <TextNode: '"></script>\n'>, <Tag: render_block>] |
//usr/local/lib/python3.5/dist-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.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
self | <Block Node: extend_root. Contents: []> |
//usr/local/lib/python3.5/dist-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: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]> |
block_context | <django.template.loader_tags.BlockContext object at 0x7fd2180ea9b0> |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
push | <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]> |
self | <Block Node: extend_root. Contents: []> |
//usr/local/lib/python3.5/dist-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(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | '\n\n' |
bits | ['\n', '\n' '\n' '<header class="navbar navbar-head js-navbar-head navbar-inverse ' 'navbar-fixed-top">\n' ' <div class="container">\n' ' \n' ' <div class="navbar-header">\n' ' \n' ' <h1 class="navbar-brand">\n' ' <a href="/">\n' ' <span class="sr-only"></span>\n' ' <img src="/static/img/clarinet.jpg" alt="" />\n' ' </a>\n' ' </h1>\n' ' <button type="button" class="navbar-toggle collapsed" ' 'data-toggle="collapse" data-target=".js-navbar-header">\n' ' <span class="icon-bar"></span><span ' 'class="icon-bar"></span><span class="icon-bar"></span>\n' ' </button>\n' ' </div>\n' '\n' ' \n' ' <h2 class="sr-only">Shortcuts</h2>\n' ' <ul class="skip-links">\n' ' <li><a href="/" title="[Alt + 0]" accesskey="0">Go to ' 'home</a></li>\n' ' <li><a href="#navigation" title="[Alt + 1]" accesskey="1">Jump ' 'to navigation</a></li>\n' ' <li><a href="#content" title="[Alt + 2]" accesskey="2">Jump to ' 'content</a></li>\n' ' <li><a href="#footer" title="[Alt + 3]" ' 'accesskey="3">Contact</a></li>\n' ' </ul>\n' '\n' ' <div class="navbar-collapse collapse js-navbar-header">\n' ' \n' ' <nav class="nav navbar-main navbar-right" id="navigation">\n' ' <h2 class="sr-only">Navigation</h2>\n' ' \n' ' \n' ' <ul class="nav navbar-nav">\n' ' \n' '\n' '\n' '\n' '<li class="child first">\n' ' <a href="/es/">\n' ' <span>\n' ' Inicio\n' ' \n' ' </span>\n' ' </a>\n' ' \n' '</li>\n' '\n' '<li class="child active">\n' ' <a href="/es/sobreagudas/">\n' ' <span>\n' ' Sobreagudas\n' ' \n' ' </span>\n' ' </a>\n' ' \n' '</li>\n' '\n' '<li class="child">\n' ' <a href="/es/contacto/">\n' ' <span>\n' ' Contacto\n' ' \n' ' </span>\n' ' </a>\n' ' \n' '</li>\n' '\n' '<li class="child">\n' ' <a href="/es/publicaciones/">\n' ' <span>\n' ' Publicaciones\n' ' \n' ' </span>\n' ' </a>\n' ' \n' '</li>\n' '\n' '<li class="child last">\n' ' <a href="/es/biografia/">\n' ' <span>\n' ' Biografía\n' ' \n' ' </span>\n' ' </a>\n' ' \n' '</li>\n' '\n' '\n' ' <li class="divider" role="presentation"><span ' 'class="sr-only">Separator</span></li>\n' ' \n' '\n' '\n' '\n' '\n' ' \n' '\n' '\n' '\n' '\n' ' </ul>\n' ' \n' ' \n' ' </nav>\n' ' \n' ' </div>\n' ' </div>\n' '</header>\n', '\n' '\n' '<!-- start: content -->\n' '<hr class="sr-only" />\n' '<div class="feature-wrapper js-feature-wrapper">\n' ' ', '\n' ' <img\n' ' \n' ' \n' ' \n' ' ' 'src="/media/filer_public_thumbnails/filer_public/8c/33/8c33c1f8-ef01-4fcd-89b4-c973b3d3e1a8/sobre.gif__3000x0_q85_subsampling-2_upscale.jpg"\n' ' \n' ' \n' ' alt=""\n' ' \n' ' \n' ' class="\n' ' img-responsive \n' ' \n' ' \n' ' \n' ' \n' ' "\n' ' \n' ' \n' ' \n' ' \n' '>\n' '\n' ' ', '\n</div>\n\n', '\n' '\n' '<!-- start: breadcrumb -->\n' '\n' '<nav class="navbar navbar-breadcrumb" role="navigation">\n' ' <h3 class="sr-only">You are here</h3>\n' ' <div class="container">\n' ' <ol class="breadcrumb">\n' ' \n' ' \n' ' \n' ' <li class="child"><a href="/es/">Inicio</a></li>\n' ' \n' '\n' ' \n' ' <li class="child active">Sobreagudas</li>\n' ' \n' '\n' '\n' ' \n' ' </ol>\n' ' </div... <trimmed 4176 bytes string> |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
node | <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]> |
self | [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>] |
//usr/local/lib/python3.5/dist-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.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
self | <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]> |
//usr/local/lib/python3.5/dist-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: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]> |
block_context | <django.template.loader_tags.BlockContext object at 0x7fd2180ea9b0> |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
push | <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]> |
self | <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]> |
//usr/local/lib/python3.5/dist-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(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | '\n ' |
bits | ['\n '] |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
node | <Block Node: content. Contents: []> |
self | [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>] |
//usr/local/lib/python3.5/dist-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.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
self | <Block Node: content. Contents: []> |
//usr/local/lib/python3.5/dist-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 class="containe'>, <WithNode>, <TextNode: '\n </div>\n'>]> |
block_context | <django.template.loader_tags.BlockContext object at 0x7fd2180ea9b0> |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
push | <Block Node: content. Contents: [<TextNode: '\n <div class="containe'>, <WithNode>, <TextNode: '\n </div>\n'>]> |
self | <Block Node: content. Contents: []> |
//usr/local/lib/python3.5/dist-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(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | '\n <div class="container">\n ' |
bits | ['\n <div class="container">\n '] |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
node | <WithNode> |
self | [<TextNode: '\n <div class="containe'>, <WithNode>, <TextNode: '\n </div>\n'>] |
//usr/local/lib/python3.5/dist-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.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
self | <WithNode> |
//usr/local/lib/python3.5/dist-packages/django/template/defaulttags.py
in render
def __repr__(self):
return "<WithNode>"
def render(self, context):
values = {key: val.resolve(context) for key, val in
six.iteritems(self.extra_context)}
with context.push(**values):
return self.nodelist.render(context)...
@register.tag
def autoescape(parser, token):
"""
Force autoescape behavior for this block.
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
self | <WithNode> |
values | {'width': 940} |
//usr/local/lib/python3.5/dist-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(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bits | [] |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
node | <Tag: placeholder> |
self | [<Tag: placeholder>] |
//usr/local/lib/python3.5/dist-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.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
self | <Tag: placeholder> |
//usr/local/lib/python3.5/dist-packages/classytags/core.py
in render
"""
INTERNAL method to prepare rendering
Usually you should not override this method, but rather use render_tag.
"""
items = self.kwargs.items()
kwargs = dict([(key, value.resolve(context)) for key, value in items])
kwargs.update(self.blocks)
return self.render_tag(context, **kwargs)...
def render_tag(self, context, **kwargs):
"""
The method you should override in your custom tags
"""
raise NotImplementedError
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
items | dict_items([('extra_bits', <TemplateConstant: []>), ('name', <classytags.values.StringValue object at 0x7fd2180e8c50>)]) |
kwargs | {'extra_bits': [], 'name': 'content'} |
self | <Tag: placeholder> |
//usr/local/lib/python3.5/dist-packages/cms/templatetags/cms_tags.py
in render_tag
return ''
inherit = 'inherit' in extra_bits
content = content_renderer.render_page_placeholder(
slot=name,
context=context,
inherit=inherit,
nodelist=nodelist,...
)
return content
def get_name(self):
return self.kwargs['name'].var.value.strip('"').strip("'")
Variable | Value |
---|---|
content_renderer | <cms.plugin_rendering.ContentRenderer object at 0x7fd2180e8550> |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
extra_bits | [] |
inherit | False |
name | 'content' |
nodelist | None |
self | <Tag: placeholder> |
//usr/local/lib/python3.5/dist-packages/cms/plugin_rendering.py
in render_page_placeholder
else:
content = self.render_placeholder(
placeholder,
context=context,
page=current_page,
editable=editable,
use_cache=True,
nodelist=None,...
)
should_inherit = (
inherit
and not content and current_page.parent_id
# The placeholder cache is primed when the first placeholder
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
current_page | <SimpleLazyObject: <cms.models.pagemodel.Page object at 0x7fd217f4e860>> |
editable | True |
inherit | False |
nodelist | None |
page | None |
placeholder | <Placeholder: content> |
placeholder_cache | {4: {'content': <Placeholder: content>, 'feature': <Placeholder: feature>}} |
self | <cms.plugin_rendering.ContentRenderer object at 0x7fd2180e8550> |
slot | 'content' |
//usr/local/lib/python3.5/dist-packages/cms/plugin_rendering.py
in render_placeholder
if plugins:
plugin_content = self.render_plugins(
plugins=plugins,
context=context,
placeholder=placeholder,
editable=editable,
)
placeholder_content = ''.join(plugin_content)...
elif nodelist:
# should be nodelist from a template
placeholder_content = nodelist.render(context)
else:
placeholder_content = ''
Variable | Value |
---|---|
Watcher | <class 'sekizai.helpers.Watcher'> |
cached_value | None |
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
editable | False |
get_plugins | <function get_plugins at 0x7fd21e26b950> |
language | 'es' |
nodelist | None |
page | <SimpleLazyObject: <cms.models.pagemodel.Page object at 0x7fd217f4e860>> |
placeholder | <Placeholder: content> |
plugin_content | <generator object ContentRenderer.render_plugins at 0x7fd2182351a8> |
plugins | [<Text: En este entorno...>, <CMSPlugin: 454>] |
self | <cms.plugin_rendering.ContentRenderer object at 0x7fd2180e8550> |
site_id | 1 |
template | 'fullwidth.html' |
use_cache | True |
watcher | <sekizai.helpers.Watcher object at 0x7fd217ecdf60> |
width | None |
//usr/local/lib/python3.5/dist-packages/cms/plugin_rendering.py
in render_plugins
def render_plugins(self, plugins, context, placeholder=None, editable=False):
total = len(plugins)
for index, plugin in enumerate(plugins):
plugin._render_meta.total = total
plugin._render_meta.index = index
yield self.render_plugin(plugin, context, placeholder, editable)...
def _get_cached_placeholder_content(self, placeholder, site_id, language):
"""
Returns a dictionary mapping placeholder content and sekizai data.
Returns None if no cache is present.
"""
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {}, {}, {'cms_edit_on': 'edit', 'cms_edit_off': 'edit_off', 'lang': 'es', 'cms_version': '3.4.5', 'python_version': '3.5.3', 'has_view_permissions': True, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'django_version': '1.10.8', 'has_change_permissions': False}, {'block': <Block Node: extend_root. Contents: [<TextNode: '\n'>, <Block Node: header. Contents: [<TextNode: '\n'>, <TextNode: '\n<header class="navbar na'>, <TextNode: '\n <div class="navb'>, <TextNode: '\n <h1 class="n'>, <Variable Node: request.site.name>, <TextNode: '</span>\n '>, <django.templatetags.static.StaticNode object at 0x7fd2180ed630>, <TextNode: '" alt="'>, <Variable Node: request.site.name>, <TextNode: '" />\n </a>'>, <For Node: for row in 123|make_list, tail_len: 1>, <TextNode: '\n </button>\n '>, <TextNode: '\n <h2 class="sr-on'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e8860>, <TextNode: '</h2>\n <ul class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b400>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b780>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b5f8>, <TextNode: '</a></li>\n <li'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b2e8>, <TextNode: '</a></li>\n </ul>\n\n'>, <Block Node: navbar. Contents: [<TextNode: '\n <nav class="'>, <django.templatetags.i18n.TranslateNode object at 0x7fd217f6b9b0>, <TextNode: '</h2>\n '>, <Tag: render_model_block>, <TextNode: '\n </nav>\n '>]>, <TextNode: '\n </div>\n </div'>]>, <TextNode: '\n\n<!-- start: content -->'>, <Block Node: feature. Contents: [<TextNode: '\n '>, <Tag: placeholder>, <TextNode: '\n '>]>, <TextNode: '\n</div>\n\n'>, <Block Node: breadcrumb. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: messages. Contents: [<TextNode: '\n'>, <IfNode>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: extend_base. Contents: [<TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n'>]>, <TextNode: '\n<hr class="sr-only" />\n<'>, <Block Node: footer. Contents: [<TextNode: '\n<!-- start: footer -->\n<'>, <django.templatetags.i18n.TranslateNode object at 0x7fd2180e4eb8>, <TextNode: '</h2>\n\n <div class'>, <Tag: render_model_block>, <TextNode: '\n '>, <Tag: static_placeholder>, <TextNode: '\n </div>\n\n</footer'>]>, <TextNode: '\n\n'>, <Tag: addtoblock>, <TextNode: '\n'>]>}] |
editable | False |
index | 1 |
placeholder | <Placeholder: content> |
plugin | <CMSPlugin: 454> |
plugins | [<Text: En este entorno...>, <CMSPlugin: 454>] |
self | <cms.plugin_rendering.ContentRenderer object at 0x7fd2180e8550> |
total | 2 |
//usr/local/lib/python3.5/dist-packages/cms/plugin_rendering.py
in render_plugin
# we'd better pass a flat dict to template.render
# as plugin.render can return pretty much any kind of context / dictionary
# we'd better flatten it and force to a Context object
# flattening the context means that template must be an engine-specific template object
# which is guaranteed by get_cached_template if the template returned by
# plugin._get_render_template is either a string or an engine-specific template object
context = PluginContext(context, instance, placeholder)
context = plugin.render(context, instance, placeholder.slot)...
context = flatten_context(context)
template = plugin._get_render_template(context, instance, placeholder)
template = self.get_cached_template(template)
content = template.render(context)
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {'csrf_token': <SimpleLazyObject: <function csrf.<locals>._get_val at 0x7fd217f2e7b8>>, 'lang': 'es', 'True': True, 'None': None, 'STATIC_URL': '/static/', 'SEKIZAI_CONTENT_HOLDER': defaultdict(<class 'sekizai.data.UniqueSequence'>, {}), 'cms_version': '3.4.5', 'CMS_TEMPLATE': <function cms_settings.<locals>.<lambda> at 0x7fd217f450d0>, 'request': <WSGIRequest: GET '/es/sobreagudas/?page=1&orden=2&todos=1'>, 'django_version': '1.10.8', 'False': False, 'messages': <django.contrib.messages.storage.fallback.FallbackStorage object at 0x7fd217f406d8>, 'python_version': '3.5.3', 'cms_menu_renderer': <django.utils.functional.lazy.<locals>.__proxy__ object at 0x7fd2180e8ba8>, 'user': <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fd2180f8be0>>, 'LANGUAGE_BIDI': False, 'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x7fd2180ea860>, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'DEFAULT_MESSAGE_LEVELS': {'WARNING': 30, 'SUCCESS': 25, 'INFO': 20, 'ERROR': 40, 'DEBUG': 10}, 'LANGUAGES': (('es', 'es'),), 'cms_edit_off': 'edit_off', 'cms_edit_on': 'edit', 'MEDIA_URL': '/media/', 'cms_content_renderer': <cms.plugin_rendering.ContentRenderer object at 0x7fd2180e8550>, 'has_change_permissions': False, 'CMS_MEDIA_URL': '/media/cms/', 'LANGUAGE_CODE': 'es', 'TIME_ZONE': 'UTC', 'has_view_permissions': True, 'width': 940, 'block': <Block Node: content. Contents: [<TextNode: '\n <div class="containe'>, <WithNode>, <TextNode: '\n </div>\n'>]>}, {'plugin': {'instance': <CMSPlugin: 454>, 'id_attr': 'plugin_12_454', 'revcounter': 1, 'last': True, 'counter': 2, 'revcounter0': 0, 'total': 2, 'first': False, 'counter0': 1}}] |
editable | False |
instance | <CMSPlugin: 454> |
placeholder | <Placeholder: content> |
plugin | Estadistica Plugin |
self | <cms.plugin_rendering.ContentRenderer object at 0x7fd2180e8550> |
/var/www/clarinete/estadistica_cms_integration/cms_plugins.py
in render
else:
messages.error(request, 'El código de acceso no es válido, contacte con el administrador.')
if orden == 1:
items = Partitura.objects.all().order_by("autor__nombre")
elif orden==2:
unsorted_results = Partitura.objects.all()
items = sorted(unsorted_results, key= lambda t: NuevoOrden(t))...
else:
items = Partitura.objects.all().order_by("obra")
if todos==0:
paginator = Paginator(items, 10)
else:
Variable | Value |
---|---|
context | [{'None': None, 'True': True, 'False': False}, {'csrf_token': <SimpleLazyObject: <function csrf.<locals>._get_val at 0x7fd217f2e7b8>>, 'lang': 'es', 'True': True, 'None': None, 'STATIC_URL': '/static/', 'SEKIZAI_CONTENT_HOLDER': defaultdict(<class 'sekizai.data.UniqueSequence'>, {}), 'cms_version': '3.4.5', 'CMS_TEMPLATE': <function cms_settings.<locals>.<lambda> at 0x7fd217f450d0>, 'request': <WSGIRequest: GET '/es/sobreagudas/?page=1&orden=2&todos=1'>, 'django_version': '1.10.8', 'False': False, 'messages': <django.contrib.messages.storage.fallback.FallbackStorage object at 0x7fd217f406d8>, 'python_version': '3.5.3', 'cms_menu_renderer': <django.utils.functional.lazy.<locals>.__proxy__ object at 0x7fd2180e8ba8>, 'user': <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fd2180f8be0>>, 'LANGUAGE_BIDI': False, 'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x7fd2180ea860>, 'current_page': <cms.models.pagemodel.Page object at 0x7fd217f4e860>, 'DEFAULT_MESSAGE_LEVELS': {'WARNING': 30, 'SUCCESS': 25, 'INFO': 20, 'ERROR': 40, 'DEBUG': 10}, 'LANGUAGES': (('es', 'es'),), 'cms_edit_off': 'edit_off', 'cms_edit_on': 'edit', 'MEDIA_URL': '/media/', 'cms_content_renderer': <cms.plugin_rendering.ContentRenderer object at 0x7fd2180e8550>, 'has_change_permissions': False, 'CMS_MEDIA_URL': '/media/cms/', 'LANGUAGE_CODE': 'es', 'TIME_ZONE': 'UTC', 'has_view_permissions': True, 'width': 940, 'block': <Block Node: content. Contents: [<TextNode: '\n <div class="containe'>, <WithNode>, <TextNode: '\n </div>\n'>]>}, {'plugin': {'instance': <CMSPlugin: 454>, 'id_attr': 'plugin_12_454', 'revcounter': 1, 'last': True, 'counter': 2, 'revcounter0': 0, 'total': 2, 'first': False, 'counter0': 1}}] |
instance | <CMSPlugin: 454> |
orden | 2 |
pagina | '1' |
placeholder | 'content' |
request | <WSGIRequest: GET '/es/sobreagudas/?page=1&orden=2&todos=1'> |
self | Estadistica Plugin |
todos | 1 |
unsorted_results | <QuerySet [<Partitura: Gran Concierto, Si♭ Mayor>, <Partitura: Concierto, n.º 1, Op. 1>, <Partitura: Concierto, Si♭ Mayor>, <Partitura: Concierto, n.º 1, Mi♭ Mayor>, <Partitura: Concierto, n.º 2, Si♭ Mayor>, <Partitura: Concierto, n.º 3, Si♭ Mayor>, <Partitura: Concierto, Si♭ Mayor>, <Partitura: Concierto, Mi♭ Mayor>, <Partitura: Concierto, n.º 1, Si♭ Mayor>, <Partitura: Concierto, n.º 2, Si♭ Mayor>, <Partitura: Concierto, n.º 3, Si♭ Mayor>, <Partitura: Concierto, n.º 4, Mi♭ Mayor>, <Partitura: Concierto, Si♭ Mayor>, <Partitura: Concierto, Si♭ Mayor (Vi Ø solo)>, <Partitura: Concierto, Si♭ Mayor (de Ø solo)>, <Partitura: Concierto, Si♭ Mayor>, <Partitura: Concertón>, <Partitura: Concierto, Si♭ Mayor, Op. 1>, <Partitura: Concierto, n.º 1, Si♭ Mayor>, <Partitura: Concierto, n.º 2, Si♭ Mayor>, '...(remaining elements truncated)...']> |
/var/www/clarinete/estadistica_cms_integration/cms_plugins.py
in <lambda>
else:
messages.error(request, 'El código de acceso no es válido, contacte con el administrador.')
if orden == 1:
items = Partitura.objects.all().order_by("autor__nombre")
elif orden==2:
unsorted_results = Partitura.objects.all()
items = sorted(unsorted_results, key= lambda t: NuevoOrden(t))...
else:
items = Partitura.objects.all().order_by("obra")
if todos==0:
paginator = Paginator(items, 10)
else:
Variable | Value |
---|---|
t | <Partitura: Concierto, Mi♭ Mayor> |
/var/www/clarinete/estadistica_cms_integration/cms_plugins.py
in NuevoOrden
from estadistica.models import Grafica
from estadistica.management.commands.guardaimagen import Enviar
def NuevoOrden(partitura):
la_nota = partitura.notamasalta
total = 0
diccionarioNotas = {"Do":1,"Re":2,"Mi":3,"Fa":4,"Sol":5,"La":6,"Si":7}
octava= int(la_nota[-1])*1000...
la_nota = la_nota[:-1]
extra=0
if la_nota.find("b")>0:
extra = -10
la_nota = la_nota.replace("b","")
if la_nota.find("#")>0:
Variable | Value |
---|---|
diccionarioNotas | {'Do': 1, 'Fa': 4, 'La': 6, 'Mi': 3, 'Re': 2, 'Si': 7, 'Sol': 5} |
la_nota | '*' |
partitura | <Partitura: Concierto, Mi♭ Mayor> |
total | 0 |
AnonymousUser
Variable | Value |
---|---|
orden | '2' |
todos | '1' |
page | '1' |
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
CONTEXT_DOCUMENT_ROOT | '/var/www/html' |
CONTEXT_PREFIX | '' |
DOCUMENT_ROOT | '/var/www/html' |
GATEWAY_INTERFACE | 'CGI/1.1' |
HTTP_ACCEPT | '*/*' |
HTTP_HOST | 'rafalopezclarinete.com' |
HTTP_USER_AGENT | 'claudebot' |
PATH_INFO | '/es/sobreagudas/' |
PATH_TRANSLATED | '/var/www/clarinete/clarinete/wsgi.py/es/sobreagudas/' |
QUERY_STRING | 'page=1&orden=2&todos=1' |
REMOTE_ADDR | '3.219.167.163' |
REMOTE_PORT | '35804' |
REQUEST_METHOD | 'GET' |
REQUEST_SCHEME | 'http' |
REQUEST_URI | '/es/sobreagudas/?page=1&orden=2&todos=1' |
SCRIPT_FILENAME | '/var/www/clarinete/clarinete/wsgi.py' |
SCRIPT_NAME | '' |
SERVER_ADDR | '209.250.254.199' |
SERVER_ADMIN | 'webmaster@localhost' |
SERVER_NAME | 'rafalopezclarinete.com' |
SERVER_PORT | '80' |
SERVER_PROTOCOL | 'HTTP/1.1' |
SERVER_SIGNATURE | ('<address>Apache/2.4.25 (Debian) Server at rafalopezclarinete.com Port ' '80</address>\n') |
SERVER_SOFTWARE | 'Apache/2.4.25 (Debian)' |
apache.version | (2, 4, 25) |
mod_wsgi.application_group | 'rafalopezclarinete.com|' |
mod_wsgi.callable_object | 'application' |
mod_wsgi.connection_id | 'PrHoIWuP5Ts' |
mod_wsgi.enable_sendfile | '0' |
mod_wsgi.handler_script | '' |
mod_wsgi.ignore_activity | '0' |
mod_wsgi.listener_host | '' |
mod_wsgi.listener_port | '80' |
mod_wsgi.path_info | '/es/sobreagudas/' |
mod_wsgi.process_group | '' |
mod_wsgi.request_handler | 'wsgi-script' |
mod_wsgi.request_id | '+Wz5IWuP5Ts' |
mod_wsgi.request_start | '1711712541175033' |
mod_wsgi.script_name | '' |
mod_wsgi.script_reloading | '1' |
mod_wsgi.script_start | '1711712541175403' |
mod_wsgi.thread_id | 0 |
mod_wsgi.thread_requests | 15 |
mod_wsgi.total_requests | 15 |
mod_wsgi.version | (4, 5, 11) |
wsgi.errors | <_io.TextIOWrapper encoding='utf-8'> |
wsgi.file_wrapper | '' |
wsgi.input | <mod_wsgi.Input object at 0x7fd217ff69d0> |
wsgi.multiprocess | True |
wsgi.multithread | False |
wsgi.run_once | False |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
clarinete.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ACCOUNT_EMAIL_VERIFICATION | 'none' |
ADMINS | [] |
ALDRYN_BOOTSTRAP3_GRID_SIZE | 24 |
ALDRYN_BOOTSTRAP3_ICONSETS | (('glyphicons', 'glyphicons', 'Glyphicons'), ('fontawesome', 'fa', 'Fontawesome')) |
ALLOWED_HOSTS | ['127.0.0.1', '*', '45.76.37.133', 'probando.eu'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'auth.User' |
BASE_DIR | '/var/www/clarinete' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CHRONIKER_AUTO_END_STALE_JOBS | True |
CHRONIKER_CHECK_LOCK_FILE | False |
CHRONIKER_EMAIL_HOST_USER | 'rafalopezclarinete@gmail.com' |
CHRONIKER_EMAIL_SENDER | 'www-data@rafalopezclarinete.com' |
CHRONIKER_EMAIL_SUBJECT_ERROR | 'Error: {{ job.name }}' |
CHRONIKER_EMAIL_SUBJECT_SUCCESS | 'Success: {{ job.name }}' |
CHRONIKER_JOB_ERROR_CALLBACK | None |
CHRONIKER_JOB_NK | ('name',) |
CHRONIKER_LOCK_TIMEOUT | 60 |
CHRONIKER_PID_FN | '/tmp/chroniker-cron.pid' |
CHRONIKER_SELECT_FOR_UPDATE | False |
CHRONIKER_STALE_MINUTES | 5 |
CHRONIKER_USE_PID | False |
CMSPLUGIN_FILER_FILE_DEFAULT_STYLE | '' |
CMSPLUGIN_FILER_FILE_STYLE_CHOICES | () |
CMSPLUGIN_FILER_FOLDER_DEFAULT_STYLE | 'list' |
CMSPLUGIN_FILER_FOLDER_STYLE_CHOICES | (('list', <django.utils.functional.lazy.<locals>.__proxy__ object at 0x7fd21e9037b8>), ('slideshow', <django.utils.functional.lazy.<locals>.__proxy__ object at 0x7fd21e903320>)) |
CMSPLUGIN_FILER_IMAGE_DEFAULT_STYLE | '' |
CMSPLUGIN_FILER_IMAGE_STYLE_CHOICES | () |
CMS_LANGUAGES | {1: [{'code': 'es', 'fallbacks': [], 'hide_untranslated': False, 'name': 'es', 'public': True, 'redirect_on_fallback': True}], 'default': {'hide_untranslated': False, 'public': True, 'redirect_on_fallback': True}, <class 'cms.utils.conf.VERIFIED'>: True} |
CMS_PERMISSION | True |
CMS_PLACEHOLDER_CONF | {} |
CMS_TEMPLATES | (('fullwidth.html', 'Fullwidth'), ('sidebar_left.html', 'Sidebar Left'), ('sidebar_right.html', 'Sidebar Right')) |
CRISPY_TEMPLATE_PACK | 'bootstrap3' |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_NAME | 'csrftoken' |
CSRF_COOKIE_PATH | '/' |
CSRF_COOKIE_SECURE | False |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | [] |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.mysql', 'HOST': 'localhost', 'NAME': 'clarinete', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'clarinete'}} |
DATABASE_ROUTERS | [] |
DATA_DIR | '/var/www/clarinete' |
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 |
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 | 'rafalopezclarinete@gmail.com' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | 'smtp.gmail.com' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | 'rafalopezclarinete@gmail.com' |
EMAIL_PORT | 587 |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | True |
FILER_IMAGE_MODEL | 'filer.Image' |
FILE_CHARSET | 'utf-8' |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
FILE_UPLOAD_PERMISSIONS | None |
FILE_UPLOAD_TEMP_DIR | None |
FIRST_DAY_OF_WEEK | 0 |
FIXTURE_DIRS | [] |
FORCE_SCRIPT_NAME | None |
FORMAT_MODULE_PATH | None |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ('djangocms_admin_style', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.sites', 'django.contrib.sitemaps', 'django.contrib.staticfiles', 'django.contrib.messages', 'cms', 'menus', 'sekizai', 'crispy_forms', 'treebeard', 'djangocms_text_ckeditor', 'filer', 'easy_thumbnails', 'fontawesome', 'djangocms_column', 'djangocms_link', 'cmsplugin_filer_file', 'cmsplugin_filer_folder', 'cmsplugin_filer_image', 'cmsplugin_filer_utils', 'djangocms_style', 'djangocms_snippet', 'djangocms_googlemap', 'djangocms_video', 'aldryn_bootstrap3', 'chroniker', 'estadistica', 'estadistica_cms_integration', 'captcha', 'contacto', 'contacto_cms_integration', 'importaciones', 'migoogle') |
INTERNAL_IPS | [] |
LANGUAGES | (('es', 'es'),) |
LANGUAGES_BIDI | ['he', 'ar', 'fa', 'ur'] |
LANGUAGE_CODE | 'es' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_NAME | 'django_language' |
LANGUAGE_COOKIE_PATH | '/' |
LOCALE_PATHS | [] |
LOGGING | {} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGIN_URL | '/accounts/login/' |
LOGOUT_REDIRECT_URL | None |
MANAGERS | [] |
MEDIA_ROOT | '/var/www/clarinete/media/' |
MEDIA_URL | '/media/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MESSAGE_TAGS | {10: 'alert-info', 20: 'alert-info', 25: 'alert-success', 30: 'alert-warning', 40: 'alert-danger'} |
MIDDLEWARE | None |
MIDDLEWARE_CLASSES | ('cms.middleware.utils.ApphookReloadMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'cms.middleware.user.CurrentUserMiddleware', 'cms.middleware.page.CurrentPageMiddleware', 'cms.middleware.toolbar.ToolbarMiddleware', 'cms.middleware.language.LanguageCookieMiddleware') |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
RECAPTCHA_PRIVATE_KEY | '********************' |
RECAPTCHA_PUBLIC_KEY | '********************' |
ROOT_URLCONF | 'clarinete.urls' |
SECRET_KEY | '********************' |
SECURE_BROWSER_XSS_FILTER | False |
SECURE_CONTENT_TYPE_NOSNIFF | False |
SECURE_HSTS_INCLUDE_SUBDOMAINS | 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_SECURE | False |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
SESSION_FILE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | False |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'clarinete.settings' |
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/clarinete/clarinete/static',) |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/var/www/clarinete/static' |
STATIC_URL | '/static/' |
TEMPLATES | [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/var/www/clarinete/clarinete/templates'], 'OPTIONS': {'context_processors': ['django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django.template.context_processors.i18n', 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.template.context_processors.media', 'django.template.context_processors.csrf', 'django.template.context_processors.tz', 'sekizai.context_processors.sekizai', 'django.template.context_processors.static', 'cms.context_processors.cms_settings'], 'debug': True, 'loaders': ['django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', 'django.template.loaders.eggs.Loader']}}] |
TEST_NON_SERIALIZED_APPS | [] |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
THOUSAND_SEPARATOR | ',' |
THUMBNAIL_PROCESSORS | ('easy_thumbnails.processors.colorspace', 'easy_thumbnails.processors.autocrop', 'filer.thumbnail_processors.scale_and_crop_with_subject_location', 'easy_thumbnails.processors.filters') |
TIME_FORMAT | 'P' |
TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
TIME_ZONE | 'UTC' |
USE_ETAGS | False |
USE_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | True |
USE_X_FORWARDED_HOST | False |
USE_X_FORWARDED_PORT | False |
WSGI_APPLICATION | 'clarinete.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.