Population must be a sequence. For dicts or sets, use sorted(d).
Request Method: | GET |
---|---|
Request URL: | http://wafafertilizer.org/en/activities_gallery/gallery/ |
Django Version: | 4.1.5 |
Exception Type: | TypeError |
Exception Value: | Population must be a sequence. For dicts or sets, use sorted(d). |
Exception Location: | /app/.heroku/python/lib/python3.11/random.py, line 436, in sample |
Raised during: | photologue.views.GalleryArchiveIndexView |
Python Executable: | /app/.heroku/python/bin/python |
Python Version: | 3.11.1 |
Python Path: | ['/app/.heroku/python/bin', '/app', '/app/.heroku/python/lib/python311.zip', '/app/.heroku/python/lib/python3.11', '/app/.heroku/python/lib/python3.11/lib-dynload', '/app/.heroku/python/lib/python3.11/site-packages'] |
Server time: | Tue, 19 Mar 2024 08:24:16 +0000 |
In template /app/wafa/templates/photologue/includes/gallery_sample.html
, error at line 8
1 | {% load i18n %} |
---|---|
2 | |
3 | <article class="col-md-3 portfolio-item pf-{{ gallery.date_added|date:"Y" }} pf-illustrations"> |
4 | <div class="portfolio-image"> |
5 | <div class="fslider" data-arrows="false" data-speed="400" data-pause="4000"> |
6 | <div class="flexslider"> |
7 | <div class="slider-wrap"> |
8 | {% for photo in gallery.sample %} |
9 | <div class="slide"> |
10 | <a href="{{ photo.get_absolute_url }}"> |
11 | <img src="{{ photo.image.url }}" alt="{{ photo.title }}"></a> |
12 | </div> |
13 | {% endfor %} |
14 | </div> |
15 | </div> |
16 | </div> |
17 | <div class="portfolio-overlay" data-lightbox="gallery"> |
18 |
/app/.heroku/python/lib/python3.11/site-packages/django/core/handlers/exception.py
, line 55, in inner
return inner
else:
@wraps(get_response)
def inner(request):
try:
response = get_response(request)…
except Exception as exc:
response = response_for_exception(request, exc)
return response
return inner
Variable | Value |
---|---|
exc | TypeError('Population must be a sequence. For dicts or sets, use sorted(d).') |
get_response | <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7fa4ac945ad0>> |
request | <WSGIRequest: GET '/en/activities_gallery/gallery/'> |
/app/.heroku/python/lib/python3.11/site-packages/django/core/handlers/base.py
, line 220, in _get_response
self.check_response(
response,
middleware_method,
name="%s.process_template_response"
% (middleware_method.__self__.__class__.__name__,),
)
try:
response = response.render()…
except Exception as e:
response = self.process_exception_by_middleware(e, request)
if response is None:
raise
return response
Variable | Value |
---|---|
callback | <function View.as_view.<locals>.view at 0x7fa4abcb5580> |
callback_args | () |
callback_kwargs | {} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <CsrfViewMiddleware get_response=convert_exception_to_response.<locals>.inner>> |
request | <WSGIRequest: GET '/en/activities_gallery/gallery/'> |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7fa4ac945ad0> |
wrapped_callback | <function View.as_view.<locals>.view at 0x7fa4abcb5580> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/response.py
, line 114, in render
If the content has already been rendered, this is a no-op.
Return the baked response instance.
"""
retval = self
if not self._is_rendered:
self.content = self.rendered_content…
for post_callback in self._post_render_callbacks:
newretval = post_callback(retval)
if newretval is not None:
retval = newretval
return retval
Variable | Value |
---|---|
retval | <TemplateResponse status_code=200, "text/html; charset=utf-8"> |
self | <TemplateResponse status_code=200, "text/html; charset=utf-8"> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/response.py
, line 92, in rendered_content
This *does not* set the final content of the response. To set the
response content, you must either call render(), or set the
content explicitly using the value of this property.
"""
template = self.resolve_template(self.template_name)
context = self.resolve_context(self.context_data)
return template.render(context, self._request)…
def add_post_render_callback(self, callback):
"""Add a new post-rendering callback.
If the response has already been rendered,
invoke the callback immediately.
Variable | Value |
---|---|
context | {'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'is_paginated': False, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'page_obj': None, 'paginator': None, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>} |
self | <TemplateResponse status_code=200, "text/html; charset=utf-8"> |
template | <django.template.backends.django.Template object at 0x7fa4ab5572d0> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/backends/django.py
, line 62, in render
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}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
request | <WSGIRequest: GET '/en/activities_gallery/gallery/'> |
self | <django.template.backends.django.Template object at 0x7fa4ab5572d0> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 175, in render
def render(self, context):
"Display stage -- can be called many times"
with context.render_context.push_state(self):
if context.template is None:
with context.bind_template(self):
context.template_name = self.name
return self._render(context)…
else:
return self._render(context)
def compile_nodelist(self):
"""
Parse and compile the template source into a nodelist. If debug
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | <Template template_string="{% extends "base.htm..."> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 167, in _render
def __repr__(self):
return '<%s template_string="%s...">' % (
self.__class__.__qualname__,
self.source[:20].replace("\n", ""),
)
def _render(self, context):
return self.nodelist.render(context)…
def render(self, context):
"Display stage -- can be called many times"
with context.render_context.push_state(self):
if context.template is None:
with context.bind_template(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | <Template template_string="{% extends "base.htm..."> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 1005, in render
class NodeList(list):
# Set to True the first time a non-TextNode is inserted by
# extend_nodelist().
contains_nontext = False
def render(self, context):
return SafeString("".join([node.render_annotated(context) for node in self]))…
def get_nodes_by_type(self, nodetype):
"Return a list of all nodes of the given type"
nodes = []
for node in self:
nodes.extend(node.get_nodes_by_type(nodetype))
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | [<ExtendsNode: extends "base.html">] |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 1005, in <listcomp>
class NodeList(list):
# Set to True the first time a non-TextNode is inserted by
# extend_nodelist().
contains_nontext = False
def render(self, context):
return SafeString("".join([node.render_annotated(context) for node in self]))…
def get_nodes_by_type(self, nodetype):
"Return a list of all nodes of the given type"
nodes = []
for node in self:
nodes.extend(node.get_nodes_by_type(nodetype))
Variable | Value |
---|---|
.0 | <list_iterator object at 0x7fa4ab52ebc0> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
node | <ExtendsNode: extends "base.html"> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 966, 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:
# Store the actual node that caused the exception.
if not hasattr(e, "_culprit_node"):
e._culprit_node = self
if (
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | <ExtendsNode: extends "base.html"> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/loader_tags.py
, line 157, in render
}
block_context.add_blocks(blocks)
break
# Call Template._render explicitly so the parser context stays
# the same.
with context.render_context.push_state(compiled_parent, isolated_context=False):
return compiled_parent._render(context)…
class IncludeNode(Node):
context_key = "__include_context"
def __init__(
Variable | Value |
---|---|
block_context | <BlockContext: blocks=defaultdict(<class 'list'>, {'body_class': [<Block Node: body_class. Contents: []>, <Block Node: body_class. Contents: [<TextNode: 'stretched'>]>], 'extra_css': [<Block Node: extra_css. Contents: [<TextNode: '\n '>, <TextNode: '\n '>]>, <Block Node: extra_css. Contents: [<TextNode: '\n\n'>]>], 'content': [<Block Node: content. Contents: []>], 'extra_js': [<Block Node: extra_js. Contents: [<TextNode: '\n '>, <TextNode: '\n'>]>, <Block Node: extra_js. Contents: [<TextNode: '\n <!-- Bootstrap Data '>]>], 'title': [<Block Node: title. Contents: [<TextNode: '\n '>, <IfNode>, <TextNode: '\n '>]>], 'title_suffix': [<Block Node: title_suffix. Contents: [<TextNode: '\n '>, <WithNode>, <TextNode: '\n '>]>]})> |
blocks | {'body_class': <Block Node: body_class. Contents: []>, 'content': <Block Node: content. Contents: []>, 'extra_css': <Block Node: extra_css. Contents: [<TextNode: '\n '>, <TextNode: '\n '>]>, 'extra_js': <Block Node: extra_js. Contents: [<TextNode: '\n '>, <TextNode: '\n'>]>, 'title': <Block Node: title. Contents: [<TextNode: '\n '>, <IfNode>, <TextNode: '\n '>]>, 'title_suffix': <Block Node: title_suffix. Contents: [<TextNode: '\n '>, <WithNode>, <TextNode: '\n '>]>} |
compiled_parent | <Template template_string="{% load static wagta..."> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
node | <django.template.defaulttags.LoadNode object at 0x7fa4abb78e50> |
self | <ExtendsNode: extends "base.html"> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 167, in _render
def __repr__(self):
return '<%s template_string="%s...">' % (
self.__class__.__qualname__,
self.source[:20].replace("\n", ""),
)
def _render(self, context):
return self.nodelist.render(context)…
def render(self, context):
"Display stage -- can be called many times"
with context.render_context.push_state(self):
if context.template is None:
with context.bind_template(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | <Template template_string="{% load static wagta..."> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 1005, in render
class NodeList(list):
# Set to True the first time a non-TextNode is inserted by
# extend_nodelist().
contains_nontext = False
def render(self, context):
return SafeString("".join([node.render_annotated(context) for node in self]))…
def get_nodes_by_type(self, nodetype):
"Return a list of all nodes of the given type"
nodes = []
for node in self:
nodes.extend(node.get_nodes_by_type(nodetype))
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | [<django.template.defaulttags.LoadNode object at 0x7fa4abb78e50>, <TextNode: '\n<!DOCTYPE html>\n<!--[if '>, <Block Node: title. Contents: [<TextNode: '\n '>, <IfNode>, <TextNode: '\n '>]>, <TextNode: '\n '>, <Block Node: title_suffix. Contents: [<TextNode: '\n '>, <WithNode>, <TextNode: '\n '>]>, <TextNode: '\n </title>\n <meta n'>, <IfNode>, <TextNode: '\n '>, <WithNode>, <TextNode: '"/>\n <meta name="descr'>, <django.templatetags.i18n.TranslateNode object at 0x7fa4abb7a190>, <TextNode: '"/>\n <meta name="viewp'>, <django.templatetags.i18n.TranslateNode object at 0x7fa4abb7a490>, <TextNode: '"/>\n <!-- Fertilizer,W'>, StaticNode(varname=None, path=<FilterExpression "'img/favicon.png'">), <TextNode: '"/>\n '>, <TextNode: '\n <link href="//fonts.'>, StaticNode(varname=None, path=<FilterExpression "'css/wafa.css'">), <TextNode: '">\n <!--[if lt IE 9]>\n'>, <Block Node: extra_css. Contents: [<TextNode: '\n '>, <TextNode: '\n '>]>, <TextNode: '\n</head>\n\n<body class="'>, <Block Node: body_class. Contents: []>, <TextNode: '">\n<div id="fb-root"></di'>, <django.template.library.SimpleNode object at 0x7fa4abb7a910>, <TextNode: '\n '>, <Block Node: content. Contents: []>, <TextNode: '\n</div> <!-- #wrapper end'>, StaticNode(varname=None, path=<FilterExpression "'js/jquery.js'">), <TextNode: '"></script>\n<script type='>, StaticNode(varname=None, path=<FilterExpression "'js/plugins.js'">), <TextNode: '"></script>\n\n<!-- Footer '>, StaticNode(varname=None, path=<FilterExpression "'js/functions.js'">), <TextNode: '"></script>\n<script src="'>, StaticNode(varname=None, path=<FilterExpression "'advertising/js/events.js'">), <TextNode: '"></script>\n'>, <TextNode: '\n<script type="text/javas'>, StaticNode(varname=None, path=<FilterExpression "'js/wafa.js'">), <TextNode: '"></script>\n\n'>, <Block Node: extra_js. Contents: [<TextNode: '\n '>, <TextNode: '\n'>]>, <TextNode: '\n<script>\n (function ('>] |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 1005, in <listcomp>
class NodeList(list):
# Set to True the first time a non-TextNode is inserted by
# extend_nodelist().
contains_nontext = False
def render(self, context):
return SafeString("".join([node.render_annotated(context) for node in self]))…
def get_nodes_by_type(self, nodetype):
"Return a list of all nodes of the given type"
nodes = []
for node in self:
nodes.extend(node.get_nodes_by_type(nodetype))
Variable | Value |
---|---|
.0 | <list_iterator object at 0x7fa4ab52eec0> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
node | <Block Node: content. Contents: []> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 966, 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:
# Store the actual node that caused the exception.
if not hasattr(e, "_culprit_node"):
e._culprit_node = self
if (
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | <Block Node: content. Contents: []> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/loader_tags.py
, line 63, in render
push = block = block_context.pop(self.name)
if block is None:
block = self
# Create new block so we can store context without thread-safety issues.
block = type(self)(block.name, block.nodelist)
block.context = context
context["block"] = block
result = block.nodelist.render(context)…
if push is not None:
block_context.push(self.name, push)
return result
def super(self):
if not hasattr(self, "context"):
Variable | Value |
---|---|
block | <Block Node: content. Contents: [<TextNode: '\n '>, <django.template.library.InclusionNode object at 0x7fa4acdcbfd0>, <TextNode: '\n <div class="clear"><'>, <django.template.library.InclusionNode object at 0x7fa4ab72b5d0>, <TextNode: '\n <!-- Page Sub Menu\n'>, <django.template.library.InclusionNode object at 0x7fa4ab894a90>, <TextNode: '\n <!-- #page-menu end '>, <IncludeNode: template=<FilterExpression '"photologue/includes/gallery_filter.html"'>>, <TextNode: '\n <!-- #po'>, <IfNode>, <TextNode: '\n\n </div><!-- '>, <django.template.library.InclusionNode object at 0x7fa4ab8878d0>, <TextNode: '\n'>]> |
block_context | <BlockContext: blocks=defaultdict(<class 'list'>, {'body_class': [<Block Node: body_class. Contents: []>, <Block Node: body_class. Contents: [<TextNode: 'stretched'>]>], 'extra_css': [<Block Node: extra_css. Contents: [<TextNode: '\n '>, <TextNode: '\n '>]>, <Block Node: extra_css. Contents: [<TextNode: '\n\n'>]>], 'content': [<Block Node: content. Contents: []>], 'extra_js': [<Block Node: extra_js. Contents: [<TextNode: '\n '>, <TextNode: '\n'>]>, <Block Node: extra_js. Contents: [<TextNode: '\n <!-- Bootstrap Data '>]>], 'title': [<Block Node: title. Contents: [<TextNode: '\n '>, <IfNode>, <TextNode: '\n '>]>], 'title_suffix': [<Block Node: title_suffix. Contents: [<TextNode: '\n '>, <WithNode>, <TextNode: '\n '>]>]})> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
push | <Block Node: content. Contents: [<TextNode: '\n '>, <django.template.library.InclusionNode object at 0x7fa4acdcbfd0>, <TextNode: '\n <div class="clear"><'>, <django.template.library.InclusionNode object at 0x7fa4ab72b5d0>, <TextNode: '\n <!-- Page Sub Menu\n'>, <django.template.library.InclusionNode object at 0x7fa4ab894a90>, <TextNode: '\n <!-- #page-menu end '>, <IncludeNode: template=<FilterExpression '"photologue/includes/gallery_filter.html"'>>, <TextNode: '\n <!-- #po'>, <IfNode>, <TextNode: '\n\n </div><!-- '>, <django.template.library.InclusionNode object at 0x7fa4ab8878d0>, <TextNode: '\n'>]> |
self | <Block Node: content. Contents: []> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 1005, in render
class NodeList(list):
# Set to True the first time a non-TextNode is inserted by
# extend_nodelist().
contains_nontext = False
def render(self, context):
return SafeString("".join([node.render_annotated(context) for node in self]))…
def get_nodes_by_type(self, nodetype):
"Return a list of all nodes of the given type"
nodes = []
for node in self:
nodes.extend(node.get_nodes_by_type(nodetype))
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | [<TextNode: '\n '>, <django.template.library.InclusionNode object at 0x7fa4acdcbfd0>, <TextNode: '\n <div class="clear"><'>, <django.template.library.InclusionNode object at 0x7fa4ab72b5d0>, <TextNode: '\n <!-- Page Sub Menu\n'>, <django.template.library.InclusionNode object at 0x7fa4ab894a90>, <TextNode: '\n <!-- #page-menu end '>, <IncludeNode: template=<FilterExpression '"photologue/includes/gallery_filter.html"'>>, <TextNode: '\n <!-- #po'>, <IfNode>, <TextNode: '\n\n </div><!-- '>, <django.template.library.InclusionNode object at 0x7fa4ab8878d0>, <TextNode: '\n'>] |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 1005, in <listcomp>
class NodeList(list):
# Set to True the first time a non-TextNode is inserted by
# extend_nodelist().
contains_nontext = False
def render(self, context):
return SafeString("".join([node.render_annotated(context) for node in self]))…
def get_nodes_by_type(self, nodetype):
"Return a list of all nodes of the given type"
nodes = []
for node in self:
nodes.extend(node.get_nodes_by_type(nodetype))
Variable | Value |
---|---|
.0 | <list_iterator object at 0x7fa4ab52ea10> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
node | <IfNode> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 966, 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:
# Store the actual node that caused the exception.
if not hasattr(e, "_culprit_node"):
e._culprit_node = self
if (
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | <IfNode> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/defaulttags.py
, line 322, in render
match = condition.eval(context)
except VariableDoesNotExist:
match = None
else: # else clause
match = True
if match:
return nodelist.render(context)…
return ""
class LoremNode(Node):
def __init__(self, count, method, common):
Variable | Value |
---|---|
condition | (literal <FilterExpression 'latest'>) |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
match | <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]> |
nodelist | [<TextNode: '\n '>, <ForNode: for gallery in latest, tail_len: 3>, <TextNode: '\n '>] |
self | <IfNode> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 1005, in render
class NodeList(list):
# Set to True the first time a non-TextNode is inserted by
# extend_nodelist().
contains_nontext = False
def render(self, context):
return SafeString("".join([node.render_annotated(context) for node in self]))…
def get_nodes_by_type(self, nodetype):
"Return a list of all nodes of the given type"
nodes = []
for node in self:
nodes.extend(node.get_nodes_by_type(nodetype))
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | [<TextNode: '\n '>, <ForNode: for gallery in latest, tail_len: 3>, <TextNode: '\n '>] |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 1005, in <listcomp>
class NodeList(list):
# Set to True the first time a non-TextNode is inserted by
# extend_nodelist().
contains_nontext = False
def render(self, context):
return SafeString("".join([node.render_annotated(context) for node in self]))…
def get_nodes_by_type(self, nodetype):
"Return a list of all nodes of the given type"
nodes = []
for node in self:
nodes.extend(node.get_nodes_by_type(nodetype))
Variable | Value |
---|---|
.0 | <list_iterator object at 0x7fa4ab52f190> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
node | <ForNode: for gallery in latest, tail_len: 3> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 966, 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:
# Store the actual node that caused the exception.
if not hasattr(e, "_culprit_node"):
e._culprit_node = self
if (
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | <ForNode: for gallery in latest, tail_len: 3> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/defaulttags.py
, line 238, in render
unpacked_vars = dict(zip(self.loopvars, item))
pop_context = True
context.update(unpacked_vars)
else:
context[self.loopvars[0]] = item
for node in self.nodelist_loop:
nodelist.append(node.render_annotated(context))…
if pop_context:
# Pop the loop variables pushed on to the context to avoid
# the context ending up in an inconsistent state when other
# tags (e.g., include and with) push data to context.
context.pop()
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
i | 0 |
item | <Gallery: WEST AFRICA FERTILIZER FORUM 2017> |
len_values | 1 |
loop_dict | {'counter': 1, 'counter0': 0, 'first': True, 'last': True, 'parentloop': {}, 'revcounter': 1, 'revcounter0': 0} |
node | <IncludeNode: template=<FilterExpression '"photologue/includes/gallery_sample.html"'>> |
nodelist | ['\n '] |
num_loopvars | 1 |
parentloop | {} |
pop_context | False |
self | <ForNode: for gallery in latest, tail_len: 3> |
unpack | False |
values | <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 966, 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:
# Store the actual node that caused the exception.
if not hasattr(e, "_culprit_node"):
e._culprit_node = self
if (
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | <IncludeNode: template=<FilterExpression '"photologue/includes/gallery_sample.html"'>> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/loader_tags.py
, line 208, in render
template = template.template
values = {
name: var.resolve(context) for name, var in self.extra_context.items()
}
if self.isolated_context:
return template.render(context.new(values))
with context.push(**values):
return template.render(context)…
@register.tag("block")
def do_block(parser, token):
"""
Define a block that can be overridden by child templates.
Variable | Value |
---|---|
cache | {('photologue/includes/gallery_sample.html',): <Template template_string="{% load i18n %}<ar...">} |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | <IncludeNode: template=<FilterExpression '"photologue/includes/gallery_sample.html"'>> |
template | <Template template_string="{% load i18n %}<ar..."> |
template_name | ('photologue/includes/gallery_sample.html',) |
values | {} |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 177, in render
"Display stage -- can be called many times"
with context.render_context.push_state(self):
if context.template is None:
with context.bind_template(self):
context.template_name = self.name
return self._render(context)
else:
return self._render(context)…
def compile_nodelist(self):
"""
Parse and compile the template source into a nodelist. If debug
is True and an exception occurs during parsing, the exception is
annotated with contextual line information where it occurred in the
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | <Template template_string="{% load i18n %}<ar..."> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 167, in _render
def __repr__(self):
return '<%s template_string="%s...">' % (
self.__class__.__qualname__,
self.source[:20].replace("\n", ""),
)
def _render(self, context):
return self.nodelist.render(context)…
def render(self, context):
"Display stage -- can be called many times"
with context.render_context.push_state(self):
if context.template is None:
with context.bind_template(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | <Template template_string="{% load i18n %}<ar..."> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 1005, in render
class NodeList(list):
# Set to True the first time a non-TextNode is inserted by
# extend_nodelist().
contains_nontext = False
def render(self, context):
return SafeString("".join([node.render_annotated(context) for node in self]))…
def get_nodes_by_type(self, nodetype):
"Return a list of all nodes of the given type"
nodes = []
for node in self:
nodes.extend(node.get_nodes_by_type(nodetype))
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | [<django.template.defaulttags.LoadNode object at 0x7fa4ab70d750>, <TextNode: '\n\n<article class="col-md-'>, <Variable Node: gallery.date_added|date:"Y">, <TextNode: ' pf-illustrations">\n <'>, <ForNode: for photo in gallery.sample, tail_len: 7>, <TextNode: '\n </div>\n '>, <ForNode: for photo in gallery.sample, tail_len: 3>, <TextNode: '\n <a href="'>, <Variable Node: gallery.get_absolute_url>, <TextNode: '" class="right-icon"><i\n '>, <Variable Node: gallery.get_absolute_url>, <TextNode: '">'>, <Variable Node: gallery.title>, <TextNode: '</a></h3>\n <span><'>, <django.templatetags.i18n.TranslateNode object at 0x7fa4ab809c90>, <TextNode: '</a>, <a href="#">'>, <Variable Node: gallery.date_added>, <TextNode: '</a></span>\n </div>\n</'>] |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 1005, in <listcomp>
class NodeList(list):
# Set to True the first time a non-TextNode is inserted by
# extend_nodelist().
contains_nontext = False
def render(self, context):
return SafeString("".join([node.render_annotated(context) for node in self]))…
def get_nodes_by_type(self, nodetype):
"Return a list of all nodes of the given type"
nodes = []
for node in self:
nodes.extend(node.get_nodes_by_type(nodetype))
Variable | Value |
---|---|
.0 | <list_iterator object at 0x7fa4ab52da80> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
node | <ForNode: for photo in gallery.sample, tail_len: 7> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 966, 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:
# Store the actual node that caused the exception.
if not hasattr(e, "_culprit_node"):
e._culprit_node = self
if (
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | <ForNode: for photo in gallery.sample, tail_len: 7> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/defaulttags.py
, line 189, in render
def render(self, context):
if "forloop" in context:
parentloop = context["forloop"]
else:
parentloop = {}
with context.push():
values = self.sequence.resolve(context, ignore_failures=True)…
if values is None:
values = []
if not hasattr(values, "__len__"):
values = list(values)
len_values = len(values)
if len_values < 1:
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
parentloop | {'counter': 1, 'counter0': 0, 'first': True, 'last': True, 'parentloop': {}, 'revcounter': 1, 'revcounter0': 0} |
self | <ForNode: for photo in gallery.sample, tail_len: 7> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 715, in resolve
self.filters = filters
self.var = var_obj
self.is_var = isinstance(var_obj, Variable)
def resolve(self, context, ignore_failures=False):
if self.is_var:
try:
obj = self.var.resolve(context)…
except VariableDoesNotExist:
if ignore_failures:
obj = None
else:
string_if_invalid = context.template.engine.string_if_invalid
if string_if_invalid:
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
ignore_failures | True |
self | <FilterExpression 'gallery.sample'> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 847, in resolve
)
self.lookups = tuple(var.split(VARIABLE_ATTRIBUTE_SEPARATOR))
def resolve(self, context):
"""Resolve this variable against a given context."""
if self.lookups is not None:
# We're dealing with a variable that needs to be resolved
value = self._resolve_lookup(context)…
else:
# We're dealing with a literal, so it's already been "resolved"
value = self.literal
if self.translate:
is_safe = isinstance(value, SafeData)
msgid = value.replace("%", "%%")
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
self | <Variable: 'gallery.sample'> |
/app/.heroku/python/lib/python3.11/site-packages/django/template/base.py
, line 914, in _resolve_lookup
if callable(current):
if getattr(current, "do_not_call_in_templates", False):
pass
elif getattr(current, "alters_data", False):
current = context.template.engine.string_if_invalid
else:
try: # method call (assuming no args required)
current = current()…
except TypeError:
try:
signature = inspect.signature(current)
except ValueError: # No signature found.
current = context.template.engine.string_if_invalid
else:
Variable | Value |
---|---|
bit | 'sample' |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'paginator': None, 'page_obj': None, 'is_paginated': False, 'object_list': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'latest': <GalleryQuerySet [<Gallery: WEST AFRICA FERTILIZER FORUM 2017>]>, 'date_list': <GalleryQuerySet [datetime.datetime(2017, 1, 1, 0, 0, tzinfo=zoneinfo.ZoneInfo(key='UTC'))]>, 'view': <photologue.views.GalleryArchiveIndexView object at 0x7fa4ab569890>}] |
current | <bound method Gallery.sample of <Gallery: WEST AFRICA FERTILIZER FORUM 2017>> |
self | <Variable: 'gallery.sample'> |
signature | <Signature (count=None, public=True)> |
template_name | 'photologue/gallery_archive.html' |
/app/.heroku/python/lib/python3.11/site-packages/photologue/models.py
, line 215, in sample
count = SAMPLE_SIZE
if count > self.photo_count():
count = self.photo_count()
if public:
photo_set = self.public()
else:
photo_set = self.photos.filter(sites__id=settings.SITE_ID)
return random.sample(set(photo_set), count)…
def photo_count(self, public=True):
"""Return a count of all the photos in this gallery."""
if public:
return self.public().count()
else:
Variable | Value |
---|---|
count | 5 |
photo_set | <PhotoQuerySet [<Photo: WEST AFRICA FERTILIZER FORUM 2017 0171>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 0155>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 0164>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 0160>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 0158>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9811>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9808>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9804>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9792>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9859>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9828>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9814>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9991>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9993>]> |
public | True |
self | <Gallery: WEST AFRICA FERTILIZER FORUM 2017> |
/app/.heroku/python/lib/python3.11/random.py
, line 436, in sample
# There are other sampling algorithms that do not require
# auxiliary memory, but they were rejected because they made
# too many calls to _randbelow(), making them slower and
# causing them to eat more entropy than necessary.
if not isinstance(population, _Sequence):
raise TypeError("Population must be a sequence. "…
"For dicts or sets, use sorted(d).")
n = len(population)
if counts is not None:
cum_counts = list(_accumulate(counts))
if len(cum_counts) != n:
raise ValueError('The number of counts does not match the population')
Variable | Value |
---|---|
counts | None |
k | 5 |
population | {<Photo: WEST AFRICA FERTILIZER FORUM 2017 9991>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9828>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9814>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9808>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 0158>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9792>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9993>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 0160>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9811>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9804>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 0171>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 9859>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 0155>, <Photo: WEST AFRICA FERTILIZER FORUM 2017 0164>} |
self | <random.Random object at 0x558fb86dd9f0> |
AnonymousUser
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
HTTP_ACCEPT | '*/*' |
HTTP_ACCEPT_ENCODING | 'gzip' |
HTTP_CDN_LOOP | 'cloudflare' |
HTTP_CF_CONNECTING_IP | '54.157.61.194' |
HTTP_CF_IPCOUNTRY | 'US' |
HTTP_CF_RAY | '866c10ad685f396a-IAD' |
HTTP_CF_VISITOR | '{"scheme":"http"}' |
HTTP_CONNECTION | 'close' |
HTTP_CONNECT_TIME | '0' |
HTTP_HOST | 'wafafertilizer.org' |
HTTP_REFERER | 'http://wafafertilizer.org/en/activities_gallery/' |
HTTP_TOTAL_ROUTE_TIME | '0' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_VIA | '1.1 vegur' |
HTTP_X_FORWARDED_FOR | '54.157.61.194, 172.70.38.60' |
HTTP_X_FORWARDED_PORT | '80' |
HTTP_X_FORWARDED_PROTO | 'http' |
HTTP_X_REQUEST_ID | 'ff846bb9-5de1-4ebe-90d3-4bcce174090b' |
HTTP_X_REQUEST_START | '1710836656235' |
PATH_INFO | '/en/activities_gallery/gallery/' |
QUERY_STRING | '' |
RAW_URI | '/en/activities_gallery/gallery/' |
REMOTE_ADDR | '10.1.10.81' |
REMOTE_PORT | '33235' |
REQUEST_METHOD | 'GET' |
SCRIPT_NAME | '' |
SERVER_NAME | '0.0.0.0' |
SERVER_PORT | '12448' |
SERVER_PROTOCOL | 'HTTP/1.1' |
SERVER_SOFTWARE | 'gunicorn/20.1.0' |
gunicorn.socket | <socket.socket fd=11, family=2, type=1, proto=0, laddr=('172.18.140.194', 12448), raddr=('10.1.10.81', 33235)> |
wsgi.errors | <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7fa4ab52feb0> |
wsgi.file_wrapper | <class 'gunicorn.http.wsgi.FileWrapper'> |
wsgi.input | <gunicorn.http.body.Body object at 0x7fa4ab573290> |
wsgi.input_terminated | True |
wsgi.multiprocess | True |
wsgi.multithread | False |
wsgi.run_once | False |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
wafa.settings.production
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | ['.herokuapp.com', 'wafafertilizer.org', 'www.wafafertilizer.org'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'auth.User' |
AWS_ACCESS_KEY_ID | '********************' |
AWS_DEFAULT_ACL | 'public-read' |
AWS_S3_CUSTOM_DOMAIN | 'wafa-assets.s3.amazonaws.com' |
AWS_SECRET_ACCESS_KEY | '********************' |
AWS_STORAGE_BUCKET_NAME | 'wafa-assets' |
BASE_DIR | '/app' |
BASE_URL | 'http://wafafertilizer.org' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
COMPRESSORS | {'css': 'compressor.css.CssCompressor', 'js': 'compressor.js.JsCompressor'} |
COMPRESS_CACHEABLE_PRECOMPILERS | () |
COMPRESS_CACHE_BACKEND | 'default' |
COMPRESS_CACHE_KEY_FUNCTION | '********************' |
COMPRESS_CLEAN_CSS_ARGUMENTS | '' |
COMPRESS_CLEAN_CSS_BINARY | 'cleancss' |
COMPRESS_CLOSURE_COMPILER_ARGUMENTS | '' |
COMPRESS_CLOSURE_COMPILER_BINARY | 'java -jar compiler.jar' |
COMPRESS_CSS_HASHING_METHOD | 'mtime' |
COMPRESS_DATA_URI_MAX_SIZE | 1024 |
COMPRESS_DEBUG_TOGGLE | None |
COMPRESS_ENABLED | False |
COMPRESS_FILTERS | {'css': ['compressor.filters.css_default.CssAbsoluteFilter', 'compressor.filters.cssmin.rCSSMinFilter'], 'js': ['compressor.filters.jsmin.rJSMinFilter']} |
COMPRESS_JINJA2_GET_ENVIRONMENT | <function CompressorConf.JINJA2_GET_ENVIRONMENT at 0x7fa4ad901260> |
COMPRESS_MINT_DELAY | 30 |
COMPRESS_MTIME_DELAY | 10 |
COMPRESS_OFFLINE | False |
COMPRESS_OFFLINE_CONTEXT | {'STATIC_URL': '/static/'} |
COMPRESS_OFFLINE_MANIFEST | 'manifest.json' |
COMPRESS_OFFLINE_MANIFEST_STORAGE | 'compressor.storage.OfflineManifestFileStorage' |
COMPRESS_OFFLINE_TIMEOUT | 31536000 |
COMPRESS_OUTPUT_DIR | 'CACHE' |
COMPRESS_PARSER | 'compressor.parser.AutoSelectParser' |
COMPRESS_PRECOMPILERS | () |
COMPRESS_REBUILD_TIMEOUT | 2592000 |
COMPRESS_ROOT | '/app/static' |
COMPRESS_STORAGE | 'compressor.storage.CompressorFileStorage' |
COMPRESS_TEMPLATE_FILTER_CONTEXT | {'STATIC_URL': '/static/'} |
COMPRESS_URL | '/static/' |
COMPRESS_URL_PLACEHOLDER | '/__compressor_url_placeholder__/' |
COMPRESS_VERBOSE | False |
COMPRESS_YUGLIFY_BINARY | 'yuglify' |
COMPRESS_YUGLIFY_CSS_ARGUMENTS | '--terminal' |
COMPRESS_YUGLIFY_JS_ARGUMENTS | '--terminal' |
COMPRESS_YUI_BINARY | 'java -jar yuicompressor.jar' |
COMPRESS_YUI_CSS_ARGUMENTS | '' |
COMPRESS_YUI_JS_ARGUMENTS | '' |
CONTACT_EMAIL | '[email protected]' |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_MASKED | False |
CSRF_COOKIE_NAME | 'csrftoken' |
CSRF_COOKIE_PATH | '/' |
CSRF_COOKIE_SAMESITE | 'Lax' |
CSRF_COOKIE_SECURE | False |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | [] |
CSRF_USE_SESSIONS | False |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_HEALTH_CHECKS': False, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.postgresql', 'HOST': 'ec2-54-82-205-3.compute-1.amazonaws.com', 'NAME': 'd1rbqs08m45ccq', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': 5432, 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIGRATE': True, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'ygbjnbsztnysno'}} |
DATABASE_ROUTERS | [] |
DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS | 1000 |
DATETIME_FORMAT | 'N j, Y, P' |
DATETIME_INPUT_FORMATS | ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M'] |
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_AUTO_FIELD | 'django.db.models.AutoField' |
DEFAULT_CHARSET | 'utf-8' |
DEFAULT_EXCEPTION_REPORTER | 'django.views.debug.ExceptionReporter' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
DEFAULT_FILE_STORAGE | 'storages.backends.s3boto3.S3Boto3Storage' |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | 'smtp.wafafertilizer.org' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | '[email protected]' |
EMAIL_PORT | '587' |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_LOCALTIME | False |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | False |
EVENT_AS_PLUGIN | True |
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 | 420 |
FILE_UPLOAD_TEMP_DIR | None |
FIRST_DAY_OF_WEEK | 0 |
FIXTURE_DIRS | [] |
FORCE_SCRIPT_NAME | None |
FORMAT_MODULE_PATH | None |
FORM_RENDERER | 'django.forms.renderers.DjangoTemplates' |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ['wagtail.contrib.forms', 'wagtail.contrib.redirects', 'wagtail.embeds', 'wagtail.sites', 'wagtail.users', 'wagtail.snippets', 'wagtail.documents', 'wagtail.images', 'wagtail.search', 'wagtail.admin', 'wagtail', 'wagtail.contrib.sitemaps', 'wagtail.contrib.routable_page', 'compressor', 'modelcluster', 'django_social_share', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'location_field.apps.DefaultConfig', 'puput', 'contact', 'home', 'search', 'wafa', 'event', 'taggit', 'storages', 'advertising', 'photologue', 'sortedm2m'] |
INTERNAL_IPS | [] |
LANGUAGES | (('fr', 'Français'), ('en', 'English')) |
LANGUAGES_BIDI | ['he', 'ar', 'ar-dz', 'fa', 'ur'] |
LANGUAGE_CODE | 'en' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_HTTPONLY | False |
LANGUAGE_COOKIE_NAME | 'django_language' |
LANGUAGE_COOKIE_PATH | '/' |
LANGUAGE_COOKIE_SAMESITE | None |
LANGUAGE_COOKIE_SECURE | False |
LOCALE_PATHS | ('/app/locale/',) |
LOCATION_FIELD | {'map.provider': 'google', 'map.zoom': 13, 'provider.google.api': '********************', 'provider.google.api_key': '********************', 'provider.google.map_type': 'ROADMAP', 'provider.mapbox.access_token': '********************', 'provider.mapbox.id': 'mapbox.streets', 'provider.mapbox.max_zoom': 18, 'provider.openstreetmap.max_zoom': 18, 'resources.media': {'js': ['/static/location_field/js/form.js']}, 'resources.root_path': '/static/location_field', 'search.provider': 'google', 'search.suffix': ''} |
LOGGING | {} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGIN_URL | '/accounts/login/' |
LOGOUT_REDIRECT_URL | None |
MANAGERS | [] |
MEDIA_ROOT | '/app/media' |
MEDIA_URL | 'https://wafa-assets.s3.amazonaws.com/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | ['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.middleware.security.SecurityMiddleware', 'wagtail.contrib.legacy.sitemiddleware.SiteMiddleware', 'wagtail.contrib.redirects.middleware.RedirectMiddleware', 'whitenoise.middleware.WhiteNoiseMiddleware', 'django.middleware.locale.LocaleMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT | '********************' |
PREPEND_WWW | False |
PROJECT_DIR | '/app/wafa' |
PUPUT_AS_PLUGIN | True |
ROOT_URLCONF | 'wafa.urls' |
SECRET_KEY | '********************' |
SECRET_KEY_FALLBACKS | '********************' |
SECURE_CONTENT_TYPE_NOSNIFF | True |
SECURE_CROSS_ORIGIN_OPENER_POLICY | 'same-origin' |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
SECURE_HSTS_PRELOAD | False |
SECURE_HSTS_SECONDS | 0 |
SECURE_PROXY_SSL_HEADER | None |
SECURE_REDIRECT_EXEMPT | [] |
SECURE_REFERRER_POLICY | 'same-origin' |
SECURE_SSL_HOST | None |
SECURE_SSL_REDIRECT | False |
SERVER_EMAIL | 'root@localhost' |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_AGE | 1209600 |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_HTTPONLY | True |
SESSION_COOKIE_NAME | 'sessionid' |
SESSION_COOKIE_PATH | '/' |
SESSION_COOKIE_SAMESITE | 'Lax' |
SESSION_COOKIE_SECURE | False |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
SESSION_FILE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | False |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'wafa.settings.production' |
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 | ['/app/wafa/static'] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/app/static' |
STATIC_URL | '/static/' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/app/wafa/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']}}] |
TEMPLATE_CONTEXT_PROCESSORS | ('django.core.context_processors.request',) |
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_DEPRECATED_PYTZ | False |
USE_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | True |
USE_X_FORWARDED_HOST | False |
USE_X_FORWARDED_PORT | False |
WAGTAIL_SITE_NAME | 'wafa' |
WSGI_APPLICATION | 'wafa.wsgi.application' |
X_FRAME_OPTIONS | 'DENY' |
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.