The 'logo' attribute has no file associated with it.
Request Method: | GET |
---|---|
Request URL: | http://www.bazhum.muzhp.pl/wydawnictwo/288/ |
Django Version: | 2.2.18 |
Exception Type: | ValueError |
Exception Value: | The 'logo' attribute has no file associated with it. |
Exception Location: | /usr/local/lib/python3.8/site-packages/django/db/models/fields/files.py in _require_file, line 38 |
Python Executable: | /usr/local/bin/python |
Python Version: | 3.8.8 |
Python Path: | ['/src/czashum', '/usr/local/bin', '/usr/local/lib/python38.zip', '/usr/local/lib/python3.8', '/usr/local/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/site-packages'] |
Server time: | Pt, 29 Mar 2024 11:23:40 +0100 |
In template /src/czashum/czashum/templates/page_wydawnictwo.html
, error at line 27
17 | <li> |
---|---|
18 | Tel. {{ publisher.phone_number }} |
19 | </li> |
20 | <li> |
21 | Strona www: <a href="{{ publisher.site }}">{{ publisher.site }}</a> |
22 | </li> |
23 | </ul> |
24 | <br> |
25 | </div> |
26 | <div class="wydawnictwo_logo"> |
27 | <img alt="" src="{{ publisher.logo.url }}"/> |
28 | </div> |
29 | </div> |
30 | |
31 | <div class="mainbar"> |
32 | <div class="content"> |
33 | {{ description }} |
34 | </div> |
35 | </div> |
36 | |
37 | </div> |
/usr/local/lib/python3.8/site-packages/django/template/base.py
in _resolve_lookup
detail and shouldn't be called by external code. Use Variable.resolve()
instead.
"""
current = context
try: # catch-all for silent variable failures
for bit in self.lookups:
try: # dictionary lookup
current = current[bit]…
# ValueError/IndexError are for numpy.array lookup on
# numpy < 1.9 and 1.9+ respectively
except (TypeError, AttributeError, KeyError, ValueError, IndexError):
try: # attribute lookup
# Don't return class attributes if the class is the context:
if isinstance(current, BaseContext) and getattr(type(current), bit):
Variable | Value |
---|---|
bit | 'url' |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'publisher': <JournalContributorData: None>, 'description': 'None', 'media_url': '/media/', 'header': 'tmpl_top_czashum.html', 'footer': 'tmpl_tail_czashum.php'}] |
current | <ImageFieldFile: None> |
self | <Variable: 'publisher.logo.url'> |
template_name | 'page_wydawnictwo.html' |
/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py
in inner
This decorator is automatically applied to all middleware to ensure that
no middleware leaks an exception and that the next middleware in the stack
can rely on getting a response instead of an exception.
"""
@wraps(get_response)
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 | ValueError("The 'logo' attribute has no file associated with it.") |
get_response | <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7fe627021f10>> |
request | <WSGIRequest: GET '/wydawnictwo/288/'> |
/usr/local/lib/python3.8/site-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 PublisherView at 0x7fe626f60d30> |
callback_args | ('288',) |
callback_kwargs | {} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7fe62704fe80>> |
request | <WSGIRequest: GET '/wydawnictwo/288/'> |
resolver | <URLResolver 'czashum_www.urls' (None:None) '^/'> |
resolver_match | ResolverMatch(func=czashum.views.PublisherView, args=('288',), kwargs={}, url_name=publisher, app_names=[], namespaces=[], route=^wydawnictwo/(\d+)/$) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7fe627021f10> |
wrapped_callback | <function PublisherView at 0x7fe626f60d30> |
/usr/local/lib/python3.8/site-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 PublisherView at 0x7fe626f60d30> |
callback_args | ('288',) |
callback_kwargs | {} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7fe62704fe80>> |
request | <WSGIRequest: GET '/wydawnictwo/288/'> |
resolver | <URLResolver 'czashum_www.urls' (None:None) '^/'> |
resolver_match | ResolverMatch(func=czashum.views.PublisherView, args=('288',), kwargs={}, url_name=publisher, app_names=[], namespaces=[], route=^wydawnictwo/(\d+)/$) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7fe627021f10> |
wrapped_callback | <function PublisherView at 0x7fe626f60d30> |
/usr/local/lib/python3.8/site-packages/django/views/generic/base.py
in view
self.head = self.get
self.setup(request, *args, **kwargs)
if not hasattr(self, 'request'):
raise AttributeError(
"%s instance has no 'request' attribute. Did you override "
"setup() and forget to call super()?" % cls.__name__
)
return self.dispatch(request, *args, **kwargs)…
view.view_class = cls
view.view_initkwargs = initkwargs
# take name and docstring from class
update_wrapper(view, cls, updated=())
Variable | Value |
---|---|
args | ('288',) |
cls | <class 'czashum.views.PublisherView'> |
initkwargs | {} |
kwargs | {} |
request | <WSGIRequest: GET '/wydawnictwo/288/'> |
self | <czashum.views.PublisherView object at 0x7fe626d9e6a0> |
/usr/local/lib/python3.8/site-packages/django/views/generic/base.py
in dispatch
# Try to dispatch to the right method; if a method doesn't exist,
# defer to the error handler. Also defer to the error handler if the
# request method isn't on the approved list.
if request.method.lower() in self.http_method_names:
handler = getattr(self, request.method.lower(), self.http_method_not_allowed)
else:
handler = self.http_method_not_allowed
return handler(request, *args, **kwargs)…
def http_method_not_allowed(self, request, *args, **kwargs):
logger.warning(
'Method Not Allowed (%s): %s', request.method, request.path,
extra={'status_code': 405, 'request': request}
)
Variable | Value |
---|---|
args | ('288',) |
handler | <bound method PublisherView.get of <czashum.views.PublisherView object at 0x7fe626d9e6a0>> |
kwargs | {} |
request | <WSGIRequest: GET '/wydawnictwo/288/'> |
self | <czashum.views.PublisherView object at 0x7fe626d9e6a0> |
/src/czashum/czashum/views.py
in get
"description": mark_safe(publisher_data[0].description)
if publisher_data
else "",
"media_url": MEDIA_URL,
"header": HEADER,
"footer": FOOTER,
}
return render(request, "page_wydawnictwo.html", context)…
class PublisherListView(View):
_parser = DSLDataParser()
def get(self, request):
Variable | Value |
---|---|
context | {'description': 'None', 'footer': 'tmpl_tail_czashum.php', 'header': 'tmpl_top_czashum.html', 'media_url': '/media/', 'publisher': <JournalContributorData: None>} |
id | '288' |
publisher_data | <QuerySet [<JournalContributorData: None>]> |
request | <WSGIRequest: GET '/wydawnictwo/288/'> |
self | <czashum.views.PublisherView object at 0x7fe626d9e6a0> |
title | 'Płocki Instytut Wydawniczy' |
/usr/local/lib/python3.8/site-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 | {'description': 'None', 'footer': 'tmpl_tail_czashum.php', 'header': 'tmpl_top_czashum.html', 'media_url': '/media/', 'publisher': <JournalContributorData: None>} |
request | <WSGIRequest: GET '/wydawnictwo/288/'> |
status | None |
template_name | 'page_wydawnictwo.html' |
using | None |
/usr/local/lib/python3.8/site-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 | {'description': 'None', 'footer': 'tmpl_tail_czashum.php', 'header': 'tmpl_top_czashum.html', 'media_url': '/media/', 'publisher': <JournalContributorData: None>} |
request | <WSGIRequest: GET '/wydawnictwo/288/'> |
template | <django.template.backends.django.Template object at 0x7fe626d9eca0> |
template_name | 'page_wydawnictwo.html' |
using | None |
/usr/local/lib/python3.8/site-packages/django/template/backends/django.py
in render
@property
def origin(self):
return self.template.origin
def render(self, context=None, request=None):
context = make_context(context, request, autoescape=self.backend.engine.autoescape)
try:
return self.template.render(context)…
except TemplateDoesNotExist as exc:
reraise(exc, self.backend)
def copy_exception(exc, backend=None):
"""
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'publisher': <JournalContributorData: None>, 'description': 'None', 'media_url': '/media/', 'header': 'tmpl_top_czashum.html', 'footer': 'tmpl_tail_czashum.php'}] |
request | <WSGIRequest: GET '/wydawnictwo/288/'> |
self | <django.template.backends.django.Template object at 0x7fe626d9eca0> |
/usr/local/lib/python3.8/site-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}, {}, {}, {'publisher': <JournalContributorData: None>, 'description': 'None', 'media_url': '/media/', 'header': 'tmpl_top_czashum.html', 'footer': 'tmpl_tail_czashum.php'}] |
self | <django.template.base.Template object at 0x7fe626d9e8b0> |
/usr/local/lib/python3.8/site-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}, {}, {}, {'publisher': <JournalContributorData: None>, 'description': 'None', 'media_url': '/media/', 'header': 'tmpl_top_czashum.html', 'footer': 'tmpl_tail_czashum.php'}] |
self | <django.template.base.Template object at 0x7fe626d9e8b0> |
/usr/local/lib/python3.8/site-packages/django/template/base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)…
else:
bit = node
bits.append(str(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | ('</a>\n' ' </li>\n' ' </ul>\n' '\t\t\t\t<br>\n' '\t\t\t</div>\n' '\t\t\t<div class="wydawnictwo_logo">\n' '\t\t\t\t<img alt="" src="') |
bits | ['\n' '<!DOCTYPE html>\n' '<head>\n' '<!-- michal.szotaXgmail.com -->\n' '\t<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n' '\t<title></title>\n' '\n' '\t<meta property="og:title" content="Test">\n' '\t<meta property="og:image" content="">\n' '\t<meta property="og:type" content="website">\n' '\t<meta property="og:description" content="">\n' '\t<meta name="description" content="">\n' '\t<meta name="robots" content="index,follow">\n' '\t<meta http-equiv="imagetoolbar" content="no">\n' '\n' '\t<script ' 'src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>\n' '\n' '\t<link rel="stylesheet" ' 'href="/static/font-awesome-4.0.1/css/font-awesome.min.css">\n' '\t<link rel="icon" href="favicon.ico" type="image/ico">\n' '\n' '\t<script type="text/javascript">\n' '\tWebFontConfig = {\n' "\tgoogle: { families: [ 'Open+Sans:400italic,400,700:latin,latin-ext', " "'Archivo+Black::latin,latin-ext' ] }\n" '\t};\n' '\t(function() {\n' "\tvar wf = document.createElement('script');\n" "\twf.src = ('https:' == document.location.protocol ? 'https' : 'http') +\n" "\t'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';\n" "\twf.type = 'text/javascript';\n" "\twf.async = 'true';\n" "\tvar s = document.getElementsByTagName('script')[0];\n" '\ts.parentNode.insertBefore(wf, s);\n' '\t})(); </script>\n' '\n' '\t<link rel="stylesheet/less" type="text/css" href="/static/style.less">\n' '\t<script type="text/javascript" src="/static/less-1.3.0.min.js"></script>\n' '\t<script>\n' '\tvar less = {env: "development"};\n' '\tlocalStorage.clear();\n' '\t</script>\n' '\n' '<script>\n' ' ' "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n" ' (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new ' 'Date();a=s.createElement(o),\n' ' ' 'm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n' ' ' "})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n" '\n' " ga('create', 'UA-70803376-1', 'auto');\n" " ga('send', 'pageview');\n" '\n' '</script>\n' '\n' '\t<script>\n' '\t\t$(function() {\n' "\t\t\t$('.box_okladka_big .fg').addClass('open'); // animacja okładki " 'poprzez css transition\n' '\n' "\t\t\t$('.czynnosc.udostepnij').click(function() {\n" "\t\t\t\t$('.opis',this).hide();\n" "\t\t\t\t$('.udostepnij_menu',this).slideDown();\n" '\t\t\t});\n' '\n' "\t\t\t$('.czynnosc.zacytuj').click(function() {\n" "\t\t\t\t$t=$(this).parents('tr').next('.cytowanie');\n" '\t\t\t\t$t.toggle();\n' "\t\t\t\t$('.item',$t).slideDown();\n" '\t\t\t});\n' '\n' '\n' '\t\t\t$(window).resize(function() {\n' "\t\t\t\t$ts=$('.textpage .sidebar'); $tm=$('.textpage .mainbar');\n" '\t\t\t\tif ($ts.outerHeight()<$tm.outerHeight()) ' '$ts.height($tm.outerHeight());\n' '\n' '\t\t\t\t// stopka zawsze na dole\n' "\t\t\t\t$f=$('footer');\n" "\t\t\t\tif ($('#contentwrap').height() < $(window).height()) {\n" '\t\t\t\t\t' "$('.spacer',$f).height($(window).height()-$('#contentwrap').height()-$('.footercontent',$f).outerHeight());\n" '\t\t\t\t}\n' '\n' '\t\t\t}).resize();\n' '\n' '\t\t\t$(window).load(function() {\n' '\t\t\t\t$(window).resize();\n' '\t\t\t});\n' '\t\t});\n' '\t</script>\n' '\n' '<body>\n' '<div id="contentwrap">\n', '\n', '<!-- linki są ustawione na sztywno i oczywiscie tymczasowe -->\n' '<div class="block_top">\n' '\t<div class="blockwrap">\n' '\t\t<div class="box_logo">\n' '\t\t\t<h1><a href="/">Czasopisma<br>humanistyczne</a></h1>\n' '\t\t\t<div class="submenu">\n' '\t\t\t\t<a href="/oprojekcie/">O projekcie</a>\n' '\n' '\t\t\t\t<!-- mozna dokladac wiecej pozycji -->\n' '\t\t\t</div>\n' '\t\t</div>\n' '\n' '\t\t<div class="box_menu">\n' '\t\t\t<a href="/czasopismo/lista/">Lista<br>czasopism</a>\n' '\t\t</div>\n' '\t\t<div class="box_menu">\n' '\t\t\t<a href="/autor/lista/">Lista<br>autorów</a>\n' '\t\t</div>\n' '\t\t<div class="box_menu">\n' '\t\t\t<a href="/wydawnictwo/lista/">Lista<br>wydawnictw</a>\n' '\t\t</div>\n' '\t\t<div class=… <trimmed 5485 bytes string> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'publisher': <JournalContributorData: None>, 'description': 'None', 'media_url': '/media/', 'header': 'tmpl_top_czashum.html', 'footer': 'tmpl_tail_czashum.php'}] |
node | <Variable Node: publisher.logo.url> |
self | [<django.template.loader_tags.IncludeNode object at 0x7fe622369c40>, <TextNode: '\n'>, <django.template.loader_tags.IncludeNode object at 0x7fe622369940>, <TextNode: '\n\n<div class="block_textp'>, <Variable Node: publisher.contributor.title>, <TextNode: '</h2>\n\t\t\t<div class="cont'>, <Variable Node: publisher.street>, <TextNode: '\n </li'>, <Variable Node: publisher.city_code>, <TextNode: ' '>, <Variable Node: publisher.city>, <TextNode: '\n </li'>, <Variable Node: publisher.phone_number>, <TextNode: '\n </li'>, <Variable Node: publisher.site>, <TextNode: '">'>, <Variable Node: publisher.site>, <TextNode: '</a>\n '>, <Variable Node: publisher.logo.url>, <TextNode: '"/>\n\t\t\t</div>\n\t\t</div>\n\n\t'>, <Variable Node: description>, <TextNode: '\n\t\t\t</div>\n\t\t</div>\n\n\t</d'>, <django.template.loader_tags.IncludeNode object at 0x7fe626aacdc0>, <TextNode: '\n'>] |
/usr/local/lib/python3.8/site-packages/django/template/base.py
in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)…
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.render_context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'publisher': <JournalContributorData: None>, 'description': 'None', 'media_url': '/media/', 'header': 'tmpl_top_czashum.html', 'footer': 'tmpl_tail_czashum.php'}] |
self | <Variable Node: publisher.logo.url> |
/usr/local/lib/python3.8/site-packages/django/template/base.py
in render
self.filter_expression = filter_expression
def __repr__(self):
return "<Variable Node: %s>" % self.filter_expression
def render(self, context):
try:
output = self.filter_expression.resolve(context)…
except UnicodeDecodeError:
# Unicode conversion can fail sometimes for reasons out of our
# control (e.g. exception rendering). In that case, we fail
# quietly.
return ''
return render_value_in_context(output, context)
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'publisher': <JournalContributorData: None>, 'description': 'None', 'media_url': '/media/', 'header': 'tmpl_top_czashum.html', 'footer': 'tmpl_tail_czashum.php'}] |
self | <Variable Node: publisher.logo.url> |
/usr/local/lib/python3.8/site-packages/django/template/base.py
in resolve
self.filters = filters
self.var = var_obj
def resolve(self, context, ignore_failures=False):
if isinstance(self.var, Variable):
try:
obj = self.var.resolve(context)…
except VariableDoesNotExist:
if ignore_failures:
obj = None
else:
string_if_invalid = context.template.engine.string_if_invalid
if string_if_invalid:
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'publisher': <JournalContributorData: None>, 'description': 'None', 'media_url': '/media/', 'header': 'tmpl_top_czashum.html', 'footer': 'tmpl_tail_czashum.php'}] |
ignore_failures | False |
self | <django.template.base.FilterExpression object at 0x7fe62677cbe0> |
/usr/local/lib/python3.8/site-packages/django/template/base.py
in resolve
var)
self.lookups = tuple(var.split(VARIABLE_ATTRIBUTE_SEPARATOR))
def resolve(self, context):
"""Resolve this variable against a given context."""
if self.lookups is not None:
# We're dealing with a variable that needs to be resolved
value = self._resolve_lookup(context)…
else:
# We're dealing with a literal, so it's already been "resolved"
value = self.literal
if self.translate:
is_safe = isinstance(value, SafeData)
msgid = value.replace('%', '%%')
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'publisher': <JournalContributorData: None>, 'description': 'None', 'media_url': '/media/', 'header': 'tmpl_top_czashum.html', 'footer': 'tmpl_tail_czashum.php'}] |
self | <Variable: 'publisher.logo.url'> |
/usr/local/lib/python3.8/site-packages/django/template/base.py
in _resolve_lookup
# ValueError/IndexError are for numpy.array lookup on
# numpy < 1.9 and 1.9+ respectively
except (TypeError, AttributeError, KeyError, ValueError, IndexError):
try: # attribute lookup
# Don't return class attributes if the class is the context:
if isinstance(current, BaseContext) and getattr(type(current), bit):
raise AttributeError
current = getattr(current, bit)…
except (TypeError, AttributeError):
# Reraise if the exception was raised by a @property
if not isinstance(current, BaseContext) and bit in dir(current):
raise
try: # list-index lookup
current = current[int(bit)]
Variable | Value |
---|---|
bit | 'url' |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'publisher': <JournalContributorData: None>, 'description': 'None', 'media_url': '/media/', 'header': 'tmpl_top_czashum.html', 'footer': 'tmpl_tail_czashum.php'}] |
current | <ImageFieldFile: None> |
self | <Variable: 'publisher.logo.url'> |
template_name | 'page_wydawnictwo.html' |
/usr/local/lib/python3.8/site-packages/django/db/models/fields/files.py
in url
@property
def path(self):
self._require_file()
return self.storage.path(self.name)
@property
def url(self):
self._require_file()…
return self.storage.url(self.name)
@property
def size(self):
self._require_file()
if not self._committed:
Variable | Value |
---|---|
self | <ImageFieldFile: None> |
/usr/local/lib/python3.8/site-packages/django/db/models/fields/files.py
in _require_file
# The standard File contains most of the necessary properties, but
# FieldFiles can be instantiated without a name, so that needs to
# be checked for here.
def _require_file(self):
if not self:
raise ValueError("The '%s' attribute has no file associated with it." % self.field.name)…
def _get_file(self):
self._require_file()
if getattr(self, '_file', None) is None:
self._file = self.storage.open(self.name, 'rb')
return self._file
Variable | Value |
---|---|
self | <ImageFieldFile: None> |
AnonymousUser
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
HTTP_ACCEPT | '*/*' |
HTTP_ACCEPT_ENCODING | 'gzip' |
HTTP_HOST | 'www.bazhum.muzhp.pl' |
HTTP_REFERER | 'http://www.bazhum.muzhp.pl/wydawnictwo/288/' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_X_FORWARDED_FOR | '52.90.121.17' |
HTTP_X_FORWARDED_HOST | 'www.bazhum.muzhp.pl' |
HTTP_X_FORWARDED_PORT | '443' |
HTTP_X_FORWARDED_PROTO | 'https' |
HTTP_X_FORWARDED_SERVER | 'cd65e96692b3' |
HTTP_X_REAL_IP | '52.90.121.17' |
PATH_INFO | '/wydawnictwo/288/' |
QUERY_STRING | '' |
RAW_URI | '/wydawnictwo/288/' |
REMOTE_ADDR | '172.19.0.3' |
REMOTE_PORT | '49656' |
REQUEST_METHOD | 'GET' |
SCRIPT_NAME | '' |
SERVER_NAME | '0.0.0.0' |
SERVER_PORT | '8000' |
SERVER_PROTOCOL | 'HTTP/1.1' |
SERVER_SOFTWARE | 'gunicorn/20.0.4' |
gunicorn.socket | <socket.socket fd=8, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('172.19.0.11', 8000), raddr=('172.19.0.3', 49656)> |
wsgi.errors | <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7fe622121190> |
wsgi.file_wrapper | '' |
wsgi.input | <gunicorn.http.body.Body object at 0x7fe6221218b0> |
wsgi.input_terminated | True |
wsgi.multiprocess | True |
wsgi.multithread | False |
wsgi.run_once | False |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
czashum_www.settings
Setting | Value |
---|---|
ABOUT | 'page_tekstowa_czashum.html' |
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | () |
ADMIN_MEDIA_PREFIX | '' |
ALLOWED_HOSTS | ['czashum.muzhp.site.preview.hyperone.cloud', 'bazhum.muzhp.pl', 'www.bazhum.muzhp.pl'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'auth.User' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_NAME | 'csrftoken' |
CSRF_COOKIE_PATH | '/' |
CSRF_COOKIE_SAMESITE | 'Lax' |
CSRF_COOKIE_SECURE | False |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | [] |
CSRF_USE_SESSIONS | False |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.mysql', 'HOST': 'mysql', 'NAME': 'bazhum_bib', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'django'}} |
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_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 | [] |
ELASTICSEARCH_DSL | {'default': {'hosts': 'http://elasticsearch:9200/'}} |
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 | [] |
FOOTER | 'tmpl_tail_czashum.php' |
FORCE_SCRIPT_NAME | None |
FORMAT_MODULE_PATH | None |
FORM_RENDERER | 'django.forms.renderers.DjangoTemplates' |
HEADER | 'tmpl_top_czashum.html' |
ID_CZASOPISMA | None |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'czashum', 'bib', 'django_elasticsearch_dsl', 'django_extensions', 'fullurl') |
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 | 'pl' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_NAME | 'django_language' |
LANGUAGE_COOKIE_PATH | '/' |
LOCALE_PATHS | ('/src/czashum/czashum_www/locale',) |
LOGGING | {'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'console': {'class': 'logging.StreamHandler'}, 'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}}, 'loggers': {'django.request': {'handlers': ['console'], 'level': 'ERROR', 'propagate': True}}, 'version': 1} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGIN_URL | '/accounts/login/' |
LOGOUT_REDIRECT_URL | None |
MAIN_PAGE | 'page_home_czashum.html' |
MAIN_URL | 'http://czashum.hist.pl/' |
MANAGERS | () |
MEDIA_ROOT | '/src/czashum/czashum_www/../media' |
MEDIA_URL | '/media/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | ('whitenoise.middleware.WhiteNoiseMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PDF_PATH | '/media//files/' |
PERMISSIONS | {'guid': 'www-data', 'permission': 644, 'uid': 'www-data'} |
PREPEND_WWW | False |
PROJECT_ROOT | '/src/czashum/czashum_www' |
ROOT_URLCONF | 'czashum_www.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 | 'czashum_www.settings' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
SITE_ID | 2 |
STATICFILES_DIRS | [] |
STATICFILES_FINDERS | ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/src/czashum/czashum_www/staticfiles' |
STATIC_URL | '/static/' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/src/czashum/czashum_www/templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}] |
TEMPLATE_DEBUG | True |
TEMPLATE_DIRS | ('/src/czashum/czashum_www/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 | 'Europe/Warsaw' |
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 | 'czashum_www.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.