Reverse for 'post_category' with arguments '('',)' not found. 1 pattern(s) tried: ['c/(?P<slug>[-a-zA-Z0-9_]+)/$']
Request Method: | GET |
---|---|
Request URL: | http://codingwithfun.com/p/cloud-development-high-level-usage-of-cloud-databases/ |
Django Version: | 2.2.8 |
Exception Type: | NoReverseMatch |
Exception Value: | Reverse for 'post_category' with arguments '('',)' not found. 1 pattern(s) tried: ['c/(?P<slug>[-a-zA-Z0-9_]+)/$'] |
Exception Location: | /usr/local/lib/python3.8/dist-packages/django/urls/resolvers.py in _reverse_with_prefix, line 673 |
Python Executable: | /usr/bin/python3 |
Python Version: | 3.8.10 |
Python Path: | ['/home/django_w3cschool', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages'] |
Server time: | Thu, 28 Mar 2024 13:25:29 +0000 |
In template /home/django_w3cschool/templates/base.html
, error at line 0
1 | {% load static %} |
---|---|
2 | <!DOCTYPE html> |
3 | <html> |
4 | <head> |
5 | {% block title %} |
6 | |
7 | {% endblock title %} |
8 | <meta name="msvalidate.01" content="F5A56F69B0EDE6F7CD78807EB8337EC1" /> |
9 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> |
10 | <link rel = "icon" href = "{% static 'icon.png' %}" type = "image/x-icon"> |
/usr/local/lib/python3.8/dist-packages/django/core/handlers/exception.py
in inner
This decorator is automatically applied to all middleware to ensure that
no middleware leaks an exception and that the next middleware in the stack
can rely on getting a response instead of an exception.
"""
@wraps(get_response)
def inner(request):
try:
response = get_response(request)…
except Exception as exc:
response = response_for_exception(request, exc)
return response
return inner
Variable | Value |
---|---|
exc | NoReverseMatch("Reverse for 'post_category' with arguments '('',)' not found. 1 pattern(s) tried: ['c/(?P<slug>[-a-zA-Z0-9_]+)/$']") |
get_response | <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7f269c3b15b0>> |
request | <WSGIRequest: GET '/p/cloud-development-high-level-usage-of-cloud-databases/'> |
/usr/local/lib/python3.8/dist-packages/django/core/handlers/base.py
in _get_response
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)
except Exception as e:
response = self.process_exception_by_middleware(e, request)…
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
view_name = callback.__name__
else: # CBV
Variable | Value |
---|---|
callback | <function post_detail at 0x7f269ab261f0> |
callback_args | () |
callback_kwargs | {'slug': 'cloud-development-high-level-usage-of-cloud-databases'} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f269940bd30>> |
request | <WSGIRequest: GET '/p/cloud-development-high-level-usage-of-cloud-databases/'> |
resolver | <URLResolver 'mysite.urls' (None:None) '^/'> |
resolver_match | ResolverMatch(func=blog.views.post_detail, args=(), kwargs={'slug': 'cloud-development-high-level-usage-of-cloud-databases'}, url_name=post_detail, app_names=[], namespaces=[], route=p/<slug:slug>/) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f269c3b15b0> |
wrapped_callback | <function post_detail at 0x7f269ab261f0> |
/usr/local/lib/python3.8/dist-packages/django/core/handlers/base.py
in _get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
if response:
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)…
except Exception as e:
response = self.process_exception_by_middleware(e, request)
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
Variable | Value |
---|---|
callback | <function post_detail at 0x7f269ab261f0> |
callback_args | () |
callback_kwargs | {'slug': 'cloud-development-high-level-usage-of-cloud-databases'} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f269940bd30>> |
request | <WSGIRequest: GET '/p/cloud-development-high-level-usage-of-cloud-databases/'> |
resolver | <URLResolver 'mysite.urls' (None:None) '^/'> |
resolver_match | ResolverMatch(func=blog.views.post_detail, args=(), kwargs={'slug': 'cloud-development-high-level-usage-of-cloud-databases'}, url_name=post_detail, app_names=[], namespaces=[], route=p/<slug:slug>/) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f269c3b15b0> |
wrapped_callback | <function post_detail at 0x7f269ab261f0> |
/home/django_w3cschool/blog/views.py
in post_detail
post = get_object_or_404(Post, slug=slug, status=1, type = 0)
post_related = Post.objects.filter(status=1).filter(category_id=post.category.id).order_by("?")[:10]
#posts_in_category = Post.objects.filter(status=1, category_id = post.category.id).order_by("id")
print("================: " + post.category.slug)
except Exception as e:
logger.error(e, exc_info=True)
return render(…
request,
template_name,
{
"post": post,
"post_related" : post_related,
# "posts_in_category" : posts_in_category,
Variable | Value |
---|---|
post | None |
post_related | None |
posts_in_category | None |
request | <WSGIRequest: GET '/p/cloud-development-high-level-usage-of-cloud-databases/'> |
slug | 'cloud-development-high-level-usage-of-cloud-databases' |
template_name | 'post_detail.html' |
/usr/local/lib/python3.8/dist-packages/django/shortcuts.py
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 | {'post': None, 'post_related': None} |
request | <WSGIRequest: GET '/p/cloud-development-high-level-usage-of-cloud-databases/'> |
status | None |
template_name | 'post_detail.html' |
using | None |
/usr/local/lib/python3.8/dist-packages/django/template/loader.py
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 | {'post': None, 'post_related': None} |
request | <WSGIRequest: GET '/p/cloud-development-high-level-usage-of-cloud-databases/'> |
template | <django.template.backends.django.Template object at 0x7f269811e610> |
template_name | 'post_detail.html' |
using | None |
/usr/local/lib/python3.8/dist-packages/django/template/backends/django.py
in render
@property
def origin(self):
return self.template.origin
def render(self, context=None, request=None):
context = make_context(context, request, autoescape=self.backend.engine.autoescape)
try:
return self.template.render(context)…
except TemplateDoesNotExist as exc:
reraise(exc, self.backend)
def copy_exception(exc, backend=None):
"""
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'post': None, 'post_related': None}] |
request | <WSGIRequest: GET '/p/cloud-development-high-level-usage-of-cloud-databases/'> |
self | <django.template.backends.django.Template object at 0x7f269811e610> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
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}, {}, {}, {'post': None, 'post_related': None}] |
self | <django.template.base.Template object at 0x7f2698a771c0> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
in _render
self.nodelist = self.compile_nodelist()
def __iter__(self):
for node in self.nodelist:
yield from node
def _render(self, context):
return self.nodelist.render(context)…
def render(self, context):
"Display stage -- can be called many times"
with context.render_context.push_state(self):
if context.template is None:
with context.bind_template(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'post': None, 'post_related': None}] |
self | <django.template.base.Template object at 0x7f2698a771c0> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)…
else:
bit = node
bits.append(str(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bits | [] |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'post': None, 'post_related': None}] |
node | <ExtendsNode: extends "base.html"> |
self | [<ExtendsNode: extends "base.html">] |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)…
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.render_context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'post': None, 'post_related': None}] |
self | <ExtendsNode: extends "base.html"> |
/usr/local/lib/python3.8/dist-packages/django/template/loader_tags.py
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 0x7f26989ca7c0> |
blocks | {'content': <Block Node: content. Contents: [<TextNode: '\n\n '>]>, 'title': <Block Node: title. Contents: [<TextNode: '\n\n '>]>} |
compiled_parent | <django.template.base.Template object at 0x7f26989caee0> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'post': None, 'post_related': None}] |
node | <django.template.defaulttags.LoadNode object at 0x7f269815ed90> |
self | <ExtendsNode: extends "base.html"> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
in _render
self.nodelist = self.compile_nodelist()
def __iter__(self):
for node in self.nodelist:
yield from node
def _render(self, context):
return self.nodelist.render(context)…
def render(self, context):
"Display stage -- can be called many times"
with context.render_context.push_state(self):
if context.template is None:
with context.bind_template(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'post': None, 'post_related': None}] |
self | <django.template.base.Template object at 0x7f26989caee0> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)…
else:
bit = node
bits.append(str(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | ('" class="w3-bar-item w3-button w3-hover-none w3-border-white w3-bottombar ' 'w3-hover-border-blue">Policy</a>\n' '\n' ' </div>\n' ' </div>\n' ' <div class="w3-row">\n' ' ') |
bits | ['', '\n<!DOCTYPE html>\n<html>\n<head>\n ', '\n' '\t<title> | CodingWithFun.com</title>\n' '\t<meta name="description" content="">\n', '\n' ' <meta name="msvalidate.01" content="F5A56F69B0EDE6F7CD78807EB8337EC1" />\n' ' <link rel="stylesheet" ' 'href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">\n' ' <link rel = "icon" href = "', '/static/icon.png', '" type = "image/x-icon"> \n' ' <meta name="google" content="notranslate" />\n' ' <meta name="viewport" content="width=device-width, initial-scale=1" />\n' ' <link rel="stylesheet" href="', '/static/css/w3.css', '">\n <link rel="stylesheet" href="', '/static/css/base.css', '">\n <link rel="stylesheet" href="', '/static/ckeditor/ckeditor/plugins/codesnippet/lib/highlight/styles/obsidian.css', '">\n' ' \n' ' <script>\n' '\tlet canRunAds = false;\n' ' let canRunAds1 = false;\n' '\tfunction adBlockFunction(){\n' '\t\tsetTimeout(function(){\n' '\t\t\tdocument.getElementById("ads-block-showing").style.display = "block";\n' '\t\t}, 2000);\n' '\t}\n' ' </script>\n' ' <script src="', '/static/js/ads.js', '"></script>\n <script src="', '/static/js/adsbygoogle.js', '"></script>\n' '\n' '<script async ' 'src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8588090199216963" ' 'crossorigin="anonymous"></script>\n' '\n' '\n' ' <style>\n' ' a {\n' ' text-decoration: none;\n' ' }\n' ' input:focus{\n' ' outline: none;\n' ' }\n' ' .bar-dropdown:hover{\n' ' background-color : #ffc107 !important;\n' ' }\n' ' .w3-bar-item:hover{\n' ' background-color : #ffc107 !important;\n' ' }\n' ' .w3-bottombar {\n' ' border-bottom: 6px solid white !important;\n' ' }\n' ' .w3-dropdown-hover:first-child{\n' ' background-color : #ffc107!important;\n' ' }\n' '\t\ttable{\n' '\t\t\tborder-collapse:collapse;border-spacing:0;width:100%;display:table;\n' '\t\t}\n' '\t\ttable, th, td {\n' '\t\t border: 1px solid black;\n' '\t\t border-collapse: collapse;\n' '\t\t}\n' '\t\t.w3-fixed {\n' '\t\t position: fixed;\n' '\t\t bottom: 0;\n' '\t\t right: 0;\n' '\t\t width: 100%;\n' '\t\t border: 3px solid #73AD21;\n' '\t\t}\n' ' </style>\n' '\t<!-- Global site tag (gtag.js) - Google Analytics -->\n' '\t<script async ' 'src="https://www.googletagmanager.com/gtag/js?id=G-T1K5BBRL9W"></script>\n' '\t<script>\n' '\t window.dataLayer = window.dataLayer || [];\n' '\t function gtag(){dataLayer.push(arguments);}\n' "\t gtag('js', new Date());\n" '\n' "\t gtag('config', 'G-T1K5BBRL9W');\n" '\t</script>\n' '</head>\n' '<body>\n' '<div id="ads-block-showing" style="position: fixed;top: 0;left: 0;bottom: ' '0;right: 0;overflow: auto;z-index:1000;background: white;display:none;">\n' '\t<p style="margin: 0 auto;color: red;font-size: 40px;text-align: ' 'center;margin-top: 50px;">Please disable Ads Blocker to continue ' 'reading</p>\n' '\t<p style="margin: 0 auto;color: green;font-size: 40px;text-align: ' 'center;margin-top: 50px;text-decoration: underline;"><a href=\'#\' ' "onclick='location.reload(true); return false;'>Reload page after disabled " 'Ads Blocker</a></p>\n' '</div\n' '<div class="w3-container">\n' ' <div class="w3-row" style="margin-top:20px">\n' ' <div class="w3-col m4 l4 s12 w3-center">\n' ' <a href="/"><span class="w3-text-orange" ' 'style="font-size:40px;text-shadow:1px 1px 0 #444">Coding With Fun <i ' 'class="fa fa-bath"></i></span></a>\n' ' </div>\n' ' <div class="w3-col m4 l4 s12 w3-center">\n' ' <div class="w3-col m10">\n' ' <input class="w3-input w3-border w3-round-xlarge" id="kw" ' 'placeholder="Search here..." type="text" >\n' ' </div>\n' ' <div class="w3-col m2">\n' ' <i class="fa fa-search fa-2x" ' 'style="cursor:pointer;margin-top: 6px;" onclick="search()"></i… <trimmed 5922 bytes string> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'post': None, 'post_related': None}] |
node | <Block Node: content. Contents: [<TextNode: '\n\n '>]> |
self | [<django.template.defaulttags.LoadNode object at 0x7f269815ed90>, <TextNode: '\n<!DOCTYPE html>\n<html>\n<'>, <Block Node: title. Contents: [<TextNode: '\n\n '>]>, <TextNode: '\n <meta name="msvalidate'>, <django.templatetags.static.StaticNode object at 0x7f26980bc700>, <TextNode: '" type = "image/x-icon"> '>, <django.templatetags.static.StaticNode object at 0x7f26980bca00>, <TextNode: '">\n <link rel="styleshee'>, <django.templatetags.static.StaticNode object at 0x7f26980bc370>, <TextNode: '">\n <link rel="styleshee'>, <django.templatetags.static.StaticNode object at 0x7f26980bc610>, <TextNode: '">\n \n <script>\n\tlet can'>, <django.templatetags.static.StaticNode object at 0x7f26980bc5b0>, <TextNode: '"></script>\n <script src'>, <django.templatetags.static.StaticNode object at 0x7f269812d820>, <TextNode: '"></script>\n\n<script asyn'>, <django.template.defaulttags.URLNode object at 0x7f269812d1c0>, <TextNode: '" class="w3-bar-item w3-b'>, <django.template.defaulttags.URLNode object at 0x7f269812d160>, <TextNode: '" class="w3-bar-item w3-b'>, <django.template.defaulttags.URLNode object at 0x7f269812dc40>, <TextNode: '" class="w3-bar-item w3-b'>, <django.template.defaulttags.URLNode object at 0x7f269812db80>, <TextNode: '" class="w3-bar-item w3-b'>, <django.template.defaulttags.URLNode object at 0x7f26980be3a0>, <TextNode: '" class="w3-bar-item w3-b'>, <django.template.defaulttags.URLNode object at 0x7f26980be7c0>, <TextNode: '" class="w3-bar-item w3-b'>, <django.template.defaulttags.URLNode object at 0x7f26980be430>, <TextNode: '" class="w3-bar-item w3-b'>, <django.template.defaulttags.URLNode object at 0x7f26980be130>, <TextNode: '" class="w3-bar-item w3-b'>, <Block Node: content. Contents: [<TextNode: '\n\n '>]>, <TextNode: '\n\n </div>\n</div>\n\n<div'>, <django.template.defaulttags.URLNode object at 0x7f26980bef70>, <TextNode: '">Privacy Policy</a></p>\n'>] |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)…
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.render_context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'post': None, 'post_related': None}] |
self | <Block Node: content. Contents: [<TextNode: '\n\n '>]> |
/usr/local/lib/python3.8/dist-packages/django/template/loader_tags.py
in render
push = block = block_context.pop(self.name)
if block is None:
block = self
# Create new block so we can store context without thread-safety issues.
block = type(self)(block.name, block.nodelist)
block.context = context
context['block'] = block
result = block.nodelist.render(context)…
if push is not None:
block_context.push(self.name, push)
return result
def super(self):
if not hasattr(self, 'context'):
Variable | Value |
---|---|
block | <Block Node: content. Contents: [<TextNode: '\n'>, <django.template.defaulttags.LoadNode object at 0x7f269811e940>, <TextNode: '\n<style>\n\t\n\t.hljs-ln-numb'>, <Variable Node: post.title>, <TextNode: '</h1>\n\t\t\t\t</div>\n\t\t\t\t<hr '>, <IfNode>, <TextNode: '\n\t\t\t\t\t\t'>, <IfNode>, <TextNode: '\n\t\t\t\t\t <span class="w3-'>, <django.template.defaulttags.URLNode object at 0x7f26981a1760>, <TextNode: '"><i class="fa fa-bars"><'>, <Variable Node: post.category.title>, <TextNode: '</a></span>\n\n\t\t\t\t\t</p>\n\t\t'>, <IfNode>, <TextNode: '\n\t\t\t\t\n\t\t\t\t<hr style="marg'>, <django.template.defaulttags.AutoEscapeControlNode object at 0x7f269888d100>, <TextNode: '\n\t\t\t\t</div>\n\n\t\t\t\t<hr/>\n\t\t'>, <ForNode: for post_current in post_related, tail_len: 5>, <TextNode: '\n\t\t</div>\n\t</div>\n\n</div>'>, <django.templatetags.static.StaticNode object at 0x7f26989ca910>, <TextNode: '"></script>\n<script src="'>]> |
block_context | <django.template.loader_tags.BlockContext object at 0x7f26989ca7c0> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'post': None, 'post_related': None}] |
push | <Block Node: content. Contents: [<TextNode: '\n'>, <django.template.defaulttags.LoadNode object at 0x7f269811e940>, <TextNode: '\n<style>\n\t\n\t.hljs-ln-numb'>, <Variable Node: post.title>, <TextNode: '</h1>\n\t\t\t\t</div>\n\t\t\t\t<hr '>, <IfNode>, <TextNode: '\n\t\t\t\t\t\t'>, <IfNode>, <TextNode: '\n\t\t\t\t\t <span class="w3-'>, <django.template.defaulttags.URLNode object at 0x7f26981a1760>, <TextNode: '"><i class="fa fa-bars"><'>, <Variable Node: post.category.title>, <TextNode: '</a></span>\n\n\t\t\t\t\t</p>\n\t\t'>, <IfNode>, <TextNode: '\n\t\t\t\t\n\t\t\t\t<hr style="marg'>, <django.template.defaulttags.AutoEscapeControlNode object at 0x7f269888d100>, <TextNode: '\n\t\t\t\t</div>\n\n\t\t\t\t<hr/>\n\t\t'>, <ForNode: for post_current in post_related, tail_len: 5>, <TextNode: '\n\t\t</div>\n\t</div>\n\n</div>'>, <django.templatetags.static.StaticNode object at 0x7f26989ca910>, <TextNode: '"></script>\n<script src="'>]> |
self | <Block Node: content. Contents: [<TextNode: '\n\n '>]> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)…
else:
bit = node
bits.append(str(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | '\n\t\t\t\t\t <span class="w3-margin-right"><a href="' |
bits | ['\n', '', '\n' '<style>\n' '\t\n' '\t.hljs-ln-numbers {\n' '\t\t-webkit-touch-callout: none;\n' '\t\t-webkit-user-select: none;\n' '\t\t-khtml-user-select: none;\n' '\t\t-moz-user-select: none;\n' '\t\t-ms-user-select: none;\n' '\t\tuser-select: none;\n' '\n' '\t\ttext-align: center;\n' '\t\tcolor: #ccc;\n' '\t\tborder-right: 1px solid #CCC;\n' '\t\tvertical-align: top;\n' '\t\tpadding-right: 5px !important;\n' '\t}\n' '\n' '\t.hljs-ln-code {\n' '\t\tpadding-left: 10px !important;\n' '\t}\n' '\t\n' '\tpre code{\n' '\t\toverflow: auto;\n' '\t}\n' '\timg {\n' '\t\tmax-width:100% !important;\n' '\t\theight:auto !important;\n' '\t}\n' '\t.table-content a {\n' '\t\tcolor : blue;\n' '\t}\n' '\t.related {\n' '\t\tfont-weight: bold;\n' '\t\tfont-size: 22px;\n' '\t}\n' '\t.question-related {\n' '\t\tfont-weight: bold;\n' '\t}\n' '</style>\n' '<div class="w3-col m2 w3-hide-small">\n' '\t<br/>\n' '\n' '</div>\n' '<div class="w3-col m7">\n' '\t<div class="w3-content" id="contentData">\n' '\t\t<div class="w3-row w3-margin">\n' '\t\t\t <div class="w3-row w3-round-small">\n' '\t\t\t\t<h1 style="font-size:32px;font-weight: 500;">', '', '</h1>\n' '\t\t\t\t</div>\n' '\t\t\t\t<hr style="margin: 0px !important;"/>\n' '\t\t\t\t<p style="font-size:13px;opacity: 0.7;">\n' '\n' '\t\t\t\t\t\t', '', '\n\t\t\t\t\t\t', '\n' '\t\t\t\t\t\t\t<span class="w3-margin-right"><i class="fa fa-clock-o"></i> ' '</span>\n' '\t\t\t\t\t\t', '\n\t\t\t\t\t <span class="w3-margin-right"><a href="'] |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'post': None, 'post_related': None}] |
node | <django.template.defaulttags.URLNode object at 0x7f26981a1760> |
self | [<TextNode: '\n'>, <django.template.defaulttags.LoadNode object at 0x7f269811e940>, <TextNode: '\n<style>\n\t\n\t.hljs-ln-numb'>, <Variable Node: post.title>, <TextNode: '</h1>\n\t\t\t\t</div>\n\t\t\t\t<hr '>, <IfNode>, <TextNode: '\n\t\t\t\t\t\t'>, <IfNode>, <TextNode: '\n\t\t\t\t\t <span class="w3-'>, <django.template.defaulttags.URLNode object at 0x7f26981a1760>, <TextNode: '"><i class="fa fa-bars"><'>, <Variable Node: post.category.title>, <TextNode: '</a></span>\n\n\t\t\t\t\t</p>\n\t\t'>, <IfNode>, <TextNode: '\n\t\t\t\t\n\t\t\t\t<hr style="marg'>, <django.template.defaulttags.AutoEscapeControlNode object at 0x7f269888d100>, <TextNode: '\n\t\t\t\t</div>\n\n\t\t\t\t<hr/>\n\t\t'>, <ForNode: for post_current in post_related, tail_len: 5>, <TextNode: '\n\t\t</div>\n\t</div>\n\n</div>'>, <django.templatetags.static.StaticNode object at 0x7f26989ca910>, <TextNode: '"></script>\n<script src="'>] |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)…
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.render_context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'post': None, 'post_related': None}] |
self | <django.template.defaulttags.URLNode object at 0x7f26981a1760> |
/usr/local/lib/python3.8/dist-packages/django/template/defaulttags.py
in render
current_app = context.request.resolver_match.namespace
except AttributeError:
current_app = None
# Try to look up the URL. If it fails, raise NoReverseMatch unless the
# {% url ... as var %} construct is used, in which case return nothing.
url = ''
try:
url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)…
except NoReverseMatch:
if self.asvar is None:
raise
if self.asvar:
context[self.asvar] = url
Variable | Value |
---|---|
NoReverseMatch | <class 'django.urls.exceptions.NoReverseMatch'> |
args | [''] |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'post': None, 'post_related': None}] |
current_app | '' |
kwargs | {} |
reverse | <function reverse at 0x7f269c4c6820> |
self | <django.template.defaulttags.URLNode object at 0x7f26981a1760> |
url | '' |
view_name | 'post_category' |
/usr/local/lib/python3.8/dist-packages/django/urls/base.py
in reverse
(key, ':'.join(resolved_path))
)
else:
raise NoReverseMatch("%s is not a registered namespace" % key)
if ns_pattern:
resolver = get_ns_resolver(ns_pattern, resolver, tuple(ns_converters.items()))
return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))…
reverse_lazy = lazy(reverse, str)
def clear_url_caches():
Variable | Value |
---|---|
args | [''] |
current_app | '' |
current_path | None |
kwargs | {} |
ns_converters | {} |
ns_pattern | '' |
parts | ['post_category'] |
path | [] |
prefix | '/' |
resolved_path | [] |
resolver | <URLResolver 'mysite.urls' (None:None) '^/'> |
urlconf | 'mysite.urls' |
view | 'post_category' |
viewname | 'post_category' |
/usr/local/lib/python3.8/dist-packages/django/urls/resolvers.py
in _reverse_with_prefix
(lookup_view_s, arg_msg, len(patterns), patterns)
)
else:
msg = (
"Reverse for '%(view)s' not found. '%(view)s' is not "
"a valid view function or pattern name." % {'view': lookup_view_s}
)
raise NoReverseMatch(msg)…
Variable | Value |
---|---|
_prefix | '/' |
arg_msg | "arguments '('',)'" |
args | ('',) |
candidate_pat | '/c/%(slug)s/' |
candidate_subs | {'slug': ''} |
converters | {'slug': <django.urls.converters.SlugConverter object at 0x7f269c4c5190>} |
defaults | {} |
k | 'slug' |
kwargs | {} |
lookup_view | 'post_category' |
lookup_view_s | 'post_category' |
m | None |
msg | ("Reverse for 'post_category' with arguments '('',)' not found. 1 pattern(s) " "tried: ['c/(?P<slug>[-a-zA-Z0-9_]+)/$']") |
n | None |
params | ['slug'] |
pattern | 'c/(?P<slug>[-a-zA-Z0-9_]+)/$' |
patterns | ['c/(?P<slug>[-a-zA-Z0-9_]+)/$'] |
possibilities | [([('c/%(slug)s/', ['slug'])], 'c/(?P<slug>[-a-zA-Z0-9_]+)/$', {}, {'slug': <django.urls.converters.SlugConverter object at 0x7f269c4c5190>})] |
possibility | [('c/%(slug)s/', ['slug'])] |
result | 'c/%(slug)s/' |
self | <URLResolver 'mysite.urls' (None:None) '^/'> |
text_candidate_subs | {'slug': ''} |
v | '' |
AnonymousUser
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
CONTENT_LENGTH | '' |
CONTENT_TYPE | 'text/plain' |
DJANGO_SETTINGS_MODULE | 'mysite.settings' |
GATEWAY_INTERFACE | 'CGI/1.1' |
HOME | '/root' |
HTTP_ACCEPT | '*/*' |
HTTP_ACCEPT_ENCODING | 'gzip, br' |
HTTP_CDN_LOOP | 'cloudflare' |
HTTP_CF_CONNECTING_IP | '3.94.150.98' |
HTTP_CF_IPCOUNTRY | 'US' |
HTTP_CF_RAY | '86b7f2465b5282f6-IAD' |
HTTP_CF_VISITOR | '{"scheme":"https"}' |
HTTP_CONNECTION | 'close' |
HTTP_HOST | 'codingwithfun.com' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_X_FORWARDED_FOR | '3.94.150.98, 172.70.175.44' |
HTTP_X_FORWARDED_PROTO | 'https' |
HTTP_X_REAL_IP | '172.70.175.44' |
LANG | 'en_US.UTF-8' |
LESSCLOSE | '/usr/bin/lesspipe %s %s' |
LESSOPEN | '| /usr/bin/lesspipe %s' |
LOGNAME | 'root' |
LS_COLORS | 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:' |
MOTD_SHOWN | 'pam' |
OLDPWD | '/home/ComicsApp/Api' |
PATH | '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games' |
PATH_INFO | '/p/cloud-development-high-level-usage-of-cloud-databases/' |
PWD | '/home/django_w3cschool' |
QUERY_STRING | '' |
REMOTE_ADDR | '127.0.0.1' |
REMOTE_HOST | '' |
REQUEST_METHOD | 'GET' |
RUN_MAIN | 'true' |
SCRIPT_NAME | '' |
SERVER_NAME | 'localhost.localdomain' |
SERVER_PORT | '8002' |
SERVER_PROTOCOL | 'HTTP/1.0' |
SERVER_SOFTWARE | 'WSGIServer/0.2' |
SHELL | '/bin/bash' |
SHLVL | '3' |
SSH_CLIENT | '14.231.220.113 59074 22' |
SSH_CONNECTION | '14.231.220.113 59074 192.3.11.108 22' |
SSH_TTY | '/dev/pts/0' |
TERM | 'xterm' |
TZ | 'UTC' |
USER | 'root' |
XDG_RUNTIME_DIR | '/run/user/0' |
XDG_SESSION_CLASS | 'user' |
XDG_SESSION_ID | '18' |
XDG_SESSION_TYPE | 'tty' |
_ | '/bin/sh' |
wsgi.errors | <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'> |
wsgi.file_wrapper | '' |
wsgi.input | <django.core.handlers.wsgi.LimitedStream object at 0x7f2698a77d30> |
wsgi.multiprocess | False |
wsgi.multithread | True |
wsgi.run_once | False |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
mysite.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | ['*'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'auth.User' |
BASE_DIR | '/home/django_w3cschool' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CKEDITOR_ALLOW_NONIMAGE_FILES | True |
CKEDITOR_BROWSE_SHOW_DIRS | True |
CKEDITOR_CONFIGS | {'default': {'extraPlugins': 'uploadimage,div,autolink,autoembed,embedsemantic,autogrow,widget,lineutils,clipboard,dialog,dialogui,elementspath,codesnippet', 'height': 700, 'tabSpaces': 4, 'toolbar': 'YourCustomToolbarConfig', 'toolbar_Basic': [['Source', '-', 'Bold', 'Italic']], 'toolbar_YourCustomToolbarConfig': [{'items': ['Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates'], 'name': 'document'}, {'items': ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'], 'name': 'clipboard'}, {'items': ['Find', 'Replace', '-', 'SelectAll'], 'name': 'editing'}, {'items': ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'], 'name': 'forms'}, '/', {'items': ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat'], 'name': 'basicstyles'}, {'items': ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language'], 'name': 'paragraph'}, {'items': ['Link', 'Unlink', 'Anchor'], 'name': 'links'}, {'items': ['Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe'], 'name': 'insert'}, '/', {'items': ['Styles', 'Format', 'Font', 'FontSize'], 'name': 'styles'}, {'items': ['TextColor', 'BGColor'], 'name': 'colors'}, {'items': ['Maximize', 'ShowBlocks'], 'name': 'tools'}, {'items': ['About'], 'name': 'about'}, '/', {'items': ['Preview', 'CodeSnippet'], 'name': 'yourcustomtools'}], 'width': '100%'}} |
CKEDITOR_UPLOAD_PATH | 'uploads/' |
CRISPY_TEMPLATE_PACK | 'bootstrap4' |
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': 'localhost', 'NAME': 'django_w3cschool', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '3306', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'root'}} |
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', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y'] |
DATE_FORMAT | 'N j, Y' |
DATE_INPUT_FORMATS | ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] |
DEBUG | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
DECIMAL_SEPARATOR | '.' |
DEFAULT_CHARSET | 'utf-8' |
DEFAULT_CONFIG | {'filebrowserWindowHeight': 725, 'filebrowserWindowWidth': 940, 'height': 291, 'skin': 'moono-lisa', 'toolbar': 'Full', 'toolbar_Basic': [['Source', '-', 'Bold', 'Italic']], 'toolbar_Full': [['Styles', 'Format', 'Bold', 'Italic', 'Underline', 'Strike', 'SpellChecker', 'Undo', 'Redo'], ['Link', 'Unlink', 'Anchor'], ['Image', 'Flash', 'Table', 'HorizontalRule'], ['TextColor', 'BGColor'], ['Smiley', 'SpecialChar'], ['Source']], 'width': 835} |
DEFAULT_CONTENT_TYPE | 'text/html' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | 'localhost' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | '' |
EMAIL_PORT | 25 |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_LOCALTIME | False |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | False |
FILE_CHARSET | 'utf-8' |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
FILE_UPLOAD_PERMISSIONS | None |
FILE_UPLOAD_TEMP_DIR | None |
FIRST_DAY_OF_WEEK | 0 |
FIXTURE_DIRS | [] |
FORCE_SCRIPT_NAME | None |
FORMAT_MODULE_PATH | None |
FORM_RENDERER | 'django.forms.renderers.DjangoTemplates' |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'blog', 'crispy_forms', 'ckeditor', 'ckeditor_uploader', 'django.contrib.sitemaps'] |
INTERNAL_IPS | [] |
LANGUAGES | [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] |
LANGUAGES_BIDI | ['he', 'ar', 'fa', 'ur'] |
LANGUAGE_CODE | 'en-us' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_NAME | 'django_language' |
LANGUAGE_COOKIE_PATH | '/' |
LOCALE_PATHS | [] |
LOGGING | {} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGIN_URL | '/accounts/login/' |
LOGOUT_REDIRECT_URL | None |
MANAGERS | [] |
MEDIA_ROOT | '/home/django_w3cschool/media/' |
MEDIA_URL | '/media/' |
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'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
ROOT_URLCONF | 'mysite.urls' |
SECRET_KEY | '********************' |
SECURE_BROWSER_XSS_FILTER | False |
SECURE_CONTENT_TYPE_NOSNIFF | False |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
SECURE_HSTS_PRELOAD | False |
SECURE_HSTS_SECONDS | 0 |
SECURE_PROXY_SSL_HEADER | None |
SECURE_REDIRECT_EXEMPT | [] |
SECURE_SSL_HOST | None |
SECURE_SSL_REDIRECT | False |
SERVER_EMAIL | 'root@localhost' |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_AGE | 1209600 |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_HTTPONLY | True |
SESSION_COOKIE_NAME | 'sessionid' |
SESSION_COOKIE_PATH | '/' |
SESSION_COOKIE_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 | 'mysite.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 | ['/home/django_w3cschool/static'] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/home/django_w3cschool/staticfiles' |
STATIC_URL | '/static/' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/home/django_w3cschool/templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}] |
TEMPLATES_DIR | '/home/django_w3cschool/templates' |
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 | False |
USE_X_FORWARDED_PORT | False |
WSGI_APPLICATION | 'mysite.wsgi.application' |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
YEAR_MONTH_FORMAT | 'F Y' |
You're seeing this error because you have DEBUG = True
in your
Django settings file. Change that to False
, and Django will
display a standard page generated by the handler for this status code.