Could not parse the remainder: '=' from '='
Request Method: | GET |
---|---|
Request URL: | https://cognious.com/news/search |
Django Version: | 3.2 |
Exception Type: | TemplateSyntaxError |
Exception Value: | Could not parse the remainder: '=' from '=' |
Exception Location: | /usr/local/lib/python3.8/dist-packages/django/template/base.py, line 662, in __init__ |
Python Executable: | /usr/bin/python3 |
Python Version: | 3.8.10 |
Python Path: | ['/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/tarunpaul/.local/lib/python3.8/site-packages', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages', '/home/tarunpaul/www/cognious'] |
Server time: | Thu, 28 Mar 2024 14:24:48 +0530 |
In template /home/tarunpaul/www/cognious/website/templates/website/news_search.html
, error at line 140
130 | {% else %} |
---|---|
131 | Hide related coverage <span class="glyphicon glyphicon-chevron-up"></span> |
132 | {% endif %} |
133 | </div> |
134 | <br> |
135 | {% if article.related_articles %} |
136 | <div id="{{ article.unique_id }}_coverage" {% if article.hide_related %}style="display:none;"{% endif%}> |
137 | <div class="mt10"><b>Possible related coverage:</b> ({{ article.related_articles_count }})</div> |
138 | {% endif %} |
139 | {% for post in article.related_articles %} |
140 | {% if forloop.counter = 4 %} |
141 | <hr class="mt5 mb5"> |
142 | <div class="color-light-red italic text-really-small"> |
143 | <div id="{{ article.unique_id }}_full_text_top" class="pull-left">Showing 3 of {{ article.related_articles_count }} related articles</div> |
144 | <div id="{{ article.unique_id }}_full" class="pull-right pointer full-coverage"> |
145 | Show full coverage <span class="glyphicon glyphicon-chevron-down"></span> |
146 | </div> |
147 | </div> |
148 | <div id="{{ article.unique_id }}_full_c" style="display:none;" class="mt30"> |
149 | {% endif %} |
150 | {% if forloop.counter %} |
/usr/local/lib/python3.8/dist-packages/django/template/smartif.py
, line 175, in translate_token
self.tokens = mapped_tokens
self.pos = 0
self.current_token = self.next_token()
def translate_token(self, token):
try:
op = OPERATORS[token]…
except (KeyError, TypeError):
return self.create_var(token)
else:
return op()
def next_token(self):
Variable | Value |
---|---|
self | <django.template.defaulttags.TemplateIfParser object at 0x7f3dae339ca0> |
token | '=' |
/usr/local/lib/python3.8/dist-packages/django/core/handlers/exception.py
, line 47, in inner
response = await sync_to_async(response_for_exception, thread_sensitive=False)(request, exc)
return response
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 | TemplateSyntaxError("Could not parse the remainder: '=' from '='") |
get_response | <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7f3daed2bb20>> |
request | <WSGIRequest: GET '/news/search'> |
/usr/local/lib/python3.8/dist-packages/django/core/handlers/base.py
, line 181, in _get_response
if response is None:
wrapped_callback = self.make_view_atomic(callback)
# If it is an asynchronous view, run it in a subthread.
if asyncio.iscoroutinefunction(wrapped_callback):
wrapped_callback = async_to_sync(wrapped_callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)…
except Exception as e:
response = self.process_exception_by_middleware(e, request)
if response is None:
raise
# Complain if the view returned None (a common error).
Variable | Value |
---|---|
callback | <function search at 0x7f3daea23c10> |
callback_args | () |
callback_kwargs | {} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f3daece4850>> |
request | <WSGIRequest: GET '/news/search'> |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f3daed2bb20> |
wrapped_callback | <function search at 0x7f3daea23c10> |
/home/tarunpaul/www/cognious/news/views.py
, line 289, in search
for article in articles:
article.source_name = News.get_source_host(article)
data['articles'] = articles
if search or newstype or todate or fromdate:
data['searchnote'] = 'Found ' + str(len(articles)) + ' articles.'
data['search'] = search or ''
return render(request, "website/news_search.html", data)…
def index(request):
return HttpResponseRedirect('/news/dashboard')
def subscribe(request):
Variable | Value |
---|---|
articles | [] |
data | {'articles': [], 'blogposts': <QuerySet [<Blog: Vaccine Availability Alert>, <Blog: Chennai Floods and Terrain Analysis>, <Blog: Getting Started>]>, 'fromdate': '2024-03-27', 'hasapplication': False, 'isloggedin': False, 'paypal_sandbox': False, 's_daterange': 'today', 's_newstype': 'world', 'search': '', 'todate': '2024-03-28'} |
daterange | None |
fromdate | None |
newstype | None |
request | <WSGIRequest: GET '/news/search'> |
search | None |
todate | None |
today | datetime.datetime(2024, 3, 28, 14, 24, 48, 433750) |
yesterday | datetime.datetime(2024, 3, 27, 14, 24, 48, 433750) |
/usr/local/lib/python3.8/dist-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 | {'articles': [], 'blogposts': <QuerySet [<Blog: Vaccine Availability Alert>, <Blog: Chennai Floods and Terrain Analysis>, <Blog: Getting Started>]>, 'fromdate': '2024-03-27', 'hasapplication': False, 'isloggedin': False, 'paypal_sandbox': False, 's_daterange': 'today', 's_newstype': 'world', 'search': '', 'todate': '2024-03-28'} |
request | <WSGIRequest: GET '/news/search'> |
status | None |
template_name | 'website/news_search.html' |
using | None |
/usr/local/lib/python3.8/dist-packages/django/template/loader.py
, line 61, in render_to_string
Load a template and render it with a context. Return a 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 | {'articles': [], 'blogposts': <QuerySet [<Blog: Vaccine Availability Alert>, <Blog: Chennai Floods and Terrain Analysis>, <Blog: Getting Started>]>, 'fromdate': '2024-03-27', 'hasapplication': False, 'isloggedin': False, 'paypal_sandbox': False, 's_daterange': 'today', 's_newstype': 'world', 'search': '', 'todate': '2024-03-28'} |
request | <WSGIRequest: GET '/news/search'> |
template_name | 'website/news_search.html' |
using | None |
/usr/local/lib/python3.8/dist-packages/django/template/loader.py
, line 15, in get_template
Raise TemplateDoesNotExist if no such template exists.
"""
chain = []
engines = _engine_list(using)
for engine in engines:
try:
return engine.get_template(template_name)…
except TemplateDoesNotExist as e:
chain.append(e)
raise TemplateDoesNotExist(template_name, chain=chain)
Variable | Value |
---|---|
chain | [] |
engine | <django.template.backends.django.DjangoTemplates object at 0x7f3daea2b8e0> |
engines | [<django.template.backends.django.DjangoTemplates object at 0x7f3daea2b8e0>] |
template_name | 'website/news_search.html' |
using | None |
/usr/local/lib/python3.8/dist-packages/django/template/backends/django.py
, line 34, in get_template
self.engine = Engine(self.dirs, self.app_dirs, **options)
def from_string(self, template_code):
return Template(self.engine.from_string(template_code), self)
def get_template(self, template_name):
try:
return Template(self.engine.get_template(template_name), self)…
except TemplateDoesNotExist as exc:
reraise(exc, self)
def get_templatetag_libraries(self, custom_libraries):
"""
Return a collation of template tag libraries from installed
Variable | Value |
---|---|
self | <django.template.backends.django.DjangoTemplates object at 0x7f3daea2b8e0> |
template_name | 'website/news_search.html' |
/usr/local/lib/python3.8/dist-packages/django/template/engine.py
, line 143, in get_template
return Template(template_code, engine=self)
def get_template(self, template_name):
"""
Return a compiled Template object for the given template name,
handling template inheritance recursively.
"""
template, origin = self.find_template(template_name)…
if not hasattr(template, 'render'):
# template needs to be compiled
template = Template(template, origin, template_name, engine=self)
return template
def render_to_string(self, template_name, context=None):
Variable | Value |
---|---|
self | <django.template.engine.Engine object at 0x7f3daea2b3d0> |
template_name | 'website/news_search.html' |
/usr/local/lib/python3.8/dist-packages/django/template/engine.py
, line 125, in find_template
raise ImproperlyConfigured(
"Invalid value in template loaders configuration: %r" % loader)
def find_template(self, name, dirs=None, skip=None):
tried = []
for loader in self.template_loaders:
try:
template = loader.get_template(name, skip=skip)…
return template, template.origin
except TemplateDoesNotExist as e:
tried.extend(e.tried)
raise TemplateDoesNotExist(name, tried=tried)
def from_string(self, template_code):
Variable | Value |
---|---|
dirs | None |
loader | <django.template.loaders.app_directories.Loader object at 0x7f3dae9d2b80> |
name | 'website/news_search.html' |
self | <django.template.engine.Engine object at 0x7f3daea2b3d0> |
skip | None |
tried | [] |
/usr/local/lib/python3.8/dist-packages/django/template/loaders/base.py
, line 29, in get_template
try:
contents = self.get_contents(origin)
except TemplateDoesNotExist:
tried.append((origin, 'Source does not exist'))
continue
else:
return Template(…
contents, origin, origin.template_name, self.engine,
)
raise TemplateDoesNotExist(template_name, tried=tried)
def get_template_sources(self, template_name):
Variable | Value |
---|---|
contents | ('{% extends "website/base_account.html" %}\n' '{% load static %}\n' '\n' '{% block title %}Cognious - News (Search){% endblock %}\n' '{% block description %}Comprehensive up-to-date news aggregated from sources ' 'all over the world by Cognious News{% endblock %}\n' '\n' '{% block head %}\n' ' {{ block.super }}\n' ' <script src="{% static \'js/news_search.js\' %}"></script>\n' '{% endblock %}\n' '\n' '{% block javascript %}\n' ' {{ block.super }}\n' '{% endblock %}\n' '\n' '{% block sidebar %}\n' ' <h3>News</h3>\n' ' <hr>\n' ' <ul>\n' ' <li><a {% if newstype == \'dashboard\' %}class="active-li"{% endif %} ' 'href="{% url \'news:index\' %}">Dashboard</a></li>\n' ' <li><a {% if newstype == \'world\' %}class="active-li"{% endif %} ' 'href="{% url \'news:type\' \'world\' %}">World</a></li>\n' ' <li><a {% if newstype == \'india\' %}class="active-li"{% endif %} ' 'href="{% url \'news:type\' \'india\' %}">India</a></li>\n' ' <li><a {% if newstype == \'technology\' %}class="active-li"{% endif %} ' 'href="{% url \'news:type\' \'technology\' %}">Technology</a></li>\n' ' <li><a {% if newstype == \'business\' %}class="active-li"{% endif %} ' 'href="{% url \'news:type\' \'business\' %}">Business</a></li>\n' ' <li><a {% if newstype == \'entertainment\' %}class="active-li"{% endif ' '%} href="{% url \'news:type\' \'entertainment\' %}">Entertainment</a></li>\n' ' <li><a class="active-li" href="{% url \'news:search\' ' '%}">Search</a></li>\n' ' <li><a href="{% url \'news:subscribe\' %}">Subscribe</a></li>\n' ' </ul>\n' '{% endblock %}\n' '\n' '{% block content %}\n' '{{ block.super }}\n' '<div class="container col-sm-12"><!-- container -->\n' ' <h3>Search</h3>\n' ' <div class="form-left pt20 mb20 col-sm-12">\n' ' <form>\n' ' <div class="form-group">\n' ' <div class="form-label">Enter text:</div>\n' ' <div class="col-sm-12">\n' ' <input type="textbox" name="q" class="mt5 col-sm-6" value="{{ ' 'search }}"></input>\n' ' </div> \n' ' </div>\n' ' <div class="form-group">\n' ' <div class="row col-sm-12">\n' ' <div class="radio-inline">\n' ' <label><input class="widthauto" type="radio" name="type" ' 'value="world" {% if s_newstype == \'world\'%}checked{% endif ' '%}>World</label>\n' ' </div>\n' ' <div class="radio-inline">\n' ' <label><input class="widthauto" type="radio" name="type" ' 'value="india" {% if s_newstype == \'india\'%}checked{% endif ' '%}>India</label>\n' ' </div>\n' ' <div class="radio-inline">\n' ' <label><input class="widthauto" type="radio" name="type" ' 'value="technology" {% if s_newstype == \'technology\'%}checked{% endif ' '%}>Technology</label>\n' ' </div>\n' ' <div class="radio-inline">\n' ' <label><input class="widthauto" type="radio" name="type" ' 'value="business" {% if s_newstype == \'business\'%}checked{% endif ' '%}>Business</label>\n' ' </div>\n' ' <div class="radio-inline">\n' ' <label><input class="widthauto" type="radio" name="type" ' 'value="entertainment" {% if s_newstype == \'entertainment\'%}checked{% endif ' '%}>Entertainment</label>\n' ' </div>\n' ' </div>\n' ' </div>\n' ' \n' ' <div class="form-group">\n' ' <div class="row col-sm-12">\n' ' <div class="radio-inline">\n' ' <label><input class="search-daterange widthauto" name="daterange" ' 'value="today" type="radio" {% if s_daterange == \'today\'%}checked{% endif ' '%}>Today</label>\n' ' </div>\n' ' <div class="radio-inline">\n' ' <label><input class="search-daterange widthauto" name="daterange" ' 'value="last5days" type="radio" {% if s_daterange == \'last5days\'%}checked{% ' 'endif %}>Last 5 days</label>\n' ' </div>\n' ' <div class="radio-inline">\n' ' <label><input class="search-daterange widthauto" name="daterange" ' 'value="last30days" type="radio" {%… <trimmed 10704 bytes string> |
origin | <django.template.base.Origin object at 0x7f3dae78a3a0> |
self | <django.template.loaders.app_directories.Loader object at 0x7f3dae9d2b80> |
skip | None |
template_name | 'website/news_search.html' |
tried | [(<django.template.base.Origin object at 0x7f3dae78a0d0>, 'Source does not exist'), (<django.template.base.Origin object at 0x7f3dae78a940>, 'Source does not exist')] |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 155, in __init__
engine = Engine.get_default()
if origin is None:
origin = Origin(UNKNOWN_SOURCE)
self.name = name
self.origin = origin
self.engine = engine
self.source = str(template_string) # May be lazy.
self.nodelist = self.compile_nodelist()…
def __iter__(self):
for node in self.nodelist:
yield from node
def _render(self, context):
Variable | Value |
---|---|
engine | <django.template.engine.Engine object at 0x7f3daea2b3d0> |
name | 'website/news_search.html' |
origin | <django.template.base.Origin object at 0x7f3dae78a3a0> |
self | <django.template.base.Template object at 0x7f3dae78a520> |
template_string | ('{% extends "website/base_account.html" %}\n' '{% load static %}\n' '\n' '{% block title %}Cognious - News (Search){% endblock %}\n' '{% block description %}Comprehensive up-to-date news aggregated from sources ' 'all over the world by Cognious News{% endblock %}\n' '\n' '{% block head %}\n' ' {{ block.super }}\n' ' <script src="{% static \'js/news_search.js\' %}"></script>\n' '{% endblock %}\n' '\n' '{% block javascript %}\n' ' {{ block.super }}\n' '{% endblock %}\n' '\n' '{% block sidebar %}\n' ' <h3>News</h3>\n' ' <hr>\n' ' <ul>\n' ' <li><a {% if newstype == \'dashboard\' %}class="active-li"{% endif %} ' 'href="{% url \'news:index\' %}">Dashboard</a></li>\n' ' <li><a {% if newstype == \'world\' %}class="active-li"{% endif %} ' 'href="{% url \'news:type\' \'world\' %}">World</a></li>\n' ' <li><a {% if newstype == \'india\' %}class="active-li"{% endif %} ' 'href="{% url \'news:type\' \'india\' %}">India</a></li>\n' ' <li><a {% if newstype == \'technology\' %}class="active-li"{% endif %} ' 'href="{% url \'news:type\' \'technology\' %}">Technology</a></li>\n' ' <li><a {% if newstype == \'business\' %}class="active-li"{% endif %} ' 'href="{% url \'news:type\' \'business\' %}">Business</a></li>\n' ' <li><a {% if newstype == \'entertainment\' %}class="active-li"{% endif ' '%} href="{% url \'news:type\' \'entertainment\' %}">Entertainment</a></li>\n' ' <li><a class="active-li" href="{% url \'news:search\' ' '%}">Search</a></li>\n' ' <li><a href="{% url \'news:subscribe\' %}">Subscribe</a></li>\n' ' </ul>\n' '{% endblock %}\n' '\n' '{% block content %}\n' '{{ block.super }}\n' '<div class="container col-sm-12"><!-- container -->\n' ' <h3>Search</h3>\n' ' <div class="form-left pt20 mb20 col-sm-12">\n' ' <form>\n' ' <div class="form-group">\n' ' <div class="form-label">Enter text:</div>\n' ' <div class="col-sm-12">\n' ' <input type="textbox" name="q" class="mt5 col-sm-6" value="{{ ' 'search }}"></input>\n' ' </div> \n' ' </div>\n' ' <div class="form-group">\n' ' <div class="row col-sm-12">\n' ' <div class="radio-inline">\n' ' <label><input class="widthauto" type="radio" name="type" ' 'value="world" {% if s_newstype == \'world\'%}checked{% endif ' '%}>World</label>\n' ' </div>\n' ' <div class="radio-inline">\n' ' <label><input class="widthauto" type="radio" name="type" ' 'value="india" {% if s_newstype == \'india\'%}checked{% endif ' '%}>India</label>\n' ' </div>\n' ' <div class="radio-inline">\n' ' <label><input class="widthauto" type="radio" name="type" ' 'value="technology" {% if s_newstype == \'technology\'%}checked{% endif ' '%}>Technology</label>\n' ' </div>\n' ' <div class="radio-inline">\n' ' <label><input class="widthauto" type="radio" name="type" ' 'value="business" {% if s_newstype == \'business\'%}checked{% endif ' '%}>Business</label>\n' ' </div>\n' ' <div class="radio-inline">\n' ' <label><input class="widthauto" type="radio" name="type" ' 'value="entertainment" {% if s_newstype == \'entertainment\'%}checked{% endif ' '%}>Entertainment</label>\n' ' </div>\n' ' </div>\n' ' </div>\n' ' \n' ' <div class="form-group">\n' ' <div class="row col-sm-12">\n' ' <div class="radio-inline">\n' ' <label><input class="search-daterange widthauto" name="daterange" ' 'value="today" type="radio" {% if s_daterange == \'today\'%}checked{% endif ' '%}>Today</label>\n' ' </div>\n' ' <div class="radio-inline">\n' ' <label><input class="search-daterange widthauto" name="daterange" ' 'value="last5days" type="radio" {% if s_daterange == \'last5days\'%}checked{% ' 'endif %}>Last 5 days</label>\n' ' </div>\n' ' <div class="radio-inline">\n' ' <label><input class="search-daterange widthauto" name="daterange" ' 'value="last30days" type="radio" {%… <trimmed 10704 bytes string> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 193, in compile_nodelist
tokens = lexer.tokenize()
parser = Parser(
tokens, self.engine.template_libraries, self.engine.template_builtins,
self.origin,
)
try:
return parser.parse()…
except Exception as e:
if self.engine.debug:
e.template_debug = self.get_exception_info(e, e.token)
raise
def get_exception_info(self, exception, token):
Variable | Value |
---|---|
lexer | <django.template.base.DebugLexer object at 0x7f3dae78a370> |
parser | <django.template.base.Parser object at 0x7f3dae78e790> |
self | <django.template.base.Template object at 0x7f3dae78a520> |
tokens | [<django.template.base.Token object at 0x7f3dae78ac40>, <django.template.base.Token object at 0x7f3dae78ab50>, <django.template.base.Token object at 0x7f3dae78aa60>, <django.template.base.Token object at 0x7f3dae78a190>, <django.template.base.Token object at 0x7f3dae78aa90>, <django.template.base.Token object at 0x7f3dae78adf0>, <django.template.base.Token object at 0x7f3dae78aca0>, <django.template.base.Token object at 0x7f3dae78a070>, <django.template.base.Token object at 0x7f3dae78a130>, <django.template.base.Token object at 0x7f3dae78a340>, <django.template.base.Token object at 0x7f3dae78ad00>, <django.template.base.Token object at 0x7f3dae78aee0>, <django.template.base.Token object at 0x7f3dae78a1c0>, <django.template.base.Token object at 0x7f3dae78a700>, <django.template.base.Token object at 0x7f3dae78a6d0>, <django.template.base.Token object at 0x7f3dae78a850>, <django.template.base.Token object at 0x7f3dae78ae80>, <django.template.base.Token object at 0x7f3dae78abb0>, <django.template.base.Token object at 0x7f3dae78ab80>, <django.template.base.Token object at 0x7f3dae78a2b0>, <django.template.base.Token object at 0x7f3dae78a5e0>, <django.template.base.Token object at 0x7f3dae78ac10>, <django.template.base.Token object at 0x7f3dae78aac0>, <django.template.base.Token object at 0x7f3dae994340>, <django.template.base.Token object at 0x7f3dae9941c0>, <django.template.base.Token object at 0x7f3dae994220>, <django.template.base.Token object at 0x7f3dae994bb0>, <django.template.base.Token object at 0x7f3dae994040>, <django.template.base.Token object at 0x7f3dae9943d0>, <django.template.base.Token object at 0x7f3dae994d00>, <django.template.base.Token object at 0x7f3dae994f10>, <django.template.base.Token object at 0x7f3dae9941f0>, <django.template.base.Token object at 0x7f3dae994b80>, <django.template.base.Token object at 0x7f3dae9949a0>, <django.template.base.Token object at 0x7f3dae9949d0>, <django.template.base.Token object at 0x7f3dae994940>, <django.template.base.Token object at 0x7f3dae994be0>, <django.template.base.Token object at 0x7f3dae994100>, <django.template.base.Token object at 0x7f3dae994130>, <django.template.base.Token object at 0x7f3dae9948b0>, <django.template.base.Token object at 0x7f3dae994dc0>, <django.template.base.Token object at 0x7f3dae994c70>, <django.template.base.Token object at 0x7f3dae994cd0>, <django.template.base.Token object at 0x7f3dae994e80>, <django.template.base.Token object at 0x7f3dae994af0>, <django.template.base.Token object at 0x7f3dae994070>, <django.template.base.Token object at 0x7f3dae9943a0>, <django.template.base.Token object at 0x7f3dae994910>, <django.template.base.Token object at 0x7f3dae9942e0>, <django.template.base.Token object at 0x7f3dae3bc730>, <django.template.base.Token object at 0x7f3dae3bc5e0>, <django.template.base.Token object at 0x7f3dae3bc490>, <django.template.base.Token object at 0x7f3dae3bc4c0>, <django.template.base.Token object at 0x7f3dae3bc3d0>, <django.template.base.Token object at 0x7f3dae3bc100>, <django.template.base.Token object at 0x7f3dae3bc7c0>, <django.template.base.Token object at 0x7f3dae3bc370>, <django.template.base.Token object at 0x7f3dae3bc6d0>, <django.template.base.Token object at 0x7f3dae3bca60>, <django.template.base.Token object at 0x7f3dae3bc760>, <django.template.base.Token object at 0x7f3dae3bca30>, <django.template.base.Token object at 0x7f3dae3bc130>, <django.template.base.Token object at 0x7f3dae3bc400>, <django.template.base.Token object at 0x7f3dae3bcbb0>, <django.template.base.Token object at 0x7f3dae3bc2e0>, <django.template.base.Token object at 0x7f3dae3bc0d0>, <django.template.base.Token object at 0x7f3dae3bc340>, <django.template.base.Token object at 0x7f3dae3bce50>, <django.template.base.Token object at 0x7f3dae3bcd30>, <django.template.base.Token object at 0x7f3dae3bc520>, <django.template.base.Token object at 0x7f3dae3bc280>, <django.template.base.Token object at 0x7f3dae467550>, <django.template.base.Token object at 0x7f3dae467f10>, <django… <trimmed 13215 bytes string> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 478, in parse
except KeyError:
self.invalid_block_tag(token, command, parse_until)
# Compile the callback into a node object and add it to
# the node list.
try:
compiled_result = compile_func(self, token)
except Exception as e:
raise self.error(token, e)…
self.extend_nodelist(nodelist, compiled_result, token)
# Compile success. Remove the token from the command stack.
self.command_stack.pop()
if parse_until:
self.unclosed_block_tag(parse_until)
return nodelist
Variable | Value |
---|---|
command | 'extends' |
compile_func | <function do_extends at 0x7f3dcb802a60> |
nodelist | [] |
parse_until | [] |
self | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae78ac40> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 476, in parse
try:
compile_func = self.tags[command]
except KeyError:
self.invalid_block_tag(token, command, parse_until)
# Compile the callback into a node object and add it to
# the node list.
try:
compiled_result = compile_func(self, token)…
except Exception as e:
raise self.error(token, e)
self.extend_nodelist(nodelist, compiled_result, token)
# Compile success. Remove the token from the command stack.
self.command_stack.pop()
if parse_until:
Variable | Value |
---|---|
command | 'extends' |
compile_func | <function do_extends at 0x7f3dcb802a60> |
nodelist | [] |
parse_until | [] |
self | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae78ac40> |
/usr/local/lib/python3.8/dist-packages/django/template/loader_tags.py
, line 278, in do_extends
the parent template itself (if it evaluates to a Template object).
"""
bits = token.split_contents()
if len(bits) != 2:
raise TemplateSyntaxError("'%s' takes one argument" % bits[0])
bits[1] = construct_relative_path(parser.origin.template_name, bits[1])
parent_name = parser.compile_filter(bits[1])
nodelist = parser.parse()…
if nodelist.get_nodes_by_type(ExtendsNode):
raise TemplateSyntaxError("'%s' cannot appear more than once in the same template" % bits[0])
return ExtendsNode(nodelist, parent_name)
@register.tag('include')
Variable | Value |
---|---|
bits | ['extends', '"website/base_account.html"'] |
parent_name | <django.template.base.FilterExpression object at 0x7f3dae78ee50> |
parser | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae78ac40> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 478, in parse
except KeyError:
self.invalid_block_tag(token, command, parse_until)
# Compile the callback into a node object and add it to
# the node list.
try:
compiled_result = compile_func(self, token)
except Exception as e:
raise self.error(token, e)…
self.extend_nodelist(nodelist, compiled_result, token)
# Compile success. Remove the token from the command stack.
self.command_stack.pop()
if parse_until:
self.unclosed_block_tag(parse_until)
return nodelist
Variable | Value |
---|---|
command | 'block' |
compile_func | <function do_block at 0x7f3dcb802940> |
compiled_result | <Block Node: sidebar. Contents: [<TextNode: '\n <h3>News</h3>\n <hr>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3dae285c70>, <TextNode: '">Dashboard</a></li>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3dae2854c0>, <TextNode: '">World</a></li>\n <l'>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3dae285910>, <TextNode: '">India</a></li>\n <l'>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3daeab34f0>, <TextNode: '">Technology</a></li>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3daea31160>, <TextNode: '">Business</a></li>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3daea78e50>, <TextNode: '">Entertainment</a></li>\n'>, <django.template.defaulttags.URLNode object at 0x7f3dae98fc70>, <TextNode: '">Search</a></li>\n <li'>, <django.template.defaulttags.URLNode object at 0x7f3dae98f520>, <TextNode: '">Subscribe</a></li>\n </'>]> |
nodelist | [<TextNode: '\n'>, <django.template.defaulttags.LoadNode object at 0x7f3dae78e490>, <TextNode: '\n\n'>, <Block Node: title. Contents: [<TextNode: 'Cognious - News (Search)'>]>, <TextNode: '\n'>, <Block Node: description. Contents: [<TextNode: 'Comprehensive up-to-date '>]>, <TextNode: '\n\n'>, <Block Node: head. Contents: [<TextNode: '\n '>, <Variable Node: block.super>, <TextNode: '\n <script src="'>, <django.templatetags.static.StaticNode object at 0x7f3dae374820>, <TextNode: '"></script>\n'>]>, <TextNode: '\n\n'>, <Block Node: javascript. Contents: [<TextNode: '\n '>, <Variable Node: block.super>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: sidebar. Contents: [<TextNode: '\n <h3>News</h3>\n <hr>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3dae285c70>, <TextNode: '">Dashboard</a></li>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3dae2854c0>, <TextNode: '">World</a></li>\n <l'>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3dae285910>, <TextNode: '">India</a></li>\n <l'>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3daeab34f0>, <TextNode: '">Technology</a></li>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3daea31160>, <TextNode: '">Business</a></li>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3daea78e50>, <TextNode: '">Entertainment</a></li>\n'>, <django.template.defaulttags.URLNode object at 0x7f3dae98fc70>, <TextNode: '">Search</a></li>\n <li'>, <django.template.defaulttags.URLNode object at 0x7f3dae98f520>, <TextNode: '">Subscribe</a></li>\n </'>]>, <TextNode: '\n\n'>] |
parse_until | [] |
self | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae3bc280> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 476, in parse
try:
compile_func = self.tags[command]
except KeyError:
self.invalid_block_tag(token, command, parse_until)
# Compile the callback into a node object and add it to
# the node list.
try:
compiled_result = compile_func(self, token)…
except Exception as e:
raise self.error(token, e)
self.extend_nodelist(nodelist, compiled_result, token)
# Compile success. Remove the token from the command stack.
self.command_stack.pop()
if parse_until:
Variable | Value |
---|---|
command | 'block' |
compile_func | <function do_block at 0x7f3dcb802940> |
compiled_result | <Block Node: sidebar. Contents: [<TextNode: '\n <h3>News</h3>\n <hr>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3dae285c70>, <TextNode: '">Dashboard</a></li>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3dae2854c0>, <TextNode: '">World</a></li>\n <l'>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3dae285910>, <TextNode: '">India</a></li>\n <l'>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3daeab34f0>, <TextNode: '">Technology</a></li>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3daea31160>, <TextNode: '">Business</a></li>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3daea78e50>, <TextNode: '">Entertainment</a></li>\n'>, <django.template.defaulttags.URLNode object at 0x7f3dae98fc70>, <TextNode: '">Search</a></li>\n <li'>, <django.template.defaulttags.URLNode object at 0x7f3dae98f520>, <TextNode: '">Subscribe</a></li>\n </'>]> |
nodelist | [<TextNode: '\n'>, <django.template.defaulttags.LoadNode object at 0x7f3dae78e490>, <TextNode: '\n\n'>, <Block Node: title. Contents: [<TextNode: 'Cognious - News (Search)'>]>, <TextNode: '\n'>, <Block Node: description. Contents: [<TextNode: 'Comprehensive up-to-date '>]>, <TextNode: '\n\n'>, <Block Node: head. Contents: [<TextNode: '\n '>, <Variable Node: block.super>, <TextNode: '\n <script src="'>, <django.templatetags.static.StaticNode object at 0x7f3dae374820>, <TextNode: '"></script>\n'>]>, <TextNode: '\n\n'>, <Block Node: javascript. Contents: [<TextNode: '\n '>, <Variable Node: block.super>, <TextNode: '\n'>]>, <TextNode: '\n\n'>, <Block Node: sidebar. Contents: [<TextNode: '\n <h3>News</h3>\n <hr>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3dae285c70>, <TextNode: '">Dashboard</a></li>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3dae2854c0>, <TextNode: '">World</a></li>\n <l'>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3dae285910>, <TextNode: '">India</a></li>\n <l'>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3daeab34f0>, <TextNode: '">Technology</a></li>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3daea31160>, <TextNode: '">Business</a></li>\n '>, <IfNode>, <TextNode: ' href="'>, <django.template.defaulttags.URLNode object at 0x7f3daea78e50>, <TextNode: '">Entertainment</a></li>\n'>, <django.template.defaulttags.URLNode object at 0x7f3dae98fc70>, <TextNode: '">Search</a></li>\n <li'>, <django.template.defaulttags.URLNode object at 0x7f3dae98f520>, <TextNode: '">Subscribe</a></li>\n </'>]>, <TextNode: '\n\n'>] |
parse_until | [] |
self | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae3bc280> |
/usr/local/lib/python3.8/dist-packages/django/template/loader_tags.py
, line 216, in do_block
# check for duplication.
try:
if block_name in parser.__loaded_blocks:
raise TemplateSyntaxError("'%s' tag with name '%s' appears more than once" % (bits[0], block_name))
parser.__loaded_blocks.append(block_name)
except AttributeError: # parser.__loaded_blocks isn't a list yet
parser.__loaded_blocks = [block_name]
nodelist = parser.parse(('endblock',))…
# This check is kept for backwards-compatibility. See #3100.
endblock = parser.next_token()
acceptable_endblocks = ('endblock', 'endblock %s' % block_name)
if endblock.contents not in acceptable_endblocks:
parser.invalid_block_tag(endblock, 'endblock', acceptable_endblocks)
Variable | Value |
---|---|
bits | ['block', 'content'] |
block_name | 'content' |
parser | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae3bc280> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 478, in parse
except KeyError:
self.invalid_block_tag(token, command, parse_until)
# Compile the callback into a node object and add it to
# the node list.
try:
compiled_result = compile_func(self, token)
except Exception as e:
raise self.error(token, e)…
self.extend_nodelist(nodelist, compiled_result, token)
# Compile success. Remove the token from the command stack.
self.command_stack.pop()
if parse_until:
self.unclosed_block_tag(parse_until)
return nodelist
Variable | Value |
---|---|
command | 'for' |
compile_func | <function do_for at 0x7f3dcb7faf70> |
compiled_result | <IfNode> |
filter_expression | <django.template.base.FilterExpression object at 0x7f3dae792760> |
nodelist | [<TextNode: '\n'>, <Variable Node: block.super>, <TextNode: '\n<div class="container co'>, <Variable Node: search>, <TextNode: '"></input>\n </div>'>, <IfNode>, <TextNode: '>World</label>\n </'>, <IfNode>, <TextNode: '>India</label>\n </'>, <IfNode>, <TextNode: '>Technology</label>\n '>, <IfNode>, <TextNode: '>Business</label>\n '>, <IfNode>, <TextNode: '>Entertainment</label>\n '>, <IfNode>, <TextNode: '>Today</label>\n </'>, <IfNode>, <TextNode: '>Last 5 days</label>\n '>, <IfNode>, <TextNode: '>Last 30 days</label>\n '>, <IfNode>, <TextNode: '>Advanced</label>\n '>, <Variable Node: fromdate>, <TextNode: '">\n </div>\n '>, <Variable Node: todate>, <TextNode: '">\n </div>\n <'>, <Variable Node: searchnote>, <TextNode: '</div>\n <div class="co'>] |
parse_until | ('endblock',) |
self | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae81b280> |
var_node | <Variable Node: searchnote> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 476, in parse
try:
compile_func = self.tags[command]
except KeyError:
self.invalid_block_tag(token, command, parse_until)
# Compile the callback into a node object and add it to
# the node list.
try:
compiled_result = compile_func(self, token)…
except Exception as e:
raise self.error(token, e)
self.extend_nodelist(nodelist, compiled_result, token)
# Compile success. Remove the token from the command stack.
self.command_stack.pop()
if parse_until:
Variable | Value |
---|---|
command | 'for' |
compile_func | <function do_for at 0x7f3dcb7faf70> |
compiled_result | <IfNode> |
filter_expression | <django.template.base.FilterExpression object at 0x7f3dae792760> |
nodelist | [<TextNode: '\n'>, <Variable Node: block.super>, <TextNode: '\n<div class="container co'>, <Variable Node: search>, <TextNode: '"></input>\n </div>'>, <IfNode>, <TextNode: '>World</label>\n </'>, <IfNode>, <TextNode: '>India</label>\n </'>, <IfNode>, <TextNode: '>Technology</label>\n '>, <IfNode>, <TextNode: '>Business</label>\n '>, <IfNode>, <TextNode: '>Entertainment</label>\n '>, <IfNode>, <TextNode: '>Today</label>\n </'>, <IfNode>, <TextNode: '>Last 5 days</label>\n '>, <IfNode>, <TextNode: '>Last 30 days</label>\n '>, <IfNode>, <TextNode: '>Advanced</label>\n '>, <Variable Node: fromdate>, <TextNode: '">\n </div>\n '>, <Variable Node: todate>, <TextNode: '">\n </div>\n <'>, <Variable Node: searchnote>, <TextNode: '</div>\n <div class="co'>] |
parse_until | ('endblock',) |
self | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae81b280> |
var_node | <Variable Node: searchnote> |
/usr/local/lib/python3.8/dist-packages/django/template/defaulttags.py
, line 814, in do_for
loopvars = re.split(r' *, *', ' '.join(bits[1:in_index]))
for var in loopvars:
if not var or not invalid_chars.isdisjoint(var):
raise TemplateSyntaxError("'for' tag received an invalid argument:"
" %s" % token.contents)
sequence = parser.compile_filter(bits[in_index + 1])
nodelist_loop = parser.parse(('empty', 'endfor',))…
token = parser.next_token()
if token.contents == 'empty':
nodelist_empty = parser.parse(('endfor',))
parser.delete_first_token()
else:
nodelist_empty = None
Variable | Value |
---|---|
bits | ['for', 'article', 'in', 'articles'] |
in_index | -2 |
invalid_chars | frozenset({'"', "'", ' ', '|'}) |
is_reversed | False |
loopvars | ['article'] |
parser | <django.template.base.Parser object at 0x7f3dae78e790> |
sequence | <django.template.base.FilterExpression object at 0x7f3dae792700> |
token | <django.template.base.Token object at 0x7f3dae81b280> |
var | 'article' |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 478, in parse
except KeyError:
self.invalid_block_tag(token, command, parse_until)
# Compile the callback into a node object and add it to
# the node list.
try:
compiled_result = compile_func(self, token)
except Exception as e:
raise self.error(token, e)…
self.extend_nodelist(nodelist, compiled_result, token)
# Compile success. Remove the token from the command stack.
self.command_stack.pop()
if parse_until:
self.unclosed_block_tag(parse_until)
return nodelist
Variable | Value |
---|---|
command | 'if' |
compile_func | <function do_if at 0x7f3dcb7ff4c0> |
nodelist | [<TextNode: '\n '>] |
parse_until | ('empty', 'endfor') |
self | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae81bb80> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 476, in parse
try:
compile_func = self.tags[command]
except KeyError:
self.invalid_block_tag(token, command, parse_until)
# Compile the callback into a node object and add it to
# the node list.
try:
compiled_result = compile_func(self, token)…
except Exception as e:
raise self.error(token, e)
self.extend_nodelist(nodelist, compiled_result, token)
# Compile success. Remove the token from the command stack.
self.command_stack.pop()
if parse_until:
Variable | Value |
---|---|
command | 'if' |
compile_func | <function do_if at 0x7f3dcb7ff4c0> |
nodelist | [<TextNode: '\n '>] |
parse_until | ('empty', 'endfor') |
self | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae81bb80> |
/usr/local/lib/python3.8/dist-packages/django/template/defaulttags.py
, line 965, in do_if
``==``, ``!=``, ``>``, ``>=``, ``<`` and ``<=``.
Operator precedence follows Python.
"""
# {% if ... %}
bits = token.split_contents()[1:]
condition = TemplateIfParser(parser, bits).parse()
nodelist = parser.parse(('elif', 'else', 'endif'))…
conditions_nodelists = [(condition, nodelist)]
token = parser.next_token()
# {% elif ... %} (repeatable)
while token.contents.startswith('elif'):
bits = token.split_contents()[1:]
Variable | Value |
---|---|
bits | ['article.already_matched', '!=', 'True'] |
condition | (!= (literal <django.template.base.FilterExpression object at 0x7f3dae7927c0>) (literal <django.template.base.FilterExpression object at 0x7f3dae792a60>)) |
parser | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae81bb80> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 478, in parse
except KeyError:
self.invalid_block_tag(token, command, parse_until)
# Compile the callback into a node object and add it to
# the node list.
try:
compiled_result = compile_func(self, token)
except Exception as e:
raise self.error(token, e)…
self.extend_nodelist(nodelist, compiled_result, token)
# Compile success. Remove the token from the command stack.
self.command_stack.pop()
if parse_until:
self.unclosed_block_tag(parse_until)
return nodelist
Variable | Value |
---|---|
command | 'if' |
compile_func | <function do_if at 0x7f3dcb7ff4c0> |
filter_expression | <django.template.base.FilterExpression object at 0x7f3dae37e2e0> |
nodelist | [<TextNode: '\n <div class="col-'>, <Variable Node: article.url>, <TextNode: '" target="_blank" class="'>, <Variable Node: article.url>, <TextNode: '">\n <img src="'>, <Variable Node: article.urlToImage>, <TextNode: '" class="news-image img-r'>, <Variable Node: article.url>, <TextNode: '" target="_blank" class="'>, <Variable Node: article.url>, <TextNode: '">\n '>, <Variable Node: article.title>, <TextNode: '\n </a>\n '>, <Variable Node: article.source_name>, <TextNode: '</span>\n <span'>, <Variable Node: article.publishedAt|default:article.created>, <TextNode: '">'>, <Variable Node: article.publishedAt|default:article.created|timesince>, <TextNode: ' ago</span>\n </d'>, <Variable Node: article.description>, <TextNode: '</div>\n '>] |
parse_until | ('elif', 'else', 'endif') |
self | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae9b53a0> |
var_node | <Variable Node: article.description> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 476, in parse
try:
compile_func = self.tags[command]
except KeyError:
self.invalid_block_tag(token, command, parse_until)
# Compile the callback into a node object and add it to
# the node list.
try:
compiled_result = compile_func(self, token)…
except Exception as e:
raise self.error(token, e)
self.extend_nodelist(nodelist, compiled_result, token)
# Compile success. Remove the token from the command stack.
self.command_stack.pop()
if parse_until:
Variable | Value |
---|---|
command | 'if' |
compile_func | <function do_if at 0x7f3dcb7ff4c0> |
filter_expression | <django.template.base.FilterExpression object at 0x7f3dae37e2e0> |
nodelist | [<TextNode: '\n <div class="col-'>, <Variable Node: article.url>, <TextNode: '" target="_blank" class="'>, <Variable Node: article.url>, <TextNode: '">\n <img src="'>, <Variable Node: article.urlToImage>, <TextNode: '" class="news-image img-r'>, <Variable Node: article.url>, <TextNode: '" target="_blank" class="'>, <Variable Node: article.url>, <TextNode: '">\n '>, <Variable Node: article.title>, <TextNode: '\n </a>\n '>, <Variable Node: article.source_name>, <TextNode: '</span>\n <span'>, <Variable Node: article.publishedAt|default:article.created>, <TextNode: '">'>, <Variable Node: article.publishedAt|default:article.created|timesince>, <TextNode: ' ago</span>\n </d'>, <Variable Node: article.description>, <TextNode: '</div>\n '>] |
parse_until | ('elif', 'else', 'endif') |
self | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae9b53a0> |
var_node | <Variable Node: article.description> |
/usr/local/lib/python3.8/dist-packages/django/template/defaulttags.py
, line 965, in do_if
``==``, ``!=``, ``>``, ``>=``, ``<`` and ``<=``.
Operator precedence follows Python.
"""
# {% if ... %}
bits = token.split_contents()[1:]
condition = TemplateIfParser(parser, bits).parse()
nodelist = parser.parse(('elif', 'else', 'endif'))…
conditions_nodelists = [(condition, nodelist)]
token = parser.next_token()
# {% elif ... %} (repeatable)
while token.contents.startswith('elif'):
bits = token.split_contents()[1:]
Variable | Value |
---|---|
bits | ['article.related_articles'] |
condition | (literal <django.template.base.FilterExpression object at 0x7f3dae37ea00>) |
parser | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae9b53a0> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 478, in parse
except KeyError:
self.invalid_block_tag(token, command, parse_until)
# Compile the callback into a node object and add it to
# the node list.
try:
compiled_result = compile_func(self, token)
except Exception as e:
raise self.error(token, e)…
self.extend_nodelist(nodelist, compiled_result, token)
# Compile success. Remove the token from the command stack.
self.command_stack.pop()
if parse_until:
self.unclosed_block_tag(parse_until)
return nodelist
Variable | Value |
---|---|
command | 'for' |
compile_func | <function do_for at 0x7f3dcb7faf70> |
compiled_result | <IfNode> |
filter_expression | <django.template.base.FilterExpression object at 0x7f3dae37e3a0> |
nodelist | [<TextNode: '\n <div id="'>, <Variable Node: article.unique_id>, <TextNode: '" class="pull-right text-'>, <Variable Node: article.related_articles_count>, <TextNode: '">\n '>, <IfNode>, <TextNode: '\n </div>\n '>, <IfNode>, <TextNode: '\n '>] |
parse_until | ('elif', 'else', 'endif') |
self | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae7f4190> |
var_node | <Variable Node: article.related_articles_count> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 476, in parse
try:
compile_func = self.tags[command]
except KeyError:
self.invalid_block_tag(token, command, parse_until)
# Compile the callback into a node object and add it to
# the node list.
try:
compiled_result = compile_func(self, token)…
except Exception as e:
raise self.error(token, e)
self.extend_nodelist(nodelist, compiled_result, token)
# Compile success. Remove the token from the command stack.
self.command_stack.pop()
if parse_until:
Variable | Value |
---|---|
command | 'for' |
compile_func | <function do_for at 0x7f3dcb7faf70> |
compiled_result | <IfNode> |
filter_expression | <django.template.base.FilterExpression object at 0x7f3dae37e3a0> |
nodelist | [<TextNode: '\n <div id="'>, <Variable Node: article.unique_id>, <TextNode: '" class="pull-right text-'>, <Variable Node: article.related_articles_count>, <TextNode: '">\n '>, <IfNode>, <TextNode: '\n </div>\n '>, <IfNode>, <TextNode: '\n '>] |
parse_until | ('elif', 'else', 'endif') |
self | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae7f4190> |
var_node | <Variable Node: article.related_articles_count> |
/usr/local/lib/python3.8/dist-packages/django/template/defaulttags.py
, line 814, in do_for
loopvars = re.split(r' *, *', ' '.join(bits[1:in_index]))
for var in loopvars:
if not var or not invalid_chars.isdisjoint(var):
raise TemplateSyntaxError("'for' tag received an invalid argument:"
" %s" % token.contents)
sequence = parser.compile_filter(bits[in_index + 1])
nodelist_loop = parser.parse(('empty', 'endfor',))…
token = parser.next_token()
if token.contents == 'empty':
nodelist_empty = parser.parse(('endfor',))
parser.delete_first_token()
else:
nodelist_empty = None
Variable | Value |
---|---|
bits | ['for', 'post', 'in', 'article.related_articles'] |
in_index | -2 |
invalid_chars | frozenset({'"', "'", ' ', '|'}) |
is_reversed | False |
loopvars | ['post'] |
parser | <django.template.base.Parser object at 0x7f3dae78e790> |
sequence | <django.template.base.FilterExpression object at 0x7f3dae3396d0> |
token | <django.template.base.Token object at 0x7f3dae7f4190> |
var | 'post' |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 478, in parse
except KeyError:
self.invalid_block_tag(token, command, parse_until)
# Compile the callback into a node object and add it to
# the node list.
try:
compiled_result = compile_func(self, token)
except Exception as e:
raise self.error(token, e)…
self.extend_nodelist(nodelist, compiled_result, token)
# Compile success. Remove the token from the command stack.
self.command_stack.pop()
if parse_until:
self.unclosed_block_tag(parse_until)
return nodelist
Variable | Value |
---|---|
command | 'if' |
compile_func | <function do_if at 0x7f3dcb7ff4c0> |
nodelist | [<TextNode: '\n '>] |
parse_until | ('empty', 'endfor') |
self | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae7f45b0> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 476, in parse
try:
compile_func = self.tags[command]
except KeyError:
self.invalid_block_tag(token, command, parse_until)
# Compile the callback into a node object and add it to
# the node list.
try:
compiled_result = compile_func(self, token)…
except Exception as e:
raise self.error(token, e)
self.extend_nodelist(nodelist, compiled_result, token)
# Compile success. Remove the token from the command stack.
self.command_stack.pop()
if parse_until:
Variable | Value |
---|---|
command | 'if' |
compile_func | <function do_if at 0x7f3dcb7ff4c0> |
nodelist | [<TextNode: '\n '>] |
parse_until | ('empty', 'endfor') |
self | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae7f45b0> |
/usr/local/lib/python3.8/dist-packages/django/template/defaulttags.py
, line 964, in do_if
All supported operators are: ``or``, ``and``, ``in``, ``not in``
``==``, ``!=``, ``>``, ``>=``, ``<`` and ``<=``.
Operator precedence follows Python.
"""
# {% if ... %}
bits = token.split_contents()[1:]
condition = TemplateIfParser(parser, bits).parse()…
nodelist = parser.parse(('elif', 'else', 'endif'))
conditions_nodelists = [(condition, nodelist)]
token = parser.next_token()
# {% elif ... %} (repeatable)
while token.contents.startswith('elif'):
Variable | Value |
---|---|
bits | ['forloop.counter', '=', '4'] |
parser | <django.template.base.Parser object at 0x7f3dae78e790> |
token | <django.template.base.Token object at 0x7f3dae7f45b0> |
/usr/local/lib/python3.8/dist-packages/django/template/defaulttags.py
, line 897, in __init__
class TemplateIfParser(IfParser):
error_class = TemplateSyntaxError
def __init__(self, parser, *args, **kwargs):
self.template_parser = parser
super().__init__(*args, **kwargs)…
def create_var(self, value):
return TemplateLiteral(self.template_parser.compile_filter(value), value)
@register.tag('if')
Variable | Value |
---|---|
__class__ | <class 'django.template.defaulttags.TemplateIfParser'> |
args | (['forloop.counter', '=', '4'],) |
kwargs | {} |
parser | <django.template.base.Parser object at 0x7f3dae78e790> |
self | <django.template.defaulttags.TemplateIfParser object at 0x7f3dae339ca0> |
/usr/local/lib/python3.8/dist-packages/django/template/smartif.py
, line 166, in __init__
token = tokens[i]
if token == "is" and i + 1 < num_tokens and tokens[i + 1] == "not":
token = "is not"
i += 1 # skip 'not'
elif token == "not" and i + 1 < num_tokens and tokens[i + 1] == "in":
token = "not in"
i += 1 # skip 'in'
mapped_tokens.append(self.translate_token(token))…
i += 1
self.tokens = mapped_tokens
self.pos = 0
self.current_token = self.next_token()
Variable | Value |
---|---|
i | 1 |
mapped_tokens | [(literal <django.template.base.FilterExpression object at 0x7f3dae3399a0>)] |
num_tokens | 3 |
self | <django.template.defaulttags.TemplateIfParser object at 0x7f3dae339ca0> |
token | '=' |
tokens | ['forloop.counter', '=', '4'] |
/usr/local/lib/python3.8/dist-packages/django/template/smartif.py
, line 177, in translate_token
self.pos = 0
self.current_token = self.next_token()
def translate_token(self, token):
try:
op = OPERATORS[token]
except (KeyError, TypeError):
return self.create_var(token)…
else:
return op()
def next_token(self):
if self.pos >= len(self.tokens):
return EndToken
Variable | Value |
---|---|
self | <django.template.defaulttags.TemplateIfParser object at 0x7f3dae339ca0> |
token | '=' |
/usr/local/lib/python3.8/dist-packages/django/template/defaulttags.py
, line 900, in create_var
error_class = TemplateSyntaxError
def __init__(self, parser, *args, **kwargs):
self.template_parser = parser
super().__init__(*args, **kwargs)
def create_var(self, value):
return TemplateLiteral(self.template_parser.compile_filter(value), value)…
@register.tag('if')
def do_if(parser, token):
"""
Evaluate a variable, and if that variable is "true" (i.e., exists, is not
Variable | Value |
---|---|
self | <django.template.defaulttags.TemplateIfParser object at 0x7f3dae339ca0> |
value | '=' |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 563, in compile_filter
self.tags.update(lib.tags)
self.filters.update(lib.filters)
def compile_filter(self, token):
"""
Convenient wrapper for FilterExpression
"""
return FilterExpression(token, self)…
def find_filter(self, filter_name):
if filter_name in self.filters:
return self.filters[filter_name]
else:
raise TemplateSyntaxError("Invalid filter: '%s'" % filter_name)
Variable | Value |
---|---|
self | <django.template.base.Parser object at 0x7f3dae78e790> |
token | '=' |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 662, in __init__
elif var_arg:
args.append((True, Variable(var_arg)))
filter_func = parser.find_filter(filter_name)
self.args_check(filter_name, filter_func, args)
filters.append((filter_func, args))
upto = match.end()
if upto != len(token):
raise TemplateSyntaxError("Could not parse the remainder: '%s' "…
"from '%s'" % (token[upto:], token))
self.filters = filters
self.var = var_obj
def resolve(self, context, ignore_failures=False):
Variable | Value |
---|---|
filters | [] |
matches | <callable_iterator object at 0x7f3dae339ee0> |
parser | <django.template.base.Parser object at 0x7f3dae78e790> |
self | <django.template.base.FilterExpression object at 0x7f3dae339550> |
token | '=' |
upto | 0 |
var_obj | None |
AnonymousUser
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
CONTEXT_DOCUMENT_ROOT | '/var/www/html' |
CONTEXT_PREFIX | '' |
DOCUMENT_ROOT | '/var/www/html' |
GATEWAY_INTERFACE | 'CGI/1.1' |
HTTP_ACCEPT | '*/*' |
HTTP_HOST | 'cognious.com' |
HTTP_USER_AGENT | 'claudebot' |
PATH_INFO | '/news/search' |
PATH_TRANSLATED | '/home/tarunpaul/www/cognious/cognious/wsgi.py/news/search' |
QUERY_STRING | '' |
REMOTE_ADDR | '3.94.150.98' |
REMOTE_PORT | '48452' |
REQUEST_METHOD | 'GET' |
REQUEST_SCHEME | 'https' |
REQUEST_URI | '/news/search' |
SCRIPT_FILENAME | '/home/tarunpaul/www/cognious/cognious/wsgi.py' |
SCRIPT_NAME | '' |
SERVER_ADDR | '172.31.34.230' |
SERVER_ADMIN | 'webmaster@tarunpaul.com' |
SERVER_NAME | 'cognious.com' |
SERVER_PORT | '443' |
SERVER_PROTOCOL | 'HTTP/1.1' |
SERVER_SIGNATURE | '********************' |
SERVER_SOFTWARE | 'Apache/2.4.41 (Ubuntu)' |
SSL_TLS_SNI | 'cognious.com' |
apache.version | (2, 4, 41) |
mod_wsgi.application_group | '' |
mod_wsgi.callable_object | 'application' |
mod_wsgi.daemon_connects | '1' |
mod_wsgi.daemon_restarts | '0' |
mod_wsgi.daemon_start | '1711616088432374' |
mod_wsgi.enable_sendfile | '0' |
mod_wsgi.handler_script | '' |
mod_wsgi.ignore_activity | '0' |
mod_wsgi.listener_host | '' |
mod_wsgi.listener_port | '443' |
mod_wsgi.path_info | '/news/search' |
mod_wsgi.process_group | 'cognious_website' |
mod_wsgi.queue_start | '1711616088432257' |
mod_wsgi.request_handler | 'wsgi-script' |
mod_wsgi.request_id | '513xrBSkWdE' |
mod_wsgi.request_start | '1711616088432103' |
mod_wsgi.script_name | '' |
mod_wsgi.script_reloading | '1' |
mod_wsgi.script_start | '1711616088432452' |
mod_wsgi.thread_id | 1 |
mod_wsgi.thread_requests | 280 |
mod_wsgi.total_requests | 560 |
mod_wsgi.version | (4, 6, 8) |
wsgi.errors | <_io.TextIOWrapper name='<wsgi.errors>' encoding='utf-8'> |
wsgi.file_wrapper | <class 'mod_wsgi.FileWrapper'> |
wsgi.input | <mod_wsgi.Input object at 0x7f3dae859260> |
wsgi.input_terminated | True |
wsgi.multiprocess | True |
wsgi.multithread | True |
wsgi.run_once | False |
wsgi.url_scheme | 'https' |
wsgi.version | (1, 0) |
cognious.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | ['www.cognious.com', 'cognious.com'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ('oauth2_provider.backends.OAuth2Backend', 'django.contrib.auth.backends.ModelBackend') |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'auth.User' |
BASE_DIR | '/home/tarunpaul/www/cognious' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'KEY_PREFIX': '********************', 'LOCATION': ['127.0.0.1:11211']}, 'machina_attachments': {'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', 'LOCATION': '/tmp'}} |
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.mysql', 'HOST': 'dev02.tarunpaul.com', 'NAME': 'cognious', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '3306', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIGRATE': True, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'cogniousdjango'}} |
DATABASE_ROUTERS | [] |
DATA_UPLOAD_MAX_MEMORY_SIZE | 10485760 |
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 | 'django.core.files.storage.FileSystemStorage' |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
DEFAULT_HASHING_ALGORITHM | 'sha256' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | 'localhost' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | '' |
EMAIL_PORT | 25 |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_LOCALTIME | False |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | False |
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' |
HAYSTACK_CONNECTIONS | {'default': {'ENGINE': 'haystack.backends.simple_backend.SimpleEngine'}} |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'website', 'blog', 'accounts', 'oauth2_provider', 'api', 'person', 'shorturl', 'news', 'mptt', 'haystack', 'widget_tweaks', 'machina', 'machina.apps.forum', 'machina.apps.forum_conversation', 'machina.apps.forum_conversation.forum_attachments', 'machina.apps.forum_conversation.forum_polls', 'machina.apps.forum_feeds', 'machina.apps.forum_moderation', 'machina.apps.forum_search', 'machina.apps.forum_tracking', 'machina.apps.forum_member', 'machina.apps.forum_permission'] |
INTERNAL_IPS | [] |
LANGUAGES | [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ar-dz', 'Algerian Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('ig', 'Igbo'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('ky', 'Kyrgyz'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('tg', 'Tajik'), ('th', 'Thai'), ('tk', 'Turkmen'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('uz', 'Uzbek'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] |
LANGUAGES_BIDI | ['he', 'ar', 'ar-dz', 'fa', 'ur'] |
LANGUAGE_CODE | 'en-us' |
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 | [] |
LOGGING | {} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGIN_URL | '/login' |
LOGOUT_REDIRECT_URL | None |
MACHINA_FORUM_NAME | 'Cognious Forum' |
MANAGERS | [] |
MEDIA_ROOT | '' |
MEDIA_URL | '/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'oauth2_provider.middleware.OAuth2TokenMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'machina.apps.forum_permission.middleware.ForumPermissionMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
OAUTH2_PROVIDER | {'CLIENT_SECRET_GENERATOR_LENGTH': '********************'} |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PAYPAL_SANDBOX | False |
PREPEND_WWW | False |
REMEMBERME_SESSION_COOKIE_AGE | 1209600 |
ROOT_URLCONF | 'cognious.urls' |
SECRET_KEY | '********************' |
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 |
SERVER_EMAIL | 'root@localhost' |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_AGE | 600 |
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 | True |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'cognious.settings' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
STATICFILES_DIRS | [] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/home/tarunpaul/www/cognious/static' |
STATIC_URL | '/static/' |
TEMPLATES | [{'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', 'machina.core.context_processors.metadata']}}] |
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 | 'Asia/Calcutta' |
USE_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | True |
USE_X_FORWARDED_HOST | False |
USE_X_FORWARDED_PORT | False |
WSGI_APPLICATION | 'cognious.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.