Reverse for 'redlist_citation' with arguments '('',)' and keyword arguments '{}' not found. 2 pattern(s) tried: ['assessment/citation/(?P<pk>[0-9]+)\\.(?P<format>[a-z0-9]+)/?$', 'assessment/citation/(?P<pk>[0-9]+)/$']
Request Method: | GET |
---|---|
Request URL: | http://speciesstatus.sanbi.org/assessment/last-assessment/616/ |
Django Version: | 1.10.1 |
Exception Type: | NoReverseMatch |
Exception Value: | Reverse for 'redlist_citation' with arguments '('',)' and keyword arguments '{}' not found. 2 pattern(s) tried: ['assessment/citation/(?P<pk>[0-9]+)\\.(?P<format>[a-z0-9]+)/?$', 'assessment/citation/(?P<pk>[0-9]+)/$'] |
Exception Location: | C:\virtual-envs\species_status\lib\site-packages\django\urls\resolvers.py in _reverse_with_prefix, line 392 |
Python Executable: | C:\virtual-envs\species_status\Scripts\python.exe |
Python Version: | 3.6.1 |
Python Path: | ['.', 'C:\\inetpub\\wwwroot\\species_status', 'C:\\virtual-envs\\species_status\\Scripts\\python36.zip', 'C:\\Program Files\\Python36\\DLLs', 'C:\\Program Files\\Python36\\lib', 'C:\\Program Files\\Python36', 'C:\\virtual-envs\\species_status', 'C:\\virtual-envs\\species_status\\lib\\site-packages'] |
Server time: | Fri, 29 Mar 2024 08:11:04 +0200 |
In template C:\inetpub\wwwroot\species_status\templates\website\assessment.html
, error at line 46
36 | failure: function () { |
---|---|
37 | // var txt = 'IUCN lookup service is temporarily down'; $(".iucn-check").html(txt); |
38 | } |
39 | }); |
40 | |
41 | // Format the references |
42 | bibtexify("#bibtex", "pubTable"); |
43 | |
44 | // Fill in "how to cite" |
45 | $.ajax({ |
46 | url: "{% url 'redlist_citation' id %}?format=json", |
47 | success: function(citation, textStatus, jqXHR) { $('p.howtocite').html(citation); }, |
48 | }); |
49 | |
50 | // Insert the habitat info |
51 | $('#habitatNarrative').hide(); |
52 | $.ajax({ |
53 | url: "{% url 'taxa_detail' 0 %}".replace('0', id) + "?format=json", |
54 | success: function(data, textStatus, jqXHR) { |
55 | if(data['info']['habitat_narrative'].length) { |
56 | $('#habitatNarrative').show(); |
C:\virtual-envs\species_status\lib\site-packages\django\core\handlers\exception.py
in inner
This decorator is automatically applied to all middleware to ensure that
no middleware leaks an exception and that the next middleware in the stack
can rely on getting a response instead of an exception.
"""
@wraps(get_response, 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 | NoReverseMatch("Reverse for 'redlist_citation' with arguments '('',)' and keyword arguments '{}' not found. 2 pattern(s) tried: ['assessment/citation/(?P<pk>[0-9]+)\\\\.(?P<format>[a-z0-9]+)/?$', 'assessment/citation/(?P<pk>[0-9]+)/$']",) |
get_response | <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x0000000FD6E86128>> |
request | <WSGIRequest: GET '/assessment/last-assessment/616/'> |
C:\virtual-envs\species_status\lib\site-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 LastAssessmentDetail at 0x0000000FD7FE6A60> |
callback_args | () |
callback_kwargs | {'taxon_pk': '616'} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x0000000FD7315BA8>> |
request | <WSGIRequest: GET '/assessment/last-assessment/616/'> |
resolver | <RegexURLResolver 'species.urls' (None:None) ^/> |
resolver_match | ResolverMatch(func=redlist.views.LastAssessmentDetail, args=(), kwargs={'taxon_pk': '616'}, url_name=last_assessment_detail, app_names=[], namespaces=[]) |
response | <Response status_code=200, "text/html; charset=utf-8"> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x0000000FD6E86128> |
wrapped_callback | <function LastAssessmentDetail at 0x0000000FD7FE6A60> |
C:\virtual-envs\species_status\lib\site-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 LastAssessmentDetail at 0x0000000FD7FE6A60> |
callback_args | () |
callback_kwargs | {'taxon_pk': '616'} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x0000000FD7315BA8>> |
request | <WSGIRequest: GET '/assessment/last-assessment/616/'> |
resolver | <RegexURLResolver 'species.urls' (None:None) ^/> |
resolver_match | ResolverMatch(func=redlist.views.LastAssessmentDetail, args=(), kwargs={'taxon_pk': '616'}, url_name=last_assessment_detail, app_names=[], namespaces=[]) |
response | <Response status_code=200, "text/html; charset=utf-8"> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x0000000FD6E86128> |
wrapped_callback | <function LastAssessmentDetail at 0x0000000FD7FE6A60> |
C:\virtual-envs\species_status\lib\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 |
---|---|
retval | <Response status_code=200, "text/html; charset=utf-8"> |
self | <Response status_code=200, "text/html; charset=utf-8"> |
C:\virtual-envs\species_status\lib\site-packages\rest_framework\response.py
in rendered_content
if content_type is None and charset is not None:
content_type = "{0}; charset={1}".format(media_type, charset)
elif content_type is None:
content_type = media_type
self['Content-Type'] = content_type
ret = renderer.render(self.data, accepted_media_type, context)...
if isinstance(ret, six.text_type):
assert charset, (
'renderer returned unicode, and did not specify '
'a charset value.'
)
return bytes(ret.encode(charset))
Variable | Value |
---|---|
accepted_media_type | 'text/html' |
charset | 'utf-8' |
content_type | 'text/html; charset=utf-8' |
context | {'args': (), 'kwargs': {'taxon_pk': '616'}, 'request': <rest_framework.request.Request object at 0x0000000FD9946198>, 'response': <Response status_code=200, "text/html; charset=utf-8">, 'view': <redlist.views.LastAssessmentDetail object at 0x0000000FD99466A0>} |
media_type | 'text/html' |
renderer | <rest_framework.renderers.TemplateHTMLRenderer object at 0x0000000FD9946240> |
self | <Response status_code=200, "text/html; charset=utf-8"> |
C:\virtual-envs\species_status\lib\site-packages\rest_framework\renderers.py
in render
template = self.resolve_template(template_names)
if hasattr(self, 'resolve_context'):
# Fallback for older versions.
context = self.resolve_context(data, request, response)
else:
context = self.get_template_context(data, renderer_context)
return template_render(template, context, request=request)...
def resolve_template(self, template_names):
return loader.select_template(template_names)
def get_template_context(self, data, renderer_context):
response = renderer_context['response']
Variable | Value |
---|---|
accepted_media_type | 'text/html' |
context | {'change_rationale': '', 'conservation_narrative': '', 'date': None, 'distribution_narrative': '', 'notes': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'rationale': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'research_narrative': '', 'scope': '', 'temp_field': '', 'threats': [], 'threats_narrative': '', 'use_trade_narrative': ''} |
data | {'change_rationale': '', 'conservation_narrative': '', 'date': None, 'distribution_narrative': '', 'notes': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'rationale': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'research_narrative': '', 'scope': '', 'temp_field': '', 'threats': [], 'threats_narrative': '', 'use_trade_narrative': ''} |
renderer_context | {'args': (), 'kwargs': {'taxon_pk': '616'}, 'request': <rest_framework.request.Request object at 0x0000000FD9946198>, 'response': <Response status_code=200, "text/html; charset=utf-8">, 'view': <redlist.views.LastAssessmentDetail object at 0x0000000FD99466A0>} |
request | <rest_framework.request.Request object at 0x0000000FD9946198> |
response | <Response status_code=200, "text/html; charset=utf-8"> |
self | <rest_framework.renderers.TemplateHTMLRenderer object at 0x0000000FD9946240> |
template | <django.template.backends.django.Template object at 0x0000000FD85BFE48> |
template_names | ['website/assessment.html'] |
view | <redlist.views.LastAssessmentDetail object at 0x0000000FD99466A0> |
C:\virtual-envs\species_status\lib\site-packages\rest_framework\compat.py
in template_render
if request:
context = RequestContext(request, context)
else:
context = Context(context)
return template.render(context)
# backends template, e.g. django.template.backends.django.Template
else:
return template.render(context, request=request)...
Variable | Value |
---|---|
context | {'change_rationale': '', 'conservation_narrative': '', 'date': None, 'distribution_narrative': '', 'notes': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'rationale': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'research_narrative': '', 'scope': '', 'temp_field': '', 'threats': [], 'threats_narrative': '', 'use_trade_narrative': ''} |
request | <rest_framework.request.Request object at 0x0000000FD9946198> |
template | <django.template.backends.django.Template object at 0x0000000FD85BFE48> |
C:\virtual-envs\species_status\lib\site-packages\django\template\backends\django.py
in render
@property
def origin(self):
return self.template.origin
def render(self, context=None, request=None):
context = make_context(context, request, autoescape=self.backend.engine.autoescape)
try:
return self.template.render(context)...
except TemplateDoesNotExist as exc:
reraise(exc, self.backend)
def copy_exception(exc, backend=None):
"""
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
request | <rest_framework.request.Request object at 0x0000000FD9946198> |
self | <django.template.backends.django.Template object at 0x0000000FD85BFE48> |
C:\virtual-envs\species_status\lib\site-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 | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
self | <django.template.base.Template object at 0x0000000FD85BF668> |
C:\virtual-envs\species_status\lib\site-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 | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
self | <django.template.base.Template object at 0x0000000FD85BF668> |
C:\virtual-envs\species_status\lib\site-packages\django\template\base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)...
else:
bit = node
bits.append(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bits | [] |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
node | <ExtendsNode: extends "website/taxon.html"> |
self | [<ExtendsNode: extends "website/taxon.html">] |
C:\virtual-envs\species_status\lib\site-packages\django\template\base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)...
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
self | <ExtendsNode: extends "website/taxon.html"> |
C:\virtual-envs\species_status\lib\site-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 0x0000000FD98A7160> |
compiled_parent | <django.template.base.Template object at 0x0000000FD9AB4240> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
node | <ExtendsNode: extends "website/_base.html"> |
self | <ExtendsNode: extends "website/taxon.html"> |
C:\virtual-envs\species_status\lib\site-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 | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
self | <django.template.base.Template object at 0x0000000FD9AB4240> |
C:\virtual-envs\species_status\lib\site-packages\django\template\base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)...
else:
bit = node
bits.append(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bits | [] |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
node | <ExtendsNode: extends "website/_base.html"> |
self | [<ExtendsNode: extends "website/_base.html">] |
C:\virtual-envs\species_status\lib\site-packages\django\template\base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)...
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
self | <ExtendsNode: extends "website/_base.html"> |
C:\virtual-envs\species_status\lib\site-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 0x0000000FD98A7160> |
blocks | {'body_attributes': <Block Node: body_attributes. Contents: []>, 'content': <Block Node: content. Contents: []>, 'css': <Block Node: css. Contents: []>, 'heading': <Block Node: heading. Contents: []>, 'js': <Block Node: js. Contents: []>, 'subcontent': <Block Node: subcontent. Contents: []>} |
compiled_parent | <django.template.base.Template object at 0x0000000FD8652470> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
node | <django.template.defaulttags.LoadNode object at 0x0000000FD9A92080> |
self | <ExtendsNode: extends "website/_base.html"> |
C:\virtual-envs\species_status\lib\site-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 | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
self | <django.template.base.Template object at 0x0000000FD8652470> |
C:\virtual-envs\species_status\lib\site-packages\django\template\base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)...
else:
bit = node
bits.append(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | '"></script>\n ' |
bits | ['', '\n' '<!DOCTYPE html>\n' '<html lang="en">\n' ' <head>\n' ' <meta charset="utf-8">\n' ' <meta http-equiv="X-UA-Compatible" content="IE=edge">\n' ' <meta name="viewport" content="width=device-width, initial-scale=1">\n' ' <!-- The above 3 meta tags *must* come first in the head; any other head ' 'content must come *after* these tags -->\n' ' <title>SANBI</title>\n' '\n' ' <!-- Bootstrap -->\n' ' <link ' 'href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" ' 'rel="stylesheet">\n' '\n' ' <!-- Site styles -->\n' ' <link href="', '/static/style.css', '" rel="stylesheet">\n' '\n' ' <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and ' 'media queries -->\n' " <!-- WARNING: Respond.js doesn't work if you view the page via file:// " '-->\n' ' <!--[if lt IE 9]>\n' ' <script ' 'src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>\n' ' <script ' 'src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>\n' ' <![endif]-->\n' '\n' ' <!-- Custom css -->\n' ' <link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" ' 'rel="stylesheet">\n' ' ', '\n' '<link href="/static/taxon.css" rel="stylesheet">\n' '<link ' 'href="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.1.1/ekko-lightbox.min.css" ' 'rel="stylesheet">\n' '\n' '<link rel="stylesheet" href="/static/bib-list/bib-publication-list.css" ' 'type="text/css" />\n' '<link rel="stylesheet" href="/static/bib-list/bib-list-custom.css" ' 'type="text/css" />\n' '\n', '\n </head>\n <body', ' data-spy="scroll" data-target="#species-side-nav" style="position: ' 'relative"', '>\n' ' \t<header>\n' ' <div class="container"><div class="row"><h1>Red List of South African ' 'Species</h1></div></div>\n' ' </header>\n' ' <div class="container"><div class="row">\n' ' <div class="col-sm-4"><a href="/" id="logo"><img src="', '/static/img/logo.png', '" alt="Home"></a></div>\n' ' <div class="col-sm-8" style="text-align: right; margin-top: 10px;">\n' ' <form action="', '/taxa/list/', '" method="get" class="form-inline">\n' ' <div class="form-group form-group-sm">\n' ' <input name="search" id="search" type="text" ' 'class="search-query form-control" autocomplete="off" placeholder="Enter ' 'common name, ecological traits, scientific names, etc." ' 'data-provide="typeahead" data-items="4" data-source="">\n' ' </div>\n' ' <button type="submit" class="btn btn-sm" ' 'style="background-color: #888; color: white;">Search species <span ' 'class="glyphicon glyphicon-search"></span></button>\n' ' </form>\n' ' <div style="margin-top: 3px;">\n' ' Alternatively, <a href="', '/taxa/lineage/4/', '" class="btn btn-sm" style="background-color: #888; color: white;">Explore ' 'species</a>\n' ' </div>\n' ' </div>\n' ' </div></div>\n' ' <div style="background-color: #888; text-align: right; padding: 10px 0; ' 'font-size: 0.9em; margin-bottom: 15px;">\n' ' <div class="container"><div class="row">\n' ' <a href="/about" style="color: white;">| National Red List ' 'categories</a> <a style="color: white;" href="/partners">| Partners ' '|</a></div>\n' ' </div></div>\n' ' <!-- Banner heading -->\n' ' ', '\n' '\t<section id="taxon-heading" class="triangles banner">\n' '\t\t<div class="container">\n' ' <div class="row taxon-header-row"><div class="col-md-12">\n' ' <!-- Hierarchical path - Gets filled in with javascript -->\n' ' <div id="breadcrumb"></div>\n' '\n' ' <!-- Image gallery with only initial image showing -->\n' ' <div id="taxon-img-container"><div>\n' ' <a href="#" data-toggle="lightbox" ' 'data-gallery="species-gallery"><img src=""></a>\n' ' <!--<span class="glyphicon camera" aria-hidden="true"></span>-->\n' ' <p>Open image gallery <span class="glyphicon ' 'g... <trimmed 7657 bytes string> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
node | <Block Node: js. Contents: []> |
self | [<django.template.defaulttags.LoadNode object at 0x0000000FD9A92080>, <TextNode: '\n<!DOCTYPE html>\n<html la'>, <django.templatetags.static.StaticNode object at 0x0000000FD9A926A0>, <TextNode: '" rel="stylesheet">\n\n '>, <Block Node: css. Contents: []>, <TextNode: '\n </head>\n <body'>, <Block Node: body_attributes. Contents: []>, <TextNode: '>\n \t<header>\n <div '>, <django.templatetags.static.StaticNode object at 0x0000000FD9A92860>, <TextNode: '" alt="Home"></a></div>\n '>, <django.template.defaulttags.URLNode object at 0x0000000FD9A92DA0>, <TextNode: '" method="get" class="for'>, <django.template.defaulttags.URLNode object at 0x0000000FD9A92BE0>, <TextNode: '" class="btn btn-sm" styl'>, <Block Node: heading. Contents: []>, <TextNode: '\n\t\n <!-- Main content '>, <Block Node: content. Contents: []>, <TextNode: '\n </div>\n\t '>, <Block Node: subcontent. Contents: []>, <TextNode: '\n <footer><div class="'>, <django.template.defaulttags.URLNode object at 0x0000000FD9A92F98>, <TextNode: '";\n var searchRedire'>, <django.template.defaulttags.URLNode object at 0x0000000FD9A92940>, <TextNode: '";\n </script>\n <scr'>, <django.templatetags.static.StaticNode object at 0x0000000FD9A92E48>, <TextNode: '"></script>\n '>, <Block Node: js. Contents: []>, <TextNode: '\n </body>\n</html>'>] |
C:\virtual-envs\species_status\lib\site-packages\django\template\base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)...
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
self | <Block Node: js. Contents: []> |
C:\virtual-envs\species_status\lib\site-packages\django\template\loader_tags.py
in render
push = block = block_context.pop(self.name)
if block is None:
block = self
# Create new block so we can store context without thread-safety issues.
block = type(self)(block.name, block.nodelist)
block.context = context
context['block'] = block
result = block.nodelist.render(context)...
if push is not None:
block_context.push(self.name, push)
return result
def super(self):
if not hasattr(self, 'context'):
Variable | Value |
---|---|
block | <Block Node: js. Contents: [<TextNode: '\n<script src="https://cdn'>, <django.templatetags.static.StaticNode object at 0x0000000FD8652198>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x0000000FD8849A58>, <TextNode: '"></script>\n<script>\nvar '>, <django.template.defaulttags.URLNode object at 0x0000000FD8849A20>, <TextNode: '" + "?format=json").repla'>, <django.template.defaulttags.URLNode object at 0x0000000FD8849208>, <TextNode: '";\n\nvar common_names_url '>, <django.template.defaulttags.URLNode object at 0x0000000FD88497B8>, <TextNode: '" + "?format=json").repla'>, <django.templatetags.static.StaticNode object at 0x0000000FD8849198>, <TextNode: '"></script>\n<script src="'>, <Block Node: extra-js. Contents: []>, <TextNode: '\n'>]> |
block_context | <django.template.loader_tags.BlockContext object at 0x0000000FD98A7160> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
push | <Block Node: js. Contents: [<TextNode: '\n<script src="https://cdn'>, <django.templatetags.static.StaticNode object at 0x0000000FD8652198>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x0000000FD8849A58>, <TextNode: '"></script>\n<script>\nvar '>, <django.template.defaulttags.URLNode object at 0x0000000FD8849A20>, <TextNode: '" + "?format=json").repla'>, <django.template.defaulttags.URLNode object at 0x0000000FD8849208>, <TextNode: '";\n\nvar common_names_url '>, <django.template.defaulttags.URLNode object at 0x0000000FD88497B8>, <TextNode: '" + "?format=json").repla'>, <django.templatetags.static.StaticNode object at 0x0000000FD8849198>, <TextNode: '"></script>\n<script src="'>, <Block Node: extra-js. Contents: []>, <TextNode: '\n'>]> |
self | <Block Node: js. Contents: []> |
C:\virtual-envs\species_status\lib\site-packages\django\template\base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)...
else:
bit = node
bits.append(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | ('"></script>\n' '<script ' 'src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.1.1/ekko-lightbox.min.js"></script>\n' '<script>\n' '$(document).on(\'click\', \'[data-toggle="lightbox"]\', function(event) {\n' ' event.preventDefault();\n' ' $(this).ekkoLightbox();\n' '});\n' '$(document).ready(function() {\n' ' $(function () {\n' ' $(\'[data-toggle="tooltip"]\').tooltip()\n' ' })\n' '\n' ' // Fix for ckeditor in a bootstrap modal\n' ' // See ' 'http://stackoverflow.com/questions/22637455/how-to-use-ckeditor-in-a-bootstrap-modal\n' ' jQuery.fn.modal.Constructor.prototype.enforceFocus = function () {\n' ' modal_this = this\n' " jQuery(document).on('focusin.modal', function (e) {\n" ' if (modal_this.$element[0] !== e.target && ' '!modal_this.$element.has(e.target).length\n' ' && ' "!jQuery(e.target.parentNode).hasClass('cke_dialog_ui_input_select')\n" ' && ' "!jQuery(e.target.parentNode).hasClass('cke_dialog_ui_input_textarea')\n" ' && ' "!jQuery(e.target.parentNode).hasClass('cke_dialog_ui_input_text')) {\n" ' modal_this.$element.focus()\n' ' }\n' ' })\n' ' };\n' '\n' ' // Place correct data when modal shows\n' " $('#infoModal').on('show.bs.modal', function (event) {\n" ' var button = $(event.relatedTarget); // Button that triggered the modal\n' " var label = button.parent().children('span').text();\n" " var text = button.parent().parent().children('.item-info').html();\n" ' var modal = $(this);\n' " modal.find('.modal-title').text('Edit ' + label);\n" ' var textarea = \'<textarea id="ckeditor" name="\' + label + \'" ' 'class="form-control">\' + text + \'</textarea>\';\n' " modal.find('.info-form-group').html(textarea);\n" ' });\n' " $('#infoModal').on('shown.bs.modal', function (event) {\n" " console.log($('#ckeditor').attr('name'));\n" " CKEDITOR.replace($('#ckeditor').attr('name'));\n" ' });\n' '});\n' '</script>\n') |
bits | ['\n' '<script ' 'src="https://cdnjs.cloudflare.com/ajax/libs/trianglify/1.0.1/trianglify.min.js"></script>\n' '<script src="', '/static/bibtex-js-master/src/bibtex_js.js', '"></script>\n<script src="', '/static/ckeditor/ckeditor.js', '"></script>\n' '<script>\n' "var id = window.location.href.split('/').slice(-2, -1)[0];\n" '\n' 'var ancestors_url = ("', '/taxa/api/ancestors/0/', '" + "?format=json").replace(\'0\', id);\n\nvar lineage_url = "', '/taxa/lineage/0/', '";\n\nvar common_names_url = ("', '/taxa/api/common-names/0/', '" + "?format=json").replace(\'0\', id);\n</script>\n<script src="', '/static/taxa-header.js', '"></script>\n' '<script ' 'src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.1.1/ekko-lightbox.min.js"></script>\n' '<script>\n' '$(document).on(\'click\', \'[data-toggle="lightbox"]\', function(event) {\n' ' event.preventDefault();\n' ' $(this).ekkoLightbox();\n' '});\n' '$(document).ready(function() {\n' ' $(function () {\n' ' $(\'[data-toggle="tooltip"]\').tooltip()\n' ' })\n' '\n' ' // Fix for ckeditor in a bootstrap modal\n' ' // See ' 'http://stackoverflow.com/questions/22637455/how-to-use-ckeditor-in-a-bootstrap-modal\n' ' jQuery.fn.modal.Constructor.prototype.enforceFocus = function () {\n' ' modal_this = this\n' " jQuery(document).on('focusin.modal', function (e) {\n" ' if (modal_this.$element[0] !== e.target && ' '!modal_this.$element.has(e.target).length\n' ' && ' "!jQuery(e.target.parentNode).hasClass('cke_dialog_ui_input_select')\n" ' && ' "!jQuery(e.target.parentNode).hasClass('cke_dialog_ui_input_textarea')\n" ' && ' "!jQuery(e.target.parentNode).hasClass('cke_dialog_ui_input_text')) {\n" ' modal_this.$element.focus()\n' ' }\n' ' })\n' ' };\n' '\n' ' // Place correct data when modal shows\n' " $('#infoModal').on('show.bs.modal', function (event) {\n" ' var button = $(event.relatedTarget); // Button that triggered the modal\n' " var label = button.parent().children('span').text();\n" " var text = button.parent().parent().children('.item-info').html();\n" ' var modal = $(this);\n' " modal.find('.modal-title').text('Edit ' + label);\n" ' var textarea = \'<textarea id="ckeditor" name="\' + label + \'" ' 'class="form-control">\' + text + \'</textarea>\';\n' " modal.find('.info-form-group').html(textarea);\n" ' });\n' " $('#infoModal').on('shown.bs.modal', function (event) {\n" " console.log($('#ckeditor').attr('name'));\n" " CKEDITOR.replace($('#ckeditor').attr('name'));\n" ' });\n' '});\n' '</script>\n'] |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
node | <Block Node: extra-js. Contents: []> |
self | [<TextNode: '\n<script src="https://cdn'>, <django.templatetags.static.StaticNode object at 0x0000000FD8652198>, <TextNode: '"></script>\n<script src="'>, <django.templatetags.static.StaticNode object at 0x0000000FD8849A58>, <TextNode: '"></script>\n<script>\nvar '>, <django.template.defaulttags.URLNode object at 0x0000000FD8849A20>, <TextNode: '" + "?format=json").repla'>, <django.template.defaulttags.URLNode object at 0x0000000FD8849208>, <TextNode: '";\n\nvar common_names_url '>, <django.template.defaulttags.URLNode object at 0x0000000FD88497B8>, <TextNode: '" + "?format=json").repla'>, <django.templatetags.static.StaticNode object at 0x0000000FD8849198>, <TextNode: '"></script>\n<script src="'>, <Block Node: extra-js. Contents: []>, <TextNode: '\n'>] |
C:\virtual-envs\species_status\lib\site-packages\django\template\base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)...
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
self | <Block Node: extra-js. Contents: []> |
C:\virtual-envs\species_status\lib\site-packages\django\template\loader_tags.py
in render
push = block = block_context.pop(self.name)
if block is None:
block = self
# Create new block so we can store context without thread-safety issues.
block = type(self)(block.name, block.nodelist)
block.context = context
context['block'] = block
result = block.nodelist.render(context)...
if push is not None:
block_context.push(self.name, push)
return result
def super(self):
if not hasattr(self, 'context'):
Variable | Value |
---|---|
block | <Block Node: extra-js. Contents: [<TextNode: '\n<script src="'>, <django.templatetags.static.StaticNode object at 0x0000000FD98A7278>, <TextNode: '"></script>\n<script type='>, <Variable Node: taxon>, <TextNode: '".replace(/\\s+/g,\' \');\n '>, <django.template.defaulttags.URLNode object at 0x0000000FD98A7710>, <TextNode: '?format=json",\n succ'>, <django.template.defaulttags.URLNode object at 0x0000000FD98A7390>, <TextNode: '".replace(\'0\', id) + "?fo'>, <django.template.defaulttags.URLNode object at 0x0000000FD98A7320>, <TextNode: '".replace(\'0\', id));\n '>, <django.templatetags.static.StaticNode object at 0x0000000FD98C8CC0>, <TextNode: '"></script>\n'>]> |
block_context | <django.template.loader_tags.BlockContext object at 0x0000000FD98A7160> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
push | <Block Node: extra-js. Contents: [<TextNode: '\n<script src="'>, <django.templatetags.static.StaticNode object at 0x0000000FD98A7278>, <TextNode: '"></script>\n<script type='>, <Variable Node: taxon>, <TextNode: '".replace(/\\s+/g,\' \');\n '>, <django.template.defaulttags.URLNode object at 0x0000000FD98A7710>, <TextNode: '?format=json",\n succ'>, <django.template.defaulttags.URLNode object at 0x0000000FD98A7390>, <TextNode: '".replace(\'0\', id) + "?fo'>, <django.template.defaulttags.URLNode object at 0x0000000FD98A7320>, <TextNode: '".replace(\'0\', id));\n '>, <django.templatetags.static.StaticNode object at 0x0000000FD98C8CC0>, <TextNode: '"></script>\n'>]> |
self | <Block Node: extra-js. Contents: []> |
C:\virtual-envs\species_status\lib\site-packages\django\template\base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)...
else:
bit = node
bits.append(force_text(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | ('".replace(/\\s+/g,\' \');\n' ' console.log(species);\n' ' $.ajax({\n' ' dataType: "jsonp",\n' " //url: 'http://api.iucnredlist.org/index/species/' + species + " '".js",\n' " //url: 'http://apiv3.iucnredlist.org/api/v3/species/' + species + " '"?token=9bb4facb6d23f48efbf424bb05c0c1ef1cf6f468393bc745d42179ac4aca5fee",\n' ' success: function (row) {\n' ' if(row.length > 0) {\n' ' var txt = \'<a href="http://www.iucnredlist.org/details/\' + ' 'row[0].species_id + \'/\' + row[0].assessmentid +\'">\';\n' ' txt += \'<span class="assessment assessment-\' + row[0].category + ' '\'">\' + row[0].category + \' (\' + row[0].modified_year + \')</span>\';\n' " txt += ' on IUCN global redlist ';\n" ' txt += \' - View <span class="glyphicon glyphicon-chevron-right" ' 'aria-hidden="true"></span></a>\';\n' ' $(".iucn-check").html(txt);\n' ' }\n' ' else {\n' ' var txt = \'<a href="http://www.iucnredlist.org/">Not assessed on ' "IUCN global redlist';\n" ' txt += \' - Search <span class="glyphicon glyphicon-chevron-right" ' 'aria-hidden="true"></span></a>\';\n' ' $(".iucn-check").html(txt);\n' ' }\n' ' },\n' ' failure: function () {\n' " // var txt = 'IUCN lookup service is temporarily down'; " '$(".iucn-check").html(txt);\n' ' }\n' ' });\n' '\n' ' // Format the references\n' ' bibtexify("#bibtex", "pubTable");\n' '\n' ' // Fill in "how to cite"\n' ' $.ajax({\n' ' url: "') |
bits | ['\n<script src="', '/static/bib-list/bib-list.js', '"></script>\n' '<script type="text/javascript">\n' ' $(document).ready(function() {\n' ' // Display IUCN details if we can get em - e.g. ' 'http://api.iucnredlist.org/index/species/ciconia-abdimii.js\n' ' var species = "', '', '".replace(/\\s+/g,\' \');\n' ' console.log(species);\n' ' $.ajax({\n' ' dataType: "jsonp",\n' " //url: 'http://api.iucnredlist.org/index/species/' + species + " '".js",\n' " //url: 'http://apiv3.iucnredlist.org/api/v3/species/' + species + " '"?token=9bb4facb6d23f48efbf424bb05c0c1ef1cf6f468393bc745d42179ac4aca5fee",\n' ' success: function (row) {\n' ' if(row.length > 0) {\n' ' var txt = \'<a href="http://www.iucnredlist.org/details/\' + ' 'row[0].species_id + \'/\' + row[0].assessmentid +\'">\';\n' ' txt += \'<span class="assessment assessment-\' + row[0].category + ' '\'">\' + row[0].category + \' (\' + row[0].modified_year + \')</span>\';\n' " txt += ' on IUCN global redlist ';\n" ' txt += \' - View <span class="glyphicon glyphicon-chevron-right" ' 'aria-hidden="true"></span></a>\';\n' ' $(".iucn-check").html(txt);\n' ' }\n' ' else {\n' ' var txt = \'<a href="http://www.iucnredlist.org/">Not assessed on ' "IUCN global redlist';\n" ' txt += \' - Search <span class="glyphicon glyphicon-chevron-right" ' 'aria-hidden="true"></span></a>\';\n' ' $(".iucn-check").html(txt);\n' ' }\n' ' },\n' ' failure: function () {\n' " // var txt = 'IUCN lookup service is temporarily down'; " '$(".iucn-check").html(txt);\n' ' }\n' ' });\n' '\n' ' // Format the references\n' ' bibtexify("#bibtex", "pubTable");\n' '\n' ' // Fill in "how to cite"\n' ' $.ajax({\n' ' url: "'] |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
node | <django.template.defaulttags.URLNode object at 0x0000000FD98A7710> |
self | [<TextNode: '\n<script src="'>, <django.templatetags.static.StaticNode object at 0x0000000FD98A7278>, <TextNode: '"></script>\n<script type='>, <Variable Node: taxon>, <TextNode: '".replace(/\\s+/g,\' \');\n '>, <django.template.defaulttags.URLNode object at 0x0000000FD98A7710>, <TextNode: '?format=json",\n succ'>, <django.template.defaulttags.URLNode object at 0x0000000FD98A7390>, <TextNode: '".replace(\'0\', id) + "?fo'>, <django.template.defaulttags.URLNode object at 0x0000000FD98A7320>, <TextNode: '".replace(\'0\', id));\n '>, <django.templatetags.static.StaticNode object at 0x0000000FD98C8CC0>, <TextNode: '"></script>\n'>] |
C:\virtual-envs\species_status\lib\site-packages\django\template\base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)...
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
self | <django.template.defaulttags.URLNode object at 0x0000000FD98A7710> |
C:\virtual-envs\species_status\lib\site-packages\django\template\defaulttags.py
in render
current_app = context.request.resolver_match.namespace
except AttributeError:
current_app = None
# Try to look up the URL. If it fails, raise NoReverseMatch unless the
# {% url ... as var %} construct is used, in which case return nothing.
url = ''
try:
url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)...
except NoReverseMatch:
if self.asvar is None:
raise
if self.asvar:
context[self.asvar] = url
Variable | Value |
---|---|
NoReverseMatch | <class 'django.urls.exceptions.NoReverseMatch'> |
args | [''] |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'scope': '', 'rationale': '', 'change_rationale': '', 'date': None, 'notes': '', 'redlist_category': None, 'redlist_category_display': '', 'redlist_criteria': '', 'population_narrative': '', 'population_trend_narrative': '', 'population_trend_nature': '', 'threats': [], 'threats_narrative': '', 'conservation_narrative': '', 'research_narrative': '', 'use_trade_narrative': '', 'distribution_narrative': '', 'temp_field': ''}] |
current_app | '' |
kwargs | {} |
reverse | <function reverse at 0x0000000FD670E620> |
self | <django.template.defaulttags.URLNode object at 0x0000000FD98A7710> |
url | '' |
view_name | 'redlist_citation' |
C:\virtual-envs\species_status\lib\site-packages\django\urls\base.py
in reverse
(key, ':'.join(resolved_path))
)
else:
raise NoReverseMatch("%s is not a registered namespace" % key)
if ns_pattern:
resolver = get_ns_resolver(ns_pattern, resolver)
return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))...
reverse_lazy = lazy(reverse, six.text_type)
def clear_url_caches():
get_callable.cache_clear()
Variable | Value |
---|---|
args | [''] |
current_app | '' |
current_path | None |
kwargs | {} |
ns_pattern | '' |
parts | ['redlist_citation'] |
path | [] |
prefix | '/' |
resolved_path | [] |
resolver | <RegexURLResolver 'species.urls' (None:None) ^/> |
urlconf | 'species.urls' |
view | 'redlist_citation' |
viewname | 'redlist_citation' |
C:\virtual-envs\species_status\lib\site-packages\django\urls\resolvers.py
in _reverse_with_prefix
else:
lookup_view_s = lookup_view
patterns = [pattern for (possibility, pattern, defaults) in possibilities]
raise NoReverseMatch(
"Reverse for '%s' with arguments '%s' and keyword "
"arguments '%s' not found. %d pattern(s) tried: %s" %
(lookup_view_s, args, kwargs, len(patterns), patterns)...
)
class LocaleRegexURLResolver(RegexURLResolver):
"""
A URL resolver that always matches the active language code as URL prefix.
Variable | Value |
---|---|
_prefix | '/' |
args | ('',) |
candidate_pat | '/assessment/citation/%(pk)s/' |
candidate_subs | {'pk': ''} |
defaults | {} |
kwargs | {} |
lookup_view | 'redlist_citation' |
lookup_view_s | 'redlist_citation' |
m | None |
n | None |
params | ['pk'] |
pattern | 'assessment/citation/(?P<pk>[0-9]+)/$' |
patterns | ['assessment/citation/(?P<pk>[0-9]+)\\.(?P<format>[a-z0-9]+)/?$', 'assessment/citation/(?P<pk>[0-9]+)/$'] |
possibilities | [([('assessment/citation/%(pk)s.%(format)s', ['pk', 'format'])], 'assessment/citation/(?P<pk>[0-9]+)\\.(?P<format>[a-z0-9]+)/?$', {}), ([('assessment/citation/%(pk)s/', ['pk'])], 'assessment/citation/(?P<pk>[0-9]+)/$', {})] |
possibility | [('assessment/citation/%(pk)s/', ['pk'])] |
result | 'assessment/citation/%(pk)s/' |
self | <RegexURLResolver 'species.urls' (None:None) ^/> |
text_args | [''] |
text_kwargs | {} |
AnonymousUser
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
APPL_MD_PATH | '/LM/W3SVC/6/ROOT' |
APPL_PHYSICAL_PATH | 'C:\\inetpub\\wwwroot\\species_status\\' |
APP_POOL_CONFIG | 'C:\\inetpub\\temp\\apppools\\SpeciesStatus\\SpeciesStatus.config' |
APP_POOL_ID | 'SpeciesStatus' |
AUTH_PASSWORD | '' |
AUTH_TYPE | '' |
AUTH_USER | '' |
CERT_COOKIE | '' |
CERT_FLAGS | '' |
CERT_ISSUER | '' |
CERT_SERIALNUMBER | '' |
CERT_SUBJECT | '' |
CONTENT_LENGTH | '0' |
CONTENT_TYPE | '' |
DOCUMENT_ROOT | 'C:\\inetpub\\wwwroot\\species_status' |
GATEWAY_INTERFACE | 'CGI/1.1' |
HTTPS | 'off' |
HTTPS_KEYSIZE | '' |
HTTPS_SECRETKEYSIZE | '' |
HTTPS_SERVER_ISSUER | '' |
HTTPS_SERVER_SUBJECT | '' |
HTTP_ACCEPT | '*/*' |
HTTP_HOST | 'speciesstatus.sanbi.org' |
HTTP_USER_AGENT | 'claudebot' |
IIS_UrlRewriteModule | '7.1.1980.0' |
INSTANCE_ID | '6' |
INSTANCE_META_PATH | '/LM/W3SVC/6' |
INSTANCE_NAME | 'SPECIESSTATUS' |
LOCAL_ADDR | '197.189.235.147' |
LOGON_USER | '' |
PATH_INFO | '/assessment/last-assessment/616/' |
PATH_TRANSLATED | 'C:\\inetpub\\wwwroot\\species_status\\assessment\\last-assessment\\616\\' |
QUERY_STRING | '' |
REMOTE_ADDR | '44.201.96.213' |
REMOTE_HOST | '44.201.96.213' |
REMOTE_PORT | '36228' |
REMOTE_USER | '' |
REQUEST_METHOD | 'GET' |
REQUEST_URI | '/assessment/last-assessment/616/' |
SCRIPT_FILENAME | 'C:\\inetpub\\wwwroot\\species_status\\assessment\\last-assessment\\616\\' |
SCRIPT_NAME | '' |
SERVER_NAME | 'speciesstatus.sanbi.org' |
SERVER_PORT | '80' |
SERVER_PORT_SECURE | '0' |
SERVER_PROTOCOL | 'HTTP/1.1' |
SERVER_SOFTWARE | 'Microsoft-IIS/8.5' |
URL | '/assessment/last-assessment/616/' |
wsgi.errors | <_io.StringIO object at 0x0000000FD8728828> |
wsgi.input | <_io.BytesIO object at 0x0000000FD9A7E6D0> |
wsgi.multiprocess | True |
wsgi.multithread | False |
wsgi.path_info | b'/assessment/last-assessment/616/' |
wsgi.query_string | b'' |
wsgi.run_once | False |
wsgi.script_name | b'' |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
species.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | [] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'auth.User' |
BASE_DIR | 'C:\\inetpub\\wwwroot\\species_status' |
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' |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | [] |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'HOST': '197.189.235.53', 'NAME': 'species_backup', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '5432', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'postgres'}} |
DATABASE_ROUTERS | [] |
DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS | 1000 |
DATETIME_FORMAT | 'P j N Y' |
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 | 'j N 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 | 'webmaster@localhost' |
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.postgres', 'polymorphic', 'rest_framework', 'mptt', 'django.contrib.gis', 'rest_framework_gis', 'website', 'taxa', 'people', 'biblio', 'redlist'] |
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'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('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 Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] |
LANGUAGES_BIDI | ['he', 'ar', 'fa', 'ur'] |
LANGUAGE_CODE | 'en-us' |
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 | '' |
MEDIA_URL | '' |
MENDELEY_SETTINGS | {'ID': '3513', 'REDIRECT': 'http://species.sanbi.org', 'SECRET': '********************'} |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] |
MIDDLEWARE_CLASSES | ['django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
REST_FRAMEWORK | {'DATE_FORMAT': '%d %b %Y', 'DEFAULT_PERMISSION_CLASSES': [], 'DEFAULT_RENDERER_CLASSES': ('rest_framework.renderers.BrowsableAPIRenderer', 'rest_framework.renderers.JSONRenderer', 'rest_framework.renderers.TemplateHTMLRenderer'), 'PAGE_SIZE': 10} |
ROOT_URLCONF | 'species.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 | 'species.settings' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
STATICFILES_DIRS | [] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | 'C:\\inetpub\\wwwroot\\species_status\\species\\static' |
STATIC_URL | '/static/' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['C:\\inetpub\\wwwroot\\species_status\\templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}] |
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 | '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 | 'species.wsgi.application' |
X_FRAME_OPTIONS | 'EXEMPT' |
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.