'NoneType' object has no attribute 'contest_id'
Request Method: | GET |
---|---|
Request URL: | http://baloti.org/en/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2 |
Django Version: | 3.2.7 |
Exception Type: | AttributeError |
Exception Value: | 'NoneType' object has no attribute 'contest_id' |
Exception Location: | /home/baloti/baloti/baloti_djelectionguard/templatetags/contest_results.py, line 14, in displayBalotiResult |
Python Executable: | /home/baloti/baloti/venv/bin/python |
Python Version: | 3.9.5 |
Python Path: | ['/home/baloti/baloti', '/usr/lib/python39.zip', '/usr/lib/python3.9', '/usr/lib/python3.9/lib-dynload', '/home/baloti/baloti/venv/lib/python3.9/site-packages'] |
Server time: | Thu, 28 Mar 2024 14:04:13 +0000 |
In template /home/baloti/baloti/baloti_djelectionguard/templates/layout/base.html
, error at line 0
1 | <!DOCTYPE html> |
---|---|
2 | <html lang="en"> |
3 | {% load i18n %} |
4 | {% load static %} |
5 | {% load sass_tags %} |
6 | |
7 | <head> |
8 | <meta property="fb:app_id" content="480123580439004" /> |
9 | <meta property="og:image" content="https://uat.baloti.org/static/images/thumbnail.png"/> |
10 | <meta property="og:type" content="website"> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/asgiref/sync.py
, line 482, in thread_handler
parent_set = True
# Run the function
try:
# If we have an exception, run the function inside the except block
# after raising it so exc_info is correctly populated.
if exc_info[1]:
try:
raise exc_info[1]…
except BaseException:
return func(*args, **kwargs)
else:
return func(*args, **kwargs)
finally:
# Only delete the launch_map parent if we set it, otherwise it is
Variable | Value |
---|---|
args | (functools.partial(<function response_for_exception at 0x7fa06ec46b80>, <ASGIRequest: GET '/en/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2'>, AttributeError("'NoneType' object has no attribute 'contest_id'")),) |
current_thread | <Thread(asyncio_5, started daemon 140326218229504)> |
exc_info | (<class 'AttributeError'>, AttributeError("'NoneType' object has no attribute 'contest_id'"), <traceback object at 0x7f9ff8ea5700>) |
func | <built-in method run of Context object at 0x7f9ff84e4840> |
kwargs | {} |
loop | <_UnixSelectorEventLoop running=True closed=False debug=False> |
parent_set | True |
self | <asgiref.sync.SyncToAsync object at 0x7f9ff91ed910> |
source_task | <Task pending name='Task-337718' coro=<StaticFilesWrapper.__call__() running at /home/baloti/baloti/venv/lib/python3.9/site-packages/channels/staticfiles.py:44> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/lib/python3.9/asyncio/futures.py:384, <TaskWakeupMethWrapper object at 0x7f9ff8431490>()]>> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/core/handlers/exception.py
, line 38, in inner
no middleware leaks an exception and that the next middleware in the stack
can rely on getting a response instead of an exception.
"""
if asyncio.iscoroutinefunction(get_response):
@wraps(get_response)
async def inner(request):
try:
response = await get_response(request)…
except Exception as exc:
response = await sync_to_async(response_for_exception, thread_sensitive=False)(request, exc)
return response
return inner
else:
@wraps(get_response)
Variable | Value |
---|---|
exc | AttributeError("'NoneType' object has no attribute 'contest_id'") |
get_response | <bound method BaseHandler._get_response_async of <django.core.handlers.asgi.ASGIHandler object at 0x7fa06c43d8b0>> |
request | <ASGIRequest: GET '/en/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2'> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/core/handlers/base.py
, line 233, in _get_response_async
if response is None:
wrapped_callback = self.make_view_atomic(callback)
# If it is a synchronous view, run it in a subthread
if not asyncio.iscoroutinefunction(wrapped_callback):
wrapped_callback = sync_to_async(wrapped_callback, thread_sensitive=True)
try:
response = await wrapped_callback(request, *callback_args, **callback_kwargs)…
except Exception as e:
response = await sync_to_async(
self.process_exception_by_middleware,
thread_sensitive=True,
)(e, request)
if response is None:
Variable | Value |
---|---|
callback | <function BalotiContestResultView at 0x7fa067a3f9d0> |
callback_args | () |
callback_kwargs | {'id': 'afa5a224-9e20-4d84-b3f0-8bf744aa05a2'} |
middleware_method | <asgiref.sync.SyncToAsync object at 0x7fa067704130> |
request | <ASGIRequest: GET '/en/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2'> |
response | None |
self | <django.core.handlers.asgi.ASGIHandler object at 0x7fa06c43d8b0> |
wrapped_callback | <asgiref.sync.SyncToAsync object at 0x7f9ff91edaf0> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/asgiref/sync.py
, line 444, in __call__
self.get_current_task(),
sys.exc_info(),
func,
*args,
**kwargs,
),
)
ret = await asyncio.wait_for(future, timeout=None)…
finally:
if contextvars is not None:
_restore_context(context)
if self.deadlock_context:
self.deadlock_context.set(False)
Variable | Value |
---|---|
args | (functools.partial(<function BalotiContestResultView at 0x7fa067a3f9d0>, <ASGIRequest: GET '/en/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2'>, id='afa5a224-9e20-4d84-b3f0-8bf744aa05a2'),) |
child | functools.partial(<function BalotiContestResultView at 0x7fa067a3f9d0>, <ASGIRequest: GET '/en/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2'>, id='afa5a224-9e20-4d84-b3f0-8bf744aa05a2') |
context | <Context object at 0x7f9ff86cb9c0> |
executor | <concurrent.futures.thread.ThreadPoolExecutor object at 0x7fa0728c7580> |
func | <built-in method run of Context object at 0x7f9ff86cb9c0> |
future | <Future finished exception=AttributeError("'NoneType' object has no attribute 'contest_id'")> |
kwargs | {} |
loop | <_UnixSelectorEventLoop running=True closed=False debug=False> |
self | <asgiref.sync.SyncToAsync object at 0x7f9ff91edaf0> |
/usr/lib/python3.9/asyncio/tasks.py
, line 442, in wait_for
loop = events.get_running_loop()
else:
warnings.warn("The loop argument is deprecated since Python 3.8, "
"and scheduled for removal in Python 3.10.",
DeprecationWarning, stacklevel=2)
if timeout is None:
return await fut…
if timeout <= 0:
fut = ensure_future(fut, loop=loop)
if fut.done():
return fut.result()
Variable | Value |
---|---|
fut | <Future finished exception=AttributeError("'NoneType' object has no attribute 'contest_id'")> |
loop | <_UnixSelectorEventLoop running=True closed=False debug=False> |
timeout | None |
/usr/lib/python3.9/concurrent/futures/thread.py
, line 52, in run
self.kwargs = kwargs
def run(self):
if not self.future.set_running_or_notify_cancel():
return
try:
result = self.fn(*self.args, **self.kwargs)…
except BaseException as exc:
self.future.set_exception(exc)
# Break a reference cycle with the exception 'exc'
self = None
else:
self.future.set_result(result)
Variable | Value |
---|---|
self | None |
/home/baloti/baloti/venv/lib/python3.9/site-packages/asgiref/sync.py
, line 486, in thread_handler
# after raising it so exc_info is correctly populated.
if exc_info[1]:
try:
raise exc_info[1]
except BaseException:
return func(*args, **kwargs)
else:
return func(*args, **kwargs)…
finally:
# Only delete the launch_map parent if we set it, otherwise it is
# from someone else.
if parent_set:
del self.launch_map[current_thread]
Variable | Value |
---|---|
args | (functools.partial(<function BalotiContestResultView at 0x7fa067a3f9d0>, <ASGIRequest: GET '/en/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2'>, id='afa5a224-9e20-4d84-b3f0-8bf744aa05a2'),) |
current_thread | <Thread(ThreadPoolExecutor-0_0, started daemon 140326905472768)> |
exc_info | (None, None, None) |
func | <built-in method run of Context object at 0x7f9ff86cb9c0> |
kwargs | {} |
loop | <_UnixSelectorEventLoop running=True closed=False debug=False> |
parent_set | True |
self | <asgiref.sync.SyncToAsync object at 0x7f9ff91edaf0> |
source_task | <Task pending name='Task-337718' coro=<StaticFilesWrapper.__call__() running at /home/baloti/baloti/venv/lib/python3.9/site-packages/channels/staticfiles.py:44> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/lib/python3.9/asyncio/futures.py:384, <TaskWakeupMethWrapper object at 0x7f9ff8431490>()]>> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/views/generic/base.py
, line 70, in view
self = cls(**initkwargs)
self.setup(request, *args, **kwargs)
if not hasattr(self, 'request'):
raise AttributeError(
"%s instance has no 'request' attribute. Did you override "
"setup() and forget to call super()?" % cls.__name__
)
return self.dispatch(request, *args, **kwargs)…
view.view_class = cls
view.view_initkwargs = initkwargs
# take name and docstring from class
update_wrapper(view, cls, updated=())
Variable | Value |
---|---|
args | () |
cls | <class 'baloti_djelectionguard.views.BalotiContestResultView'> |
initkwargs | {} |
kwargs | {'id': 'afa5a224-9e20-4d84-b3f0-8bf744aa05a2'} |
request | <ASGIRequest: GET '/en/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2'> |
self | <baloti_djelectionguard.views.BalotiContestResultView object at 0x7f9ff8431fd0> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/views/generic/base.py
, line 98, in dispatch
# Try to dispatch to the right method; if a method doesn't exist,
# defer to the error handler. Also defer to the error handler if the
# request method isn't on the approved list.
if request.method.lower() in self.http_method_names:
handler = getattr(self, request.method.lower(), self.http_method_not_allowed)
else:
handler = self.http_method_not_allowed
return handler(request, *args, **kwargs)…
def http_method_not_allowed(self, request, *args, **kwargs):
logger.warning(
'Method Not Allowed (%s): %s', request.method, request.path,
extra={'status_code': 405, 'request': request}
)
Variable | Value |
---|---|
args | () |
handler | <bound method BalotiContestResultView.get of <baloti_djelectionguard.views.BalotiContestResultView object at 0x7f9ff8431fd0>> |
kwargs | {'id': 'afa5a224-9e20-4d84-b3f0-8bf744aa05a2'} |
request | <ASGIRequest: GET '/en/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2'> |
self | <baloti_djelectionguard.views.BalotiContestResultView object at 0x7f9ff8431fd0> |
/home/baloti/baloti/baloti_djelectionguard/views.py
, line 269, in get
id: Contest UID
Returns:
html : returns contest_results.html html file
"""
current_language = get_language()
contest = Contesti18n.objects.filter(contest_id=id, language__iso=current_language).first()
return render(request, 'contest_results.html',{"contest": contest})…
class BalotiContestChoicesView(TemplateView):
"""
Contest Choices View
"""
Variable | Value |
---|---|
contest | None |
current_language | 'en' |
id | 'afa5a224-9e20-4d84-b3f0-8bf744aa05a2' |
request | <ASGIRequest: GET '/en/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2'> |
self | <baloti_djelectionguard.views.BalotiContestResultView object at 0x7f9ff8431fd0> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/shortcuts.py
, line 19, in render
def render(request, template_name, context=None, content_type=None, status=None, using=None):
"""
Return a HttpResponse whose content is filled with the result of calling
django.template.loader.render_to_string() with the passed arguments.
"""
content = loader.render_to_string(template_name, context, request, using=using)…
return HttpResponse(content, content_type, status)
def redirect(to, *args, permanent=False, **kwargs):
"""
Return an HttpResponseRedirect to the appropriate URL for the arguments
Variable | Value |
---|---|
content_type | None |
context | {'contest': None} |
request | <ASGIRequest: GET '/en/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2'> |
status | None |
template_name | 'contest_results.html' |
using | None |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/template/loader.py
, line 62, in render_to_string
template_name may be a string or a list of strings.
"""
if isinstance(template_name, (list, tuple)):
template = select_template(template_name, using=using)
else:
template = get_template(template_name, using=using)
return template.render(context, request)…
def _engine_list(using=None):
return engines.all() if using is None else [engines[using]]
Variable | Value |
---|---|
context | {'contest': None} |
request | <ASGIRequest: GET '/en/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2'> |
template | <django.template.backends.django.Template object at 0x7f9ff85ea1c0> |
template_name | 'contest_results.html' |
using | None |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/template/backends/django.py
, line 61, 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}, {}, {}, {'contest': None}] |
request | <ASGIRequest: GET '/en/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2'> |
self | <django.template.backends.django.Template object at 0x7f9ff85ea1c0> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/template/base.py
, line 170, 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}, {}, {}, {'contest': None}] |
self | <django.template.base.Template object at 0x7f9ff8693670> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/test/utils.py
, line 100, in instrumented_test_render
def instrumented_test_render(self, context):
"""
An instrumented Template render method, providing a signal that can be
intercepted by the test Client.
"""
template_rendered.send(sender=self, template=self, context=context)
return self.nodelist.render(context)…
class _TestState:
pass
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'contest': None}] |
self | <django.template.base.Template object at 0x7f9ff8693670> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/template/base.py
, line 938, in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)…
else:
bit = node
bits.append(str(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bits | [] |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'contest': None}] |
node | <ExtendsNode: extends 'layout/base.html'> |
self | [<ExtendsNode: extends 'layout/base.html'>] |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/template/base.py
, line 905, in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)…
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.render_context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'contest': None}] |
self | <ExtendsNode: extends 'layout/base.html'> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/template/loader_tags.py
, line 150, in render
compiled_parent.nodelist.get_nodes_by_type(BlockNode)}
block_context.add_blocks(blocks)
break
# Call Template._render explicitly so the parser context stays
# the same.
with context.render_context.push_state(compiled_parent, isolated_context=False):
return compiled_parent._render(context)…
class IncludeNode(Node):
context_key = '__include_context'
def __init__(self, template, *args, extra_context=None, isolated_context=False, **kwargs):
Variable | Value |
---|---|
block_context | <django.template.loader_tags.BlockContext object at 0x7f9ff8a57610> |
blocks | {'body': <Block Node: body. Contents: [<TextNode: '\n '>]>} |
compiled_parent | <django.template.base.Template object at 0x7f9ff8693040> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'contest': None}] |
node | <django.template.defaulttags.LoadNode object at 0x7f9ff8562460> |
self | <ExtendsNode: extends 'layout/base.html'> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/test/utils.py
, line 100, in instrumented_test_render
def instrumented_test_render(self, context):
"""
An instrumented Template render method, providing a signal that can be
intercepted by the test Client.
"""
template_rendered.send(sender=self, template=self, context=context)
return self.nodelist.render(context)…
class _TestState:
pass
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'contest': None}] |
self | <django.template.base.Template object at 0x7f9ff8693040> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/template/base.py
, line 938, in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)…
else:
bit = node
bits.append(str(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | '\n <!-- End of Topbar -->\n \n ' |
bits | ['<!DOCTYPE html>\n<html lang="en">\n', '', '\n', '', '\n', '', '\n' '\n' '<head>\n' ' <meta property="fb:app_id" content="480123580439004" />\n' ' <meta property="og:image" ' 'content="https://uat.baloti.org/static/images/thumbnail.png"/>\n' ' <meta property="og:type" content="website">\n' ' <meta property="og:description" content="Baloti Voting webiste">\n' " <meta property='og:url' content='https://uat.baloti.org//baloti/'/>\n" " <meta property='og:title' content='Baloti'/>\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.0">\n' ' <title>baloti</title>\n' ' <meta name="description" content="Baloti Voting webiste">\n' ' <!-- <meta property="og:locale" content="en_US" />\n' ' <meta property="og:locale:alternate" content="fr_CH" /> -->\n' ' \n' ' <link rel="stylesheet" type="text/css" href="', '/static/baloti_djelectionguard/css/main.css', '">\n <!-- <link href="', '/static/baloti_djelectionguard/scss/main.css', '" rel="stylesheet" type="text/css" /> -->\n' ' <script src="/static/js/jquery-3.5.1.min.js"></script>\n' ' <script src="/static/js/slick.min.js"></script>\n' ' <script src="/static/js/bootstrap.bundle.min.js"></script>\n' ' <script src="/static/js/chart.min.js"></script>\n' ' <script src="/static/js/app-main.js"></script>\n' ' <script src="/static/js/app-common.js"></script>\n' '</head>\n' '\n' '<body>\n' ' <div class="app">\n' ' <!-- Topbar -->\n' ' ', '\n' '\n' '\n' '\n' '\n' '<header class="app-header">\n' ' <div class="app-header__wrapper d-flex align-items-center">\n' ' <a href=/en/baloti/ class="app-logo">\n' ' <img src="/static/images/logo.svg" alt="">\n' ' </a>\n' ' <ul class="app-header-nav main list-unstyled d-flex ' 'align-items-center ml-auto">\n' ' <li>\n' ' <div class="dropdown">\n' ' \n' ' <a style="text-transform:uppercase" class="dropdown-toggle" ' 'href="#" role="button" data-bs-toggle="dropdown" ' 'aria-expanded="false">EN</a>\n' '\n' ' <ul class="dropdown-menu dropdown-menu--device ' 'dropdown-menu-end">\n' ' <div class="dropdown-menu__header">\n' ' <span class="dropdown-menu__title">Languages</span>\n' ' <span class="app-icon icon-close-bold ' 'm-pointer"></span>\n' ' </div>\n' ' \n' ' \n' ' \n' ' \n' ' \n' ' \n' ' <li>\n' ' <a id="de" class="dropdown-item" ' 'href="/de/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2">German</a>\n' ' </li>\n' ' \n' ' \n' ' \n' ' \n' ' <li>\n' ' <a id="fr" class="dropdown-item" ' 'href="/fr/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2">French</a>\n' ' </li>\n' ' \n' ' \n' ' \n' ' \n' ' <li>\n' ' <a id="es" class="dropdown-item" ' 'href="/es/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2">Spanish</a>\n' ' </li>\n' ' \n' ' \n' ' \n' ' \n' ' <li>\n' ' <a id="zh" class="dropdown-item" ' 'href="/zh/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2">Chinese</a>\n' ' </li>\n' ' \n' ' \n' ' \n' ' \n' ' <li>\n' ' <a id="uk" class="dropdown-item" ' 'hre… <trimmed 9754 bytes string> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'contest': None}] |
node | <Block Node: body. Contents: [<TextNode: '\n '>]> |
self | [<TextNode: '<!DOCTYPE html>\n<html lan'>, <django.template.defaulttags.LoadNode object at 0x7f9ff8562460>, <TextNode: '\n'>, <django.template.defaulttags.LoadNode object at 0x7f9ff8562850>, <TextNode: '\n'>, <django.template.defaulttags.LoadNode object at 0x7f9ff85623a0>, <TextNode: '\n\n<head>\n <meta proper'>, <django.templatetags.static.StaticNode object at 0x7f9ff85f8400>, <TextNode: '">\n <!-- <link href="'>, <sass_processor.templatetags.sass_tags.SassSrcNode object at 0x7f9ff85f8fa0>, <TextNode: '" rel="stylesheet" type="'>, <django.template.loader_tags.IncludeNode object at 0x7f9ff85f8520>, <TextNode: '\n <!-- End of Topb'>, <Block Node: body. Contents: [<TextNode: '\n '>]>, <TextNode: '\n\n <!-- Footer -->'>, <django.template.loader_tags.IncludeNode object at 0x7f9ff85f8250>, <TextNode: '\n <!-- End of Foot'>] |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/template/base.py
, line 905, in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)…
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.render_context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'contest': None}] |
self | <Block Node: body. Contents: [<TextNode: '\n '>]> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/template/loader_tags.py
, line 62, 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: body. Contents: [<TextNode: '\n'>, <django.template.defaulttags.LoadNode object at 0x7f9ff8708be0>, <TextNode: '\n\n\n<section class="app-el'>, <django.template.defaulttags.URLNode object at 0x7f9ff8708250>, <TextNode: '> <span class="app-icon i'>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff87084c0>, <TextNode: '</a>\n <div class="'>, <Variable Node: contest>, <TextNode: '</h4>\n </div>\n'>, <django.template.library.SimpleNode object at 0x7f9ff84de580>, <TextNode: '\n '>, <django.template.library.SimpleNode object at 0x7f9ff84de160>, <TextNode: '\n\n <div cl'>, <IfNode>, <TextNode: '\n </div>\n '>, <IfNode>, <TextNode: '\n\n\n '>, <IfNode>, <TextNode: '\n\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff85405e0>, <TextNode: ' '>, <Variable Node: result.1|unlocalize>, <TextNode: '%</li>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff85401f0>, <TextNode: ' '>, <Variable Node: result.0|unlocalize>, <TextNode: '%</li>\n '>, <IfNode>, <TextNode: '\n '>, <IfNode>, <TextNode: '\n '>, <Variable Node: govt_result.1|unlocalize>, <TextNode: '%</li>\n '>, <Variable Node: govt_result.0|unlocalize>, <TextNode: '%</li>\n '>, <IfNode>, <TextNode: '\n </div>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84b0070>, <TextNode: '</button>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84b0f10>, <TextNode: '</button>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84b0550>, <TextNode: '</button>\n '>, <django.template.library.SimpleNode object at 0x7f9ff84b0c10>, <TextNode: '\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84b03a0>, <TextNode: '</p>\n '>, <Variable Node: result.0>, <TextNode: '</p>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff89c5070>, <TextNode: '</p>\n '>, <Variable Node: result.1>, <TextNode: '</p>\n '>, <Variable Node: contest.about>, <TextNode: '\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff8ef1640>, <TextNode: '</p>\n '>, <Variable Node: contest.infavour_arguments|safe>, <TextNode: '</p>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff8ef1dc0>, <TextNode: '</p>\n '>, <Variable Node: contest.against_arguments|safe>, <TextNode: '</p>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f2280>, <TextNode: '</p>\n '>, <ForNode: for i in contest.contest_id.id|getInfavourRecommenders, tail_len: 7>, <TextNode: '\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f2040>, <TextNode: '</p>\n '>, <ForNode: for i in contest.contest_id.id|getAgainstRecommenders, tail_len: 7>, <TextNode: '\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f0040>, <TextNode: '</span></button>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f0880>, <TextNode: '</span></li>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f0760>, <TextNode: '</span></li>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f09d0>, <TextNode: '</span></li>\n '>]> |
block_context | <django.template.loader_tags.BlockContext object at 0x7f9ff8a57610> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'contest': None}] |
push | <Block Node: body. Contents: [<TextNode: '\n'>, <django.template.defaulttags.LoadNode object at 0x7f9ff8708be0>, <TextNode: '\n\n\n<section class="app-el'>, <django.template.defaulttags.URLNode object at 0x7f9ff8708250>, <TextNode: '> <span class="app-icon i'>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff87084c0>, <TextNode: '</a>\n <div class="'>, <Variable Node: contest>, <TextNode: '</h4>\n </div>\n'>, <django.template.library.SimpleNode object at 0x7f9ff84de580>, <TextNode: '\n '>, <django.template.library.SimpleNode object at 0x7f9ff84de160>, <TextNode: '\n\n <div cl'>, <IfNode>, <TextNode: '\n </div>\n '>, <IfNode>, <TextNode: '\n\n\n '>, <IfNode>, <TextNode: '\n\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff85405e0>, <TextNode: ' '>, <Variable Node: result.1|unlocalize>, <TextNode: '%</li>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff85401f0>, <TextNode: ' '>, <Variable Node: result.0|unlocalize>, <TextNode: '%</li>\n '>, <IfNode>, <TextNode: '\n '>, <IfNode>, <TextNode: '\n '>, <Variable Node: govt_result.1|unlocalize>, <TextNode: '%</li>\n '>, <Variable Node: govt_result.0|unlocalize>, <TextNode: '%</li>\n '>, <IfNode>, <TextNode: '\n </div>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84b0070>, <TextNode: '</button>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84b0f10>, <TextNode: '</button>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84b0550>, <TextNode: '</button>\n '>, <django.template.library.SimpleNode object at 0x7f9ff84b0c10>, <TextNode: '\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84b03a0>, <TextNode: '</p>\n '>, <Variable Node: result.0>, <TextNode: '</p>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff89c5070>, <TextNode: '</p>\n '>, <Variable Node: result.1>, <TextNode: '</p>\n '>, <Variable Node: contest.about>, <TextNode: '\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff8ef1640>, <TextNode: '</p>\n '>, <Variable Node: contest.infavour_arguments|safe>, <TextNode: '</p>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff8ef1dc0>, <TextNode: '</p>\n '>, <Variable Node: contest.against_arguments|safe>, <TextNode: '</p>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f2280>, <TextNode: '</p>\n '>, <ForNode: for i in contest.contest_id.id|getInfavourRecommenders, tail_len: 7>, <TextNode: '\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f2040>, <TextNode: '</p>\n '>, <ForNode: for i in contest.contest_id.id|getAgainstRecommenders, tail_len: 7>, <TextNode: '\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f0040>, <TextNode: '</span></button>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f0880>, <TextNode: '</span></li>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f0760>, <TextNode: '</span></li>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f09d0>, <TextNode: '</span></li>\n '>]> |
self | <Block Node: body. Contents: [<TextNode: '\n '>]> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/template/base.py
, line 938, in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)…
else:
bit = node
bits.append(str(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | ('</h4>\n' ' </div>\n' ' <div class="app-progress">\n' ' ') |
bits | ['\n', '', '\n' '\n' '\n' '<section class="app-elections app-body-bg">\n' ' <div class="container">\n' ' <a class="btn btn-link btn-back" href=', '/en/baloti/contest/list/', '> <span class="app-icon icon-arrow-right"></span>', 'Referendum Votes', '</a>\n' ' <div class="app-votedetail">\n' ' <div class="app-election__head text-center">\n' ' <h4 class="app-title app-title--sm">', 'None', '</h4>\n' ' </div>\n' ' <div class="app-progress">\n' ' '] |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'contest': None}] |
node | <django.template.library.SimpleNode object at 0x7f9ff84de580> |
self | [<TextNode: '\n'>, <django.template.defaulttags.LoadNode object at 0x7f9ff8708be0>, <TextNode: '\n\n\n<section class="app-el'>, <django.template.defaulttags.URLNode object at 0x7f9ff8708250>, <TextNode: '> <span class="app-icon i'>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff87084c0>, <TextNode: '</a>\n <div class="'>, <Variable Node: contest>, <TextNode: '</h4>\n </div>\n'>, <django.template.library.SimpleNode object at 0x7f9ff84de580>, <TextNode: '\n '>, <django.template.library.SimpleNode object at 0x7f9ff84de160>, <TextNode: '\n\n <div cl'>, <IfNode>, <TextNode: '\n </div>\n '>, <IfNode>, <TextNode: '\n\n\n '>, <IfNode>, <TextNode: '\n\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff85405e0>, <TextNode: ' '>, <Variable Node: result.1|unlocalize>, <TextNode: '%</li>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff85401f0>, <TextNode: ' '>, <Variable Node: result.0|unlocalize>, <TextNode: '%</li>\n '>, <IfNode>, <TextNode: '\n '>, <IfNode>, <TextNode: '\n '>, <Variable Node: govt_result.1|unlocalize>, <TextNode: '%</li>\n '>, <Variable Node: govt_result.0|unlocalize>, <TextNode: '%</li>\n '>, <IfNode>, <TextNode: '\n </div>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84b0070>, <TextNode: '</button>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84b0f10>, <TextNode: '</button>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84b0550>, <TextNode: '</button>\n '>, <django.template.library.SimpleNode object at 0x7f9ff84b0c10>, <TextNode: '\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84b03a0>, <TextNode: '</p>\n '>, <Variable Node: result.0>, <TextNode: '</p>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff89c5070>, <TextNode: '</p>\n '>, <Variable Node: result.1>, <TextNode: '</p>\n '>, <Variable Node: contest.about>, <TextNode: '\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff8ef1640>, <TextNode: '</p>\n '>, <Variable Node: contest.infavour_arguments|safe>, <TextNode: '</p>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff8ef1dc0>, <TextNode: '</p>\n '>, <Variable Node: contest.against_arguments|safe>, <TextNode: '</p>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f2280>, <TextNode: '</p>\n '>, <ForNode: for i in contest.contest_id.id|getInfavourRecommenders, tail_len: 7>, <TextNode: '\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f2040>, <TextNode: '</p>\n '>, <ForNode: for i in contest.contest_id.id|getAgainstRecommenders, tail_len: 7>, <TextNode: '\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f0040>, <TextNode: '</span></button>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f0880>, <TextNode: '</span></li>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f0760>, <TextNode: '</span></li>\n '>, <django.templatetags.i18n.TranslateNode object at 0x7f9ff84f09d0>, <TextNode: '</span></li>\n '>] |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/template/base.py
, line 905, in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)…
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.render_context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'contest': None}] |
self | <django.template.library.SimpleNode object at 0x7f9ff84de580> |
/home/baloti/baloti/venv/lib/python3.9/site-packages/django/template/library.py
, line 192, in render
def __init__(self, func, takes_context, args, kwargs, target_var):
super().__init__(func, takes_context, args, kwargs)
self.target_var = target_var
def render(self, context):
resolved_args, resolved_kwargs = self.get_resolved_arguments(context)
output = self.func(*resolved_args, **resolved_kwargs)…
if self.target_var is not None:
context[self.target_var] = output
return ''
if context.autoescape:
output = conditional_escape(output)
return output
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'contest': None}] |
resolved_args | [None, <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7f9ff856ef70>>] |
resolved_kwargs | {} |
self | <django.template.library.SimpleNode object at 0x7f9ff84de580> |
/home/baloti/baloti/baloti_djelectionguard/templatetags/contest_results.py
, line 14, in displayBalotiResult
register = template.Library()
@register.simple_tag
def displayBalotiResult(contest, user):
current_language = get_language()
language = Language.objects.filter(iso=current_language).first()
contest = contest.contest_id…
votes = contest.candidate_set.aggregate(total=Sum('score'))
yes = 0
no = 0
yes_score = 0
no_score = 0
for i, yes_candidate in enumerate(contest.candidate_set.filter(candidate_type='yes').order_by('-score')):
Variable | Value |
---|---|
contest | None |
current_language | 'en' |
language | None |
user | <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7f9ff856ef70>> |
AnonymousUser
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
HTTP_ACCEPT | '*/*' |
HTTP_CONNECTION | 'close' |
HTTP_HOST | 'baloti' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_X_FORWARDED_FOR | '3.235.227.36' |
HTTP_X_FORWARDED_HOST | 'baloti.org' |
HTTP_X_FORWARDED_PROTO | 'https' |
HTTP_X_FORWARDED_SSL | 'on' |
HTTP_X_REAL_IP | '3.235.227.36' |
PATH_INFO | '/en/baloti/contest/result/afa5a224-9e20-4d84-b3f0-8bf744aa05a2' |
QUERY_STRING | '' |
REMOTE_ADDR | '127.0.0.1' |
REMOTE_HOST | '127.0.0.1' |
REMOTE_PORT | 33642 |
REQUEST_METHOD | 'GET' |
SCRIPT_NAME | '' |
SERVER_NAME | '127.0.0.1' |
SERVER_PORT | '8000' |
wsgi.multiprocess | True |
wsgi.multithread | True |
electis.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ACCOUNT_ACTIVATION_DAYS | 7 |
ADMINS | [] |
ADMINS_EMAIL | [] |
ALLOWED_HOSTS | ['*'] |
APPEND_SLASH | True |
ASGI_APPLICATION | 'electeez_common.asgi.application' |
AUTHENTICATION_BACKENDS | ['social_core.backends.google.GoogleOAuth2', 'social_core.backends.facebook.FacebookOAuth2', 'django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'electeez_auth.User' |
BASE_DIR | PosixPath('/home/baloti/baloti') |
BASE_URL | 'https://baloti.org:8000' |
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_SAMESITE | 'Lax' |
CSRF_COOKIE_SECURE | False |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | [] |
CSRF_USE_SESSIONS | False |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.postgresql', 'HOST': None, 'NAME': 'electeez_live', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIGRATE': True, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': None}} |
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 | 'baloti.org' |
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 | 'django.core.files.storage.FileSystemStorage' |
DEFAULT_FROM_EMAIL | 'pitsbalotitest@gmail.com' |
DEFAULT_HASHING_ALGORITHM | 'sha256' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
DJBLOCKCHAIN | {'TEZOS_CONTRACTS': 'djelectionguard_tezos/tezos'} |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | 'smtp.gmail.com' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | 'pitsbalotitest@gmail.com' |
EMAIL_PORT | '587' |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_LOCALTIME | False |
EMAIL_USE_SSL | None |
EMAIL_USE_TLS | 'True' |
ENVIRONMENT | 'baloti.org' |
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.TemplatesSetting' |
HOST | 'baloti.org:8000' |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ['sass_processor', 'electeez_common', 'electeez_auth', 'django.contrib.admin', 'django.contrib.sites', 'electeez_sites', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'djtezos', 'djcall', 'djlang', 'djelectionguard', 'djelectionguard_tezos', 'djelectionguard_tracker', 'django_registration', 'django_extensions', 'django_jinja', 'channels', 'django.forms', 'ryzom', 'py2js', 'ryzom_django', 'ryzom_django_mdc', 'social_django', 'ckeditor', 'baloti_auth', 'baloti_djelectionguard', 'electis'] |
INTERNAL_IPS | [] |
IPFS_ENABLED | True |
IPFS_URL | 'localhost:5001' |
LANGUAGES | (('en', 'English'), ('de', 'German'), ('fr', 'French'), ('es', 'Spanish'), ('zh', 'Chinese'), ('uk', 'Ukrainian'), ('ja', 'Japanese'), ('ru', 'Russian'), ('id', 'Indonesian'), ('pl', 'Polish')) |
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 | ('/home/baloti/baloti/locale',) |
LOGGERS | ('django.request', 'djcall', 'daphne', 'electionguard') |
LOGGING | {'disable_existing_loggers': False, 'formatters': {'timestamp': {'format': '%(asctime)s %(message)s'}}, 'handlers': {'console': {'class': 'logging.StreamHandler', 'level': 'DEBUG'}, 'daphne.debug': {'class': 'logging.handlers.WatchedFileHandler', 'filename': '/home/baloti/baloti/log/daphne.debug.log', 'formatter': 'timestamp', 'level': 'DEBUG'}, 'daphne.error': {'class': 'logging.handlers.WatchedFileHandler', 'filename': '/home/baloti/baloti/log/daphne.error.log', 'formatter': 'timestamp', 'level': 'ERROR'}, 'daphne.info': {'class': 'logging.handlers.WatchedFileHandler', 'filename': '/home/baloti/baloti/log/daphne.info.log', 'formatter': 'timestamp', 'level': 'INFO'}, 'django.request.debug': {'class': 'logging.handlers.WatchedFileHandler', 'filename': '/home/baloti/baloti/log/django.request.debug.log', 'formatter': 'timestamp', 'level': 'DEBUG'}, 'django.request.error': {'class': 'logging.handlers.WatchedFileHandler', 'filename': '/home/baloti/baloti/log/django.request.error.log', 'formatter': 'timestamp', 'level': 'ERROR'}, 'django.request.info': {'class': 'logging.handlers.WatchedFileHandler', 'filename': '/home/baloti/baloti/log/django.request.info.log', 'formatter': 'timestamp', 'level': 'INFO'}, 'djcall.debug': {'class': 'logging.handlers.WatchedFileHandler', 'filename': '/home/baloti/baloti/log/djcall.debug.log', 'formatter': 'timestamp', 'level': 'DEBUG'}, 'djcall.error': {'class': 'logging.handlers.WatchedFileHandler', 'filename': '/home/baloti/baloti/log/djcall.error.log', 'formatter': 'timestamp', 'level': 'ERROR'}, 'djcall.info': {'class': 'logging.handlers.WatchedFileHandler', 'filename': '/home/baloti/baloti/log/djcall.info.log', 'formatter': 'timestamp', 'level': 'INFO'}, 'electionguard.debug': {'class': 'logging.handlers.WatchedFileHandler', 'filename': '/home/baloti/baloti/log/electionguard.debug.log', 'formatter': 'timestamp', 'level': 'DEBUG'}, 'electionguard.error': {'class': 'logging.handlers.WatchedFileHandler', 'filename': '/home/baloti/baloti/log/electionguard.error.log', 'formatter': 'timestamp', 'level': 'ERROR'}, 'electionguard.info': {'class': 'logging.handlers.WatchedFileHandler', 'filename': '/home/baloti/baloti/log/electionguard.info.log', 'formatter': 'timestamp', 'level': 'INFO'}}, 'loggers': {'daphne': {'handlers': ['console', 'daphne.debug', 'daphne.info', 'daphne.error'], 'level': 'DEBUG'}, 'django.request': {'handlers': ['console', 'django.request.debug', 'django.request.info', 'django.request.error'], 'level': 'DEBUG'}, 'djcall': {'handlers': ['console', 'djcall.debug', 'djcall.info', 'djcall.error'], 'level': 'DEBUG'}, 'electionguard': {'handlers': ['console', 'electionguard.debug', 'electionguard.info', 'electionguard.error'], 'level': 'DEBUG'}}, 'version': 1} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/electis' |
LOGIN_URL | '/accounts/login/' |
LOGOUT_REDIRECT_URL | None |
LOG_DIR | '/home/baloti/baloti/log' |
MANAGERS | [] |
MEDIA_ROOT | PosixPath('/home/baloti/baloti/media') |
MEDIA_URL | '/media/' |
MEMCACHED_HOST | '127.0.0.1:11211' |
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', 'django.middleware.locale.LocaleMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
PROTO | 'https' |
REGISTRATION_OPEN | True |
ROOT_URLCONF | 'electeez_common.urls' |
RYZOM_TEMPLATE_BACKEND | {'BACKEND': 'ryzom_django.template_backend.Ryzom', 'OPTIONS': {'app_dirname': 'components', 'components_module': 'ryzom.components.muicss', 'components_prefix': 'Mui', 'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django.template.context_processors.i18n']}} |
SASS_PROCESSOR_ROOT | PosixPath('/home/baloti/baloti/public/baloti_djelectionguard') |
SECRET_KEY | '********************' |
SECURE | False |
SECURE_BROWSER_XSS_FILTER | False |
SECURE_CONTENT_TYPE_NOSNIFF | True |
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 |
SENTRY_DSN | None |
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 | 'electis.settings' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
SITE_ID | 1 |
SITE_NAME | 'baloti_djelectionguard' |
SOCIAL_AUTH_FACEBOOK_AUTH_EXTRA_ARGUMENTS | {} |
SOCIAL_AUTH_FACEBOOK_KEY | '********************' |
SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS | {'fields': 'id, name, email, age_range'} |
SOCIAL_AUTH_FACEBOOK_SCOPE | ['email'] |
SOCIAL_AUTH_FACEBOOK_SECRET | '********************' |
SOCIAL_AUTH_GOOGLE_OAUTH2_AUTH_EXTRA_ARGUMENTS | {} |
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY | '********************' |
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET | '********************' |
SOCIAL_AUTH_PIPELINE | ('social_core.pipeline.social_auth.social_details', 'social_core.pipeline.social_auth.social_uid', 'social_core.pipeline.social_auth.auth_allowed', 'social_core.pipeline.social_auth.social_user', 'baloti_auth.pipeline.user.get_username', 'social_core.pipeline.social_auth.associate_by_email', 'social_core.pipeline.user.create_user', 'social_core.pipeline.social_auth.associate_user', 'social_core.pipeline.social_auth.load_extra_data', 'social_core.pipeline.user.user_details') |
SOCIAL_AUTH_REDIRECT_IS_HTTPS | 'True' |
SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL | True |
SOCIAL_AUTH_USER_FIELDS | ['email'] |
SOCIAL_AUTH_USER_MODEL | 'electeez_auth.User' |
STATICFILES_DIRS | [PosixPath('/home/baloti/baloti/electis/static'), PosixPath('/home/baloti/baloti/static'), PosixPath('/home/baloti/baloti/baloti_djelectionguard/static')] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'sass_processor.finders.CssFinder', 'electeez_common.finders.StaticRootFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_HOME_PAGE | 'landing/index.html' |
STATIC_ROOT | PosixPath('/home/baloti/baloti/public/baloti_djelectionguard') |
STATIC_URL | '/static/baloti_djelectionguard/' |
TEMPLATES | [{'BACKEND': 'ryzom_django.template_backend.Ryzom', 'OPTIONS': {'app_dirname': 'components', 'components_module': 'ryzom.components.muicss', 'components_prefix': 'Mui', 'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django.template.context_processors.i18n']}}, {'BACKEND': 'django.template.backends.jinja2.Jinja2', 'DIRS': [PosixPath('/home/baloti/baloti/templates')], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.template.context_processors.i18n', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages'], 'environment': 'electeez_common.settings.jinja2'}}, {'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], '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'] |
TEMPLATE_LOADERS | ('django.template.loaders.app_directories.load_template_source',) |
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_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | True |
USE_X_FORWARDED_HOST | True |
USE_X_FORWARDED_PORT | False |
WSGI_APPLICATION | 'electeez_common.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.