Invalid filter: 'apply_markup'
Request Method: | GET |
---|---|
Request URL: | https://www.cocoa.fr/bibliotheque/programmation-cocoa-sous-mac-os-x/ |
Django Version: | 1.8.19 |
Exception Type: | TemplateSyntaxError |
Exception Value: | Invalid filter: 'apply_markup' |
Exception Location: | /home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/base.py in find_filter, line 430 |
Python Executable: | /usr/alwaysdata/uwsgi/2.0.23/bin/uwsgi |
Python Version: | 3.9.15 |
Python Path: | ['.', '', '/usr/alwaysdata/python/3.9.15/lib/python39.zip', '/usr/alwaysdata/python/3.9.15/lib/python3.9', '/usr/alwaysdata/python/3.9.15/lib/python3.9/lib-dynload', '/home/benzin/venvs/cocoa/lib/python3.9/site-packages', '/home/benzin/venvs/cocoa/src/textprocessor'] |
Server time: | ven, 29 Mar 2024 06:50:14 +0100 |
In template /home/benzin/cocoa-fr/cocoa/cocoa/templates/book_comments/book_details.html
, error at line 6
1 | {% extends "base.html" %} |
---|---|
2 | {% load i18n text_enhancer %} |
3 | |
4 | {% block "meta_title" %}{{ book.title }} - {{ book.author }}{% endblock %} |
5 | {% block "meta" %} |
6 | <meta name=”description” content=" {{ book.description|apply_markup:"markdown"|striptags|truncatewords:50 }} " /> |
7 | {% endblock %} |
8 | |
9 | {% block content %} |
10 | <!-- Start SC --> |
11 | <div class="SC"> |
12 | |
13 | {% if book %} |
14 | |
15 | <div class="Post" id="book-{{ book.id }}" style="padding-bottom: 20px;"> |
16 | <div class="PostHead"> |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/core/handlers/base.py
in get_response
response = middleware_method(request, response)
# Complain if the template response middleware returned None (a common error).
if response is None:
raise ValueError(
"%s.process_template_response didn't return an "
"HttpResponse object. It returned None instead."
% (middleware_method.__self__.__class__.__name__))
response = response.render()...
except http.Http404 as e:
logger.warning('Not Found: %s', request.path,
extra={
'status_code': 404,
'request': request
Variable | Value |
---|---|
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f87a4816a90> |
request | ('<WSGIRequest\n' 'path:/bibliotheque/programmation-cocoa-sous-mac-os-x/,\n' 'GET:<QueryDict: {}>,\n' 'POST:<QueryDict: {}>,\n' 'COOKIES:{},\n' "META:{'CSRF_COOKIE': 'HNwGcV6DnmNeK90kafSRZ1dgkMZkSBAv',\n" " 'HTTP_ACCEPT': '*/*',\n" " 'HTTP_ACCEPT_ENCODING': 'gzip, br',\n" " 'HTTP_CDN_LOOP': 'cloudflare',\n" " 'HTTP_CF_CONNECTING_IP': '54.160.245.243',\n" " 'HTTP_CF_IPCOUNTRY': 'US',\n" " 'HTTP_CF_RAY': '86bd94ca3c120819-IAD',\n" ' \'HTTP_CF_VISITOR\': \'{"scheme":"https"}\',\n' " 'HTTP_HOST': 'www.cocoa.fr',\n" " 'HTTP_REFERER': " "'http://www.cocoa.fr/bibliotheque/programmation-cocoa-sous-mac-os-x/',\n" " 'HTTP_USER_AGENT': 'claudebot',\n" " 'HTTP_VIA': '2.0 alproxy',\n" " 'HTTP_X_FORWARDED_FOR': '54.160.245.243',\n" " 'HTTP_X_FORWARDED_PROTO': 'https',\n" " 'HTTP_X_REAL_IP': '172.70.39.198',\n" " 'PATH_INFO': '/bibliotheque/programmation-cocoa-sous-mac-os-x/',\n" " 'QUERY_STRING': '',\n" " 'REMOTE_ADDR': '172.70.39.198',\n" " 'REQUEST_METHOD': 'GET',\n" " 'REQUEST_URI': '/bibliotheque/programmation-cocoa-sous-mac-os-x/',\n" " 'SCRIPT_NAME': '',\n" " 'SERVER_NAME': 'http7',\n" " 'SERVER_PORT': '8102',\n" " 'SERVER_PROTOCOL': 'HTTP/1.1',\n" " 'uwsgi.node': b'http7',\n" " 'uwsgi.version': b'2.0.23',\n" " 'wsgi.errors': <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'>,\n" " 'wsgi.input': <uwsgi._Input object at 0x7f87a4ef4cf0>,\n" " 'wsgi.multiprocess': True,\n" " 'wsgi.multithread': False,\n" " 'wsgi.run_once': False,\n" " 'wsgi.url_scheme': 'https',\n" " 'wsgi.version': (1, 0)}>") |
urlconf | 'cocoa.urls' |
resolver | <RegexURLResolver 'cocoa.urls' (None:None) ^/> |
response | <django.template.response.TemplateResponse object at 0x7f87a44e5ac0> |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f87a47bc760>> |
resolver_match | ResolverMatch(func=book_comments.views.BookDetailView, args=(), kwargs={'slug': 'programmation-cocoa-sous-mac-os-x'}, url_name=books-details, app_name=None, namespaces=[]) |
callback | <function BookDetailView at 0x7f87a477d160> |
callback_args | () |
callback_kwargs | {'slug': 'programmation-cocoa-sous-mac-os-x'} |
wrapped_callback | <function BookDetailView at 0x7f87a477d160> |
/home/benzin/venvs/cocoa/lib/python3.9/site-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 |
---|---|
self | <django.template.response.TemplateResponse object at 0x7f87a44e5ac0> |
retval | <django.template.response.TemplateResponse object at 0x7f87a44e5ac0> |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/response.py
in rendered_content
"""Returns the freshly rendered content for the template and context
described by the TemplateResponse.
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.
Variable | Value |
---|---|
self | <django.template.response.TemplateResponse object at 0x7f87a44e5ac0> |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/response.py
in _resolve_template
else:
return template
def _resolve_template(self, template):
# This wrapper deprecates returning a django.template.Template in
# subclasses that override resolve_template. It can be removed in
# Django 1.10.
new_template = self.resolve_template(template)...
if isinstance(new_template, Template):
warnings.warn(
"{}.resolve_template() must return a backend-specific "
"template like those created by get_template(), not a "
"{}.".format(
self.__class__.__name__, new_template.__class__.__name__),
Variable | Value |
---|---|
self | <django.template.response.TemplateResponse object at 0x7f87a44e5ac0> |
template | ['book_comments/book_details.html'] |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/response.py
in resolve_template
del obj_dict[attr]
return obj_dict
def resolve_template(self, template):
"Accepts a template object, path-to-template or list of paths"
if isinstance(template, (list, tuple)):
return loader.select_template(template, using=self.using)...
elif isinstance(template, six.string_types):
return loader.get_template(template, using=self.using)
else:
return template
def _resolve_template(self, template):
Variable | Value |
---|---|
self | <django.template.response.TemplateResponse object at 0x7f87a44e5ac0> |
template | ['book_comments/book_details.html'] |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/loader.py
in select_template
engines = _engine_list(using)
for template_name in template_name_list:
for engine in engines:
try:
# This is required for deprecating the dirs argument. Simply
# use engine.get_template(template_name) in Django 1.10.
if isinstance(engine, DjangoTemplates):
return engine.get_template(template_name, dirs)...
elif dirs is not _dirs_undefined:
warnings.warn(
"Skipping template backend %s because its get_template "
"method doesn't support the dirs argument." % engine.name,
stacklevel=2)
else:
Variable | Value |
---|---|
template_name_list | ['book_comments/book_details.html'] |
dirs | <object object at 0x7f87a55de780> |
using | None |
engines | [<django.template.backends.django.DjangoTemplates object at 0x7f87a4760460>] |
template_name | 'book_comments/book_details.html' |
engine | <django.template.backends.django.DjangoTemplates object at 0x7f87a4760460> |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/backends/django.py
in get_template
super(DjangoTemplates, self).__init__(params)
self.engine = Engine(self.dirs, self.app_dirs, **options)
def from_string(self, template_code):
return Template(self.engine.from_string(template_code))
def get_template(self, template_name, dirs=_dirs_undefined):
return Template(self.engine.get_template(template_name, dirs))...
class Template(object):
def __init__(self, template):
self.template = template
Variable | Value |
---|---|
self | <django.template.backends.django.DjangoTemplates object at 0x7f87a4760460> |
template_name | 'book_comments/book_details.html' |
dirs | <object object at 0x7f87a55de780> |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/engine.py
in get_template
if dirs is _dirs_undefined:
dirs = None
else:
warnings.warn(
"The dirs argument of get_template is deprecated.",
RemovedInDjango110Warning, stacklevel=2)
template, origin = self.find_template(template_name, dirs)...
if not hasattr(template, 'render'):
# template needs to be compiled
template = Template(template, origin, template_name, engine=self)
return template
# This method was originally a function defined in django.template.loader.
Variable | Value |
---|---|
self | <django.template.engine.Engine object at 0x7f87a4760670> |
template_name | 'book_comments/book_details.html' |
dirs | None |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/engine.py
in find_template
else:
raise ImproperlyConfigured(
"Invalid value in template loaders configuration: %r" % loader)
def find_template(self, name, dirs=None):
for loader in self.template_loaders:
try:
source, display_name = loader(name, dirs)...
origin = self.make_origin(display_name, loader, name, dirs)
return source, origin
except TemplateDoesNotExist:
pass
raise TemplateDoesNotExist(name)
Variable | Value |
---|---|
self | <django.template.engine.Engine object at 0x7f87a4760670> |
name | 'book_comments/book_details.html' |
dirs | None |
loader | <django.template.loaders.filesystem.Loader object at 0x7f87a473b490> |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/loaders/base.py
in __call__
# Only used to raise a deprecation warning. Remove in Django 1.10.
_accepts_engine_in_init = True
def __init__(self, engine):
self.engine = engine
def __call__(self, template_name, template_dirs=None):
return self.load_template(template_name, template_dirs)...
def load_template(self, template_name, template_dirs=None):
source, display_name = self.load_template_source(
template_name, template_dirs)
origin = self.engine.make_origin(
display_name, self.load_template_source,
Variable | Value |
---|---|
self | <django.template.loaders.filesystem.Loader object at 0x7f87a473b490> |
template_name | 'book_comments/book_details.html' |
template_dirs | None |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/loaders/base.py
in load_template
source, display_name = self.load_template_source(
template_name, template_dirs)
origin = self.engine.make_origin(
display_name, self.load_template_source,
template_name, template_dirs)
try:
template = Template(source, origin, template_name, self.engine)...
except TemplateDoesNotExist:
# If compiling the template we found raises TemplateDoesNotExist,
# back off to returning the source and display name for the
# template we were asked to load. This allows for correct
# identification of the actual template that does not exist.
return source, display_name
Variable | Value |
---|---|
self | <django.template.loaders.filesystem.Loader object at 0x7f87a473b490> |
template_name | 'book_comments/book_details.html' |
template_dirs | None |
source | ('{% extends "base.html" %}\n' '{% load i18n text_enhancer %}\n' '\n' '{% block "meta_title" %}{{ book.title }} - {{ book.author }}{% endblock %}\n' '{% block "meta" %}\n' '<meta name=”description” content="{{ ' 'book.description|apply_markup:"markdown"|striptags|truncatewords:50 }}" />\n' '{% endblock %}\n' '\n' '{% block content %}\n' '<!-- Start SC -->\n' '<div class="SC">\n' '\n' '{% if book %}\n' '\n' '<div class="Post" id="book-{{ book.id }}" style="padding-bottom: 20px;">\n' '<div class="PostHead">\n' '<h2><a href="{{ book.get_absolute_url }}" rel="bookmark" title="Permanent ' 'Link to {{ book.title }}">{{ book.title }}</a></h2>\n' '<small class="PostTime">\n' '<strong class="day">{% if book.stars %}{{ book.stars }}{% else %}-{% endif ' '%}</strong>\n' '<strong class="month"> </strong>\n' '<strong class="year">+-</strong>\n' '</small>\n' '<small class="PostAuthor">\n' '\t{% trans "Author" %}: {{ book.author }}\n' '\t(<a href="http://www.amazon.fr/gp/search?ie=UTF8&keywords={{ ' 'book.author|escape ' '}}&tag=simplercode-21&index=blended&linkCode=ur2&camp=1642&creative=6746">{% ' 'trans "Search on Amazon.fr" %}</a>)\n' '</small>\n' '</div>\n' ' \n' '<div class="PostContent">\n' '<img style="border: 0; float: right;" src="{{ book.cover.url }}" alt="{{ ' 'book.title }} - {{ book.author }}" title="{{ book.title }} - {{ book.author ' '}}" />\n' '{{ book.description|apply_markup:"markdown" }}\n' '\n' '<p>\n' '\t{% trans "Acheter" %}\n' '\t<a href="{{ book.amazon_link }}">{{ book.title }} {% trans "de" %} {{ ' 'book.author }}</a>\n' '\t{% trans "sur Amazon" %}\n' '</p>\n' '</div>\n' '</div>\n' '\n' '\n' '{% else %}\n' '\n' '<p>Sorry, no book matched your criteria.</p>\n' '\n' '{% endif %}\n' '\n' '</div>\n' '<!-- End SC -->\n' '{% endblock %}\n') |
display_name | '/home/benzin/cocoa-fr/cocoa/cocoa/templates/book_comments/book_details.html' |
origin | <django.template.loader.LoaderOrigin object at 0x7f87a45a7040> |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/base.py
in __init__
# This is required to preserve backwards-compatibility for direct use
# e.g. Template('...').render(Context({...}))
if engine is None:
from .engine import Engine
engine = Engine.get_default()
if engine.debug and origin is None:
origin = StringOrigin(template_string)
self.nodelist = engine.compile_string(template_string, origin)...
self.name = name
self.origin = origin
self.engine = engine
def __iter__(self):
for node in self.nodelist:
Variable | Value |
---|---|
self | <django.template.base.Template object at 0x7f87a45a75e0> |
template_string | ('{% extends "base.html" %}\n' '{% load i18n text_enhancer %}\n' '\n' '{% block "meta_title" %}{{ book.title }} - {{ book.author }}{% endblock %}\n' '{% block "meta" %}\n' '<meta name=”description” content="{{ ' 'book.description|apply_markup:"markdown"|striptags|truncatewords:50 }}" />\n' '{% endblock %}\n' '\n' '{% block content %}\n' '<!-- Start SC -->\n' '<div class="SC">\n' '\n' '{% if book %}\n' '\n' '<div class="Post" id="book-{{ book.id }}" style="padding-bottom: 20px;">\n' '<div class="PostHead">\n' '<h2><a href="{{ book.get_absolute_url }}" rel="bookmark" title="Permanent ' 'Link to {{ book.title }}">{{ book.title }}</a></h2>\n' '<small class="PostTime">\n' '<strong class="day">{% if book.stars %}{{ book.stars }}{% else %}-{% endif ' '%}</strong>\n' '<strong class="month"> </strong>\n' '<strong class="year">+-</strong>\n' '</small>\n' '<small class="PostAuthor">\n' '\t{% trans "Author" %}: {{ book.author }}\n' '\t(<a href="http://www.amazon.fr/gp/search?ie=UTF8&keywords={{ ' 'book.author|escape ' '}}&tag=simplercode-21&index=blended&linkCode=ur2&camp=1642&creative=6746">{% ' 'trans "Search on Amazon.fr" %}</a>)\n' '</small>\n' '</div>\n' ' \n' '<div class="PostContent">\n' '<img style="border: 0; float: right;" src="{{ book.cover.url }}" alt="{{ ' 'book.title }} - {{ book.author }}" title="{{ book.title }} - {{ book.author ' '}}" />\n' '{{ book.description|apply_markup:"markdown" }}\n' '\n' '<p>\n' '\t{% trans "Acheter" %}\n' '\t<a href="{{ book.amazon_link }}">{{ book.title }} {% trans "de" %} {{ ' 'book.author }}</a>\n' '\t{% trans "sur Amazon" %}\n' '</p>\n' '</div>\n' '</div>\n' '\n' '\n' '{% else %}\n' '\n' '<p>Sorry, no book matched your criteria.</p>\n' '\n' '{% endif %}\n' '\n' '</div>\n' '<!-- End SC -->\n' '{% endblock %}\n') |
origin | <django.template.loader.LoaderOrigin object at 0x7f87a45a7040> |
name | 'book_comments/book_details.html' |
engine | <django.template.engine.Engine object at 0x7f87a4760670> |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/engine.py
in compile_string
from .debug import DebugLexer, DebugParser
lexer_class, parser_class = DebugLexer, DebugParser
else:
lexer_class, parser_class = Lexer, Parser
lexer = lexer_class(template_string, origin)
tokens = lexer.tokenize()
parser = parser_class(tokens)
return parser.parse()...
def make_origin(self, display_name, loader, name, dirs):
if self.debug and display_name:
# Inner import to avoid circular dependency
from .loader import LoaderOrigin
return LoaderOrigin(display_name, loader, name, dirs)
Variable | Value |
---|---|
self | <django.template.engine.Engine object at 0x7f87a4760670> |
template_string | ('{% extends "base.html" %}\n' '{% load i18n text_enhancer %}\n' '\n' '{% block "meta_title" %}{{ book.title }} - {{ book.author }}{% endblock %}\n' '{% block "meta" %}\n' '<meta name=”description” content="{{ ' 'book.description|apply_markup:"markdown"|striptags|truncatewords:50 }}" />\n' '{% endblock %}\n' '\n' '{% block content %}\n' '<!-- Start SC -->\n' '<div class="SC">\n' '\n' '{% if book %}\n' '\n' '<div class="Post" id="book-{{ book.id }}" style="padding-bottom: 20px;">\n' '<div class="PostHead">\n' '<h2><a href="{{ book.get_absolute_url }}" rel="bookmark" title="Permanent ' 'Link to {{ book.title }}">{{ book.title }}</a></h2>\n' '<small class="PostTime">\n' '<strong class="day">{% if book.stars %}{{ book.stars }}{% else %}-{% endif ' '%}</strong>\n' '<strong class="month"> </strong>\n' '<strong class="year">+-</strong>\n' '</small>\n' '<small class="PostAuthor">\n' '\t{% trans "Author" %}: {{ book.author }}\n' '\t(<a href="http://www.amazon.fr/gp/search?ie=UTF8&keywords={{ ' 'book.author|escape ' '}}&tag=simplercode-21&index=blended&linkCode=ur2&camp=1642&creative=6746">{% ' 'trans "Search on Amazon.fr" %}</a>)\n' '</small>\n' '</div>\n' ' \n' '<div class="PostContent">\n' '<img style="border: 0; float: right;" src="{{ book.cover.url }}" alt="{{ ' 'book.title }} - {{ book.author }}" title="{{ book.title }} - {{ book.author ' '}}" />\n' '{{ book.description|apply_markup:"markdown" }}\n' '\n' '<p>\n' '\t{% trans "Acheter" %}\n' '\t<a href="{{ book.amazon_link }}">{{ book.title }} {% trans "de" %} {{ ' 'book.author }}</a>\n' '\t{% trans "sur Amazon" %}\n' '</p>\n' '</div>\n' '</div>\n' '\n' '\n' '{% else %}\n' '\n' '<p>Sorry, no book matched your criteria.</p>\n' '\n' '{% endif %}\n' '\n' '</div>\n' '<!-- End SC -->\n' '{% endblock %}\n') |
origin | <django.template.loader.LoaderOrigin object at 0x7f87a45a7040> |
DebugLexer | <class 'django.template.debug.DebugLexer'> |
DebugParser | <class 'django.template.debug.DebugParser'> |
lexer_class | <class 'django.template.debug.DebugLexer'> |
parser_class | <class 'django.template.debug.DebugParser'> |
lexer | <django.template.debug.DebugLexer object at 0x7f87a45a7790> |
tokens | [<django.template.base.Token object at 0x7f87a44f08e0>, <django.template.base.Token object at 0x7f87a44f0160>, <django.template.base.Token object at 0x7f87a44f0ca0>, <django.template.base.Token object at 0x7f87a44f0250>, <django.template.base.Token object at 0x7f87a44f0ac0>, <django.template.base.Token object at 0x7f87a44f0700>, <django.template.base.Token object at 0x7f87a453d040>, <django.template.base.Token object at 0x7f87a453dee0>, <django.template.base.Token object at 0x7f87a453d160>, <django.template.base.Token object at 0x7f87a453deb0>, <django.template.base.Token object at 0x7f87a453dfd0>, <django.template.base.Token object at 0x7f87a453dc10>, <django.template.base.Token object at 0x7f87a453dbb0>, <django.template.base.Token object at 0x7f87a453df40>, <django.template.base.Token object at 0x7f87a4546ac0>, <django.template.base.Token object at 0x7f87a4546130>, <django.template.base.Token object at 0x7f87a4546ca0>, <django.template.base.Token object at 0x7f87a45462e0>, <django.template.base.Token object at 0x7f87a4546640>, <django.template.base.Token object at 0x7f87a4546400>, <django.template.base.Token object at 0x7f87a4546790>, <django.template.base.Token object at 0x7f87a4669400>, <django.template.base.Token object at 0x7f87a4669850>, <django.template.base.Token object at 0x7f87a46695b0>, <django.template.base.Token object at 0x7f87a4669220>, <django.template.base.Token object at 0x7f87a4669190>, <django.template.base.Token object at 0x7f87a4669d90>, <django.template.base.Token object at 0x7f87a46693d0>, <django.template.base.Token object at 0x7f87a4669370>, <django.template.base.Token object at 0x7f87a4669580>, <django.template.base.Token object at 0x7f87a4669340>, <django.template.base.Token object at 0x7f87a4669e20>, <django.template.base.Token object at 0x7f87a4669a60>, <django.template.base.Token object at 0x7f87a46696d0>, <django.template.base.Token object at 0x7f87a4669670>, <django.template.base.Token object at 0x7f87a4669040>, <django.template.base.Token object at 0x7f87a46694f0>, <django.template.base.Token object at 0x7f87a4669a00>, <django.template.base.Token object at 0x7f87a4669d00>, <django.template.base.Token object at 0x7f87a4669df0>, <django.template.base.Token object at 0x7f87a46691f0>, <django.template.base.Token object at 0x7f87a46695e0>, <django.template.base.Token object at 0x7f87a4669cd0>, <django.template.base.Token object at 0x7f87a4669e80>, <django.template.base.Token object at 0x7f87a4669ac0>, <django.template.base.Token object at 0x7f87a46694c0>, <django.template.base.Token object at 0x7f87a4669be0>, <django.template.base.Token object at 0x7f87a4669d30>, <django.template.base.Token object at 0x7f87a4669a90>, <django.template.base.Token object at 0x7f87a4669880>, <django.template.base.Token object at 0x7f87a4669730>, <django.template.base.Token object at 0x7f87a46692b0>, <django.template.base.Token object at 0x7f87a46693a0>, <django.template.base.Token object at 0x7f87a4669c10>, <django.template.base.Token object at 0x7f87a45b22b0>, <django.template.base.Token object at 0x7f87a45b21c0>, <django.template.base.Token object at 0x7f87a45b2d60>, <django.template.base.Token object at 0x7f87a45b2f70>, <django.template.base.Token object at 0x7f87a45a7dc0>] |
parser | <django.template.debug.DebugParser object at 0x7f87a45b2370> |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/base.py
in parse
# resulting node
self.enter_command(command, token)
try:
compile_func = self.tags[command]
except KeyError:
self.invalid_block_tag(token, command, parse_until)
try:
compiled_result = compile_func(self, token)...
except TemplateSyntaxError as e:
if not self.compile_function_error(token, e):
raise
self.extend_nodelist(nodelist, compiled_result, token)
self.exit_command()
if parse_until:
Variable | Value |
---|---|
self | <django.template.debug.DebugParser object at 0x7f87a45b2370> |
parse_until | [] |
nodelist | [] |
token | <django.template.base.Token object at 0x7f87a45a7f70> |
command | 'extends' |
compile_func | <function do_extends at 0x7f87a52ae670> |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/loader_tags.py
in do_extends
name of the parent template to extend (if it evaluates to a string) or as
the parent template itself (if it evaluates to a Template object).
"""
bits = token.split_contents()
if len(bits) != 2:
raise TemplateSyntaxError("'%s' takes one argument" % bits[0])
parent_name = parser.compile_filter(bits[1])
nodelist = parser.parse()...
if nodelist.get_nodes_by_type(ExtendsNode):
raise TemplateSyntaxError("'%s' cannot appear more than once in the same template" % bits[0])
return ExtendsNode(nodelist, parent_name)
@register.tag('include')
Variable | Value |
---|---|
parser | <django.template.debug.DebugParser object at 0x7f87a45b2370> |
token | <django.template.base.Token object at 0x7f87a45a7f70> |
bits | ['extends', '"base.html"'] |
parent_name | <django.template.base.FilterExpression object at 0x7f87a45b2fd0> |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/base.py
in parse
# resulting node
self.enter_command(command, token)
try:
compile_func = self.tags[command]
except KeyError:
self.invalid_block_tag(token, command, parse_until)
try:
compiled_result = compile_func(self, token)...
except TemplateSyntaxError as e:
if not self.compile_function_error(token, e):
raise
self.extend_nodelist(nodelist, compiled_result, token)
self.exit_command()
if parse_until:
Variable | Value |
---|---|
self | <django.template.debug.DebugParser object at 0x7f87a45b2370> |
parse_until | [] |
nodelist | [<Text Node: ' '>, <django.template.defaulttags.LoadNode object at 0x7f87a45a7c40>, <Text Node: ' '>, <Block Node: "meta_title". Contents: [<Variable Node: book.title>, <Text Node: ' - '>, <Variable Node: book.author>]>, <Text Node: ' '>] |
token | <django.template.base.Token object at 0x7f87a44f0e80> |
command | 'block' |
compile_func | <function do_block at 0x7f87a52ae5e0> |
compiled_result | <Block Node: "meta_title". Contents: [<Variable Node: book.title>, <Text Node: ' - '>, <Variable Node: book.author>]> |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/loader_tags.py
in do_block
# check for duplication.
try:
if block_name in parser.__loaded_blocks:
raise TemplateSyntaxError("'%s' tag with name '%s' appears more than once" % (bits[0], block_name))
parser.__loaded_blocks.append(block_name)
except AttributeError: # parser.__loaded_blocks isn't a list yet
parser.__loaded_blocks = [block_name]
nodelist = parser.parse(('endblock',))...
# This check is kept for backwards-compatibility. See #3100.
endblock = parser.next_token()
acceptable_endblocks = ('endblock', 'endblock %s' % block_name)
if endblock.contents not in acceptable_endblocks:
parser.invalid_block_tag(endblock, 'endblock', acceptable_endblocks)
Variable | Value |
---|---|
parser | <django.template.debug.DebugParser object at 0x7f87a45b2370> |
token | <django.template.base.Token object at 0x7f87a44f0e80> |
bits | ['block', '"meta"'] |
block_name | '"meta"' |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/base.py
in parse
# Use the raw values here for TOKEN_* for a tiny performance boost.
if token.token_type == 0: # TOKEN_TEXT
self.extend_nodelist(nodelist, TextNode(token.contents), token)
elif token.token_type == 1: # TOKEN_VAR
if not token.contents:
self.empty_variable(token)
try:
filter_expression = self.compile_filter(token.contents)...
except TemplateSyntaxError as e:
if not self.compile_filter_error(token, e):
raise
var_node = self.create_variable_node(filter_expression)
self.extend_nodelist(nodelist, var_node, token)
elif token.token_type == 2: # TOKEN_BLOCK
Variable | Value |
---|---|
self | <django.template.debug.DebugParser object at 0x7f87a45b2370> |
parse_until | ('endblock',) |
nodelist | [<Text Node: ' <meta name=”description”'>] |
token | <django.template.base.Token object at 0x7f87a44f0880> |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/base.py
in compile_filter
self.tags.update(lib.tags)
self.filters.update(lib.filters)
def compile_filter(self, token):
"""
Convenient wrapper for FilterExpression
"""
return FilterExpression(token, self)...
def find_filter(self, filter_name):
if filter_name in self.filters:
return self.filters[filter_name]
else:
raise TemplateSyntaxError("Invalid filter: '%s'" % filter_name)
Variable | Value |
---|---|
self | <django.template.debug.DebugParser object at 0x7f87a45b2370> |
token | 'book.description|apply_markup:"markdown"|striptags|truncatewords:50' |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/base.py
in __init__
filter_name = match.group("filter_name")
args = []
constant_arg, var_arg = match.group("constant_arg", "var_arg")
if constant_arg:
args.append((False, Variable(constant_arg).resolve({})))
elif var_arg:
args.append((True, Variable(var_arg)))
filter_func = parser.find_filter(filter_name)...
self.args_check(filter_name, filter_func, args)
filters.append((filter_func, args))
upto = match.end()
if upto != len(token):
raise TemplateSyntaxError("Could not parse the remainder: '%s' "
"from '%s'" % (token[upto:], token))
Variable | Value |
---|---|
self | <django.template.base.FilterExpression object at 0x7f87a44f0100> |
token | 'book.description|apply_markup:"markdown"|striptags|truncatewords:50' |
parser | <django.template.debug.DebugParser object at 0x7f87a45b2370> |
matches | <callable_iterator object at 0x7f87a44e8640> |
var_obj | <Variable: 'book.description'> |
filters | [] |
upto | 16 |
match | <re.Match object; span=(16, 40), match='|apply_markup:"markdown"'> |
start | 16 |
var | 'book.description' |
constant | None |
filter_name | 'apply_markup' |
args | [(False, 'markdown')] |
constant_arg | '"markdown"' |
var_arg | None |
/home/benzin/venvs/cocoa/lib/python3.9/site-packages/django/template/base.py
in find_filter
"""
return FilterExpression(token, self)
def find_filter(self, filter_name):
if filter_name in self.filters:
return self.filters[filter_name]
else:
raise TemplateSyntaxError("Invalid filter: '%s'" % filter_name)...
class TokenParser(object):
"""
Subclass this and implement the top() method to parse a template line.
When instantiating the parser, pass in the line from the Django template
Variable | Value |
---|---|
self | <django.template.debug.DebugParser object at 0x7f87a45b2370> |
filter_name | 'apply_markup' |
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
REQUEST_METHOD | 'GET' |
REQUEST_URI | '/bibliotheque/programmation-cocoa-sous-mac-os-x/' |
PATH_INFO | '/bibliotheque/programmation-cocoa-sous-mac-os-x/' |
QUERY_STRING | '' |
SERVER_PROTOCOL | 'HTTP/1.1' |
SCRIPT_NAME | '' |
SERVER_NAME | 'http7' |
SERVER_PORT | '8102' |
REMOTE_ADDR | '172.70.39.198' |
HTTP_HOST | 'www.cocoa.fr' |
HTTP_CDN_LOOP | 'cloudflare' |
HTTP_CF_IPCOUNTRY | 'US' |
HTTP_ACCEPT_ENCODING | 'gzip, br' |
HTTP_X_FORWARDED_FOR | '54.160.245.243' |
HTTP_CF_RAY | '86bd94ca3c120819-IAD' |
HTTP_CF_VISITOR | '{"scheme":"https"}' |
HTTP_ACCEPT | '*/*' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_REFERER | 'http://www.cocoa.fr/bibliotheque/programmation-cocoa-sous-mac-os-x/' |
HTTP_CF_CONNECTING_IP | '54.160.245.243' |
HTTP_X_REAL_IP | '172.70.39.198' |
HTTP_VIA | '2.0 alproxy' |
HTTP_X_FORWARDED_PROTO | 'https' |
wsgi.input | <uwsgi._Input object at 0x7f87a4ef4cf0> |
wsgi.version | (1, 0) |
wsgi.errors | <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'> |
wsgi.run_once | False |
wsgi.multithread | False |
wsgi.multiprocess | True |
wsgi.url_scheme | 'https' |
uwsgi.version | b'2.0.23' |
uwsgi.node | b'http7' |
CSRF_COOKIE | 'HNwGcV6DnmNeK90kafSRZ1dgkMZkSBAv' |
cocoa.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | () |
ALLOWED_HOSTS | ['www.cocoa.fr', 'cocoa.fr'] |
ALLOWED_INCLUDE_ROOTS | () |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ('django.contrib.auth.backends.ModelBackend',) |
AUTH_USER_MODEL | 'auth.User' |
BASE_DIR | '/home/benzin/cocoa-fr/cocoa/.' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
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' |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.mysql', 'HOST': 'mysql-benzin.alwaysdata.net', 'NAME': 'benzin_cocoa_fr', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': 'UTC', 'USER': 'benzin'}} |
DATABASE_ROUTERS | [] |
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 | '[email protected]' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | () |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | 'localhost' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | '' |
EMAIL_PORT | 25 |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | False |
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 | ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'django.contrib.sitemaps', 'django.contrib.redirects', 'django.contrib.flatpages', 'django_markup', 'blogging', 'book_comments', 'textprocessor') |
INTERNAL_IPS | () |
LANGUAGES | (('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmal'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese'), ('zh-tw', 'Traditional Chinese')) |
LANGUAGES_BIDI | ('he', 'ar', 'fa', 'ur') |
LANGUAGE_CODE | 'fr-fr' |
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_URL | '/accounts/logout/' |
MANAGERS | () |
MEDIA_ROOT | '/home/benzin/cocoa-fr/cocoa/./staticfiles/medias' |
MEDIA_URL | 'http://medias.cocoa.fr/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE_CLASSES | ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', 'django.contrib.redirects.middleware.RedirectFallbackMiddleware') |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
ROOT_URLCONF | 'cocoa.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 | 'cocoa.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 | ('/home/benzin/cocoa-fr/cocoa/./assets',) |
STATICFILES_FINDERS | ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/home/benzin/cocoa-fr/cocoa/./staticfiles/static' |
STATIC_URL | 'http://static.cocoa.fr/' |
TEMPLATES | [] |
TEMPLATE_CONTEXT_PROCESSORS | ('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'blogging.context_processors.categories', 'blogging.context_processors.latest_posts', 'blogging.context_processors.selected') |
TEMPLATE_DEBUG | True |
TEMPLATE_DIRS | ('/home/benzin/cocoa-fr/cocoa/./cocoa/templates',) |
TEMPLATE_LOADERS | ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader') |
TEMPLATE_STRING_IF_INVALID | '' |
TEST_NON_SERIALIZED_APPS | [] |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
THOUSAND_SEPARATOR | ',' |
TIME_FORMAT | 'P' |
TIME_INPUT_FORMATS | ('%H:%M:%S', '%H:%M:%S.%f', '%H:%M') |
TIME_ZONE | 'Europe/Paris' |
USE_ETAGS | False |
USE_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | True |
USE_X_FORWARDED_HOST | False |
WSGI_APPLICATION | 'cocoa.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.