'NotImplementedType' object is not iterable
Request Method: | GET |
---|---|
Request URL: | http://transparencia.capitaogervasiooliveira.pi.gov.br/receitas/detalhada/consulta.pdf |
Django Version: | 1.8 |
Exception Type: | TypeError |
Exception Value: | 'NotImplementedType' object is not iterable |
Exception Location: | /usr/local/lib/python3.4/site-packages/xhtml2pdf/context.py in atFontFace, line 184 |
Python Executable: | /usr/local/bin/python |
Python Version: | 3.4.7 |
Python Path: | ['/', '/var/www', '/usr/local/bin', '/usr/local/lib/python34.zip', '/usr/local/lib/python3.4', '/usr/local/lib/python3.4/plat-linux', '/usr/local/lib/python3.4/lib-dynload', '/usr/local/lib/python3.4/site-packages'] |
Server time: | Sex, 29 Mar 2024 07:59:17 -0300 |
/usr/local/lib/python3.4/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:
# If the view raised an exception, run it through exception
# middleware, and if the exception middleware returns a
# response, use that. Otherwise, reraise the exception.
for middleware_method in self._exception_middleware:
response = middleware_method(request, e)
Variable | Value |
---|---|
resolver | <RegexURLResolver 'prefeitura_digital.urls' (None:None) ^/> |
urlconf | 'prefeitura_digital.urls' |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f6c84f8b860> |
wrapped_callback | <function LicitacaoConsultaView at 0x7f6c820fe6a8> |
response | None |
callback_kwargs | {'opcao': 'receitas', 'tipo': 'detalhada'} |
callback_args | () |
request | ('<WSGIRequest\n' 'path:/receitas/detalhada/consulta.pdf,\n' 'GET:<QueryDict: {}>,\n' 'POST:<QueryDict: {}>,\n' 'COOKIES:{},\n' "META:{'CSRF_COOKIE': 'fRIxmabWzqAFMT747TZQu3ASx58ibrnI',\n" " 'HTTP_ACCEPT': '*/*',\n" " 'HTTP_CONNECTION': 'close',\n" " 'HTTP_HOST': 'transparencia.capitaogervasiooliveira.pi.gov.br',\n" " 'HTTP_USER_AGENT': 'claudebot',\n" " 'HTTP_X_FORWARDED_FOR': '3.235.120.24',\n" " 'PATH_INFO': '/receitas/detalhada/consulta.pdf',\n" " 'QUERY_STRING': '',\n" " 'RAW_URI': '/receitas/detalhada/consulta.pdf',\n" " 'REMOTE_ADDR': '172.17.0.1',\n" " 'REMOTE_PORT': '33726',\n" " 'REQUEST_METHOD': 'GET',\n" " 'SCRIPT_NAME': '',\n" " 'SERVER_NAME': '0.0.0.0',\n" " 'SERVER_PORT': '8029',\n" " 'SERVER_PROTOCOL': 'HTTP/1.0',\n" " 'SERVER_SOFTWARE': 'gunicorn/19.7.1',\n" " 'gunicorn.socket': <socket.socket fd=10, family=AddressFamily.AF_INET, " "type=SocketKind.SOCK_STREAM, proto=0, laddr=('172.17.0.2', 8029), " "raddr=('172.17.0.1', 33726)>,\n" " 'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWrapper object at " '0x7f6c81bca9e8>,\n' " 'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,\n" " 'wsgi.input': <gunicorn.http.body.Body object at 0x7f6c81bca240>,\n" " 'wsgi.multiprocess': False,\n" " 'wsgi.multithread': False,\n" " 'wsgi.run_once': False,\n" " 'wsgi.url_scheme': 'http',\n" " 'wsgi.version': (1, 0)}>") |
resolver_match | ResolverMatch(func=apps.website.views.LicitacaoConsultaView, args=(), kwargs={'opcao': 'receitas', 'tipo': 'detalhada'}, url_name=export_licitacao_consulta, app_name=None, namespaces=[]) |
callback | <function LicitacaoConsultaView at 0x7f6c820fe6a8> |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f6c8378ab70>> |
/usr/local/lib/python3.4/site-packages/django/views/generic/base.py
in view
def view(request, *args, **kwargs):
self = cls(**initkwargs)
if hasattr(self, 'get') and not hasattr(self, 'head'):
self.head = self.get
self.request = request
self.args = args
self.kwargs = kwargs
return self.dispatch(request, *args, **kwargs)...
# take name and docstring from class
update_wrapper(view, cls, updated=())
# and possible attributes set by decorators
# like csrf_exempt from dispatch
Variable | Value |
---|---|
kwargs | {'opcao': 'receitas', 'tipo': 'detalhada'} |
args | () |
self | <apps.website.views.LicitacaoConsultaView object at 0x7f6c81bca940> |
initkwargs | {} |
request | ('<WSGIRequest\n' 'path:/receitas/detalhada/consulta.pdf,\n' 'GET:<QueryDict: {}>,\n' 'POST:<QueryDict: {}>,\n' 'COOKIES:{},\n' "META:{'CSRF_COOKIE': 'fRIxmabWzqAFMT747TZQu3ASx58ibrnI',\n" " 'HTTP_ACCEPT': '*/*',\n" " 'HTTP_CONNECTION': 'close',\n" " 'HTTP_HOST': 'transparencia.capitaogervasiooliveira.pi.gov.br',\n" " 'HTTP_USER_AGENT': 'claudebot',\n" " 'HTTP_X_FORWARDED_FOR': '3.235.120.24',\n" " 'PATH_INFO': '/receitas/detalhada/consulta.pdf',\n" " 'QUERY_STRING': '',\n" " 'RAW_URI': '/receitas/detalhada/consulta.pdf',\n" " 'REMOTE_ADDR': '172.17.0.1',\n" " 'REMOTE_PORT': '33726',\n" " 'REQUEST_METHOD': 'GET',\n" " 'SCRIPT_NAME': '',\n" " 'SERVER_NAME': '0.0.0.0',\n" " 'SERVER_PORT': '8029',\n" " 'SERVER_PROTOCOL': 'HTTP/1.0',\n" " 'SERVER_SOFTWARE': 'gunicorn/19.7.1',\n" " 'gunicorn.socket': <socket.socket fd=10, family=AddressFamily.AF_INET, " "type=SocketKind.SOCK_STREAM, proto=0, laddr=('172.17.0.2', 8029), " "raddr=('172.17.0.1', 33726)>,\n" " 'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWrapper object at " '0x7f6c81bca9e8>,\n' " 'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,\n" " 'wsgi.input': <gunicorn.http.body.Body object at 0x7f6c81bca240>,\n" " 'wsgi.multiprocess': False,\n" " 'wsgi.multithread': False,\n" " 'wsgi.run_once': False,\n" " 'wsgi.url_scheme': 'http',\n" " 'wsgi.version': (1, 0)}>") |
cls | <class 'apps.website.views.LicitacaoConsultaView'> |
/usr/local/lib/python3.4/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 |
---|---|
self | <apps.website.views.LicitacaoConsultaView object at 0x7f6c81bca940> |
kwargs | {'opcao': 'receitas', 'tipo': 'detalhada'} |
handler | <bound method LicitacaoConsultaView.get of <apps.website.views.LicitacaoConsultaView object at 0x7f6c81bca940>> |
request | ('<WSGIRequest\n' 'path:/receitas/detalhada/consulta.pdf,\n' 'GET:<QueryDict: {}>,\n' 'POST:<QueryDict: {}>,\n' 'COOKIES:{},\n' "META:{'CSRF_COOKIE': 'fRIxmabWzqAFMT747TZQu3ASx58ibrnI',\n" " 'HTTP_ACCEPT': '*/*',\n" " 'HTTP_CONNECTION': 'close',\n" " 'HTTP_HOST': 'transparencia.capitaogervasiooliveira.pi.gov.br',\n" " 'HTTP_USER_AGENT': 'claudebot',\n" " 'HTTP_X_FORWARDED_FOR': '3.235.120.24',\n" " 'PATH_INFO': '/receitas/detalhada/consulta.pdf',\n" " 'QUERY_STRING': '',\n" " 'RAW_URI': '/receitas/detalhada/consulta.pdf',\n" " 'REMOTE_ADDR': '172.17.0.1',\n" " 'REMOTE_PORT': '33726',\n" " 'REQUEST_METHOD': 'GET',\n" " 'SCRIPT_NAME': '',\n" " 'SERVER_NAME': '0.0.0.0',\n" " 'SERVER_PORT': '8029',\n" " 'SERVER_PROTOCOL': 'HTTP/1.0',\n" " 'SERVER_SOFTWARE': 'gunicorn/19.7.1',\n" " 'gunicorn.socket': <socket.socket fd=10, family=AddressFamily.AF_INET, " "type=SocketKind.SOCK_STREAM, proto=0, laddr=('172.17.0.2', 8029), " "raddr=('172.17.0.1', 33726)>,\n" " 'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWrapper object at " '0x7f6c81bca9e8>,\n' " 'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,\n" " 'wsgi.input': <gunicorn.http.body.Body object at 0x7f6c81bca240>,\n" " 'wsgi.multiprocess': False,\n" " 'wsgi.multithread': False,\n" " 'wsgi.run_once': False,\n" " 'wsgi.url_scheme': 'http',\n" " 'wsgi.version': (1, 0)}>") |
args | () |
/usr/local/lib/python3.4/site-packages/easy_pdf/views.py
in get
"""
def get(self, request, *args, **kwargs):
"""
Handles GET request and returns HTTP response.
"""
context = self.get_context_data(**kwargs)
return self.render_to_response(context)...
Variable | Value |
---|---|
request | ('<WSGIRequest\n' 'path:/receitas/detalhada/consulta.pdf,\n' 'GET:<QueryDict: {}>,\n' 'POST:<QueryDict: {}>,\n' 'COOKIES:{},\n' "META:{'CSRF_COOKIE': 'fRIxmabWzqAFMT747TZQu3ASx58ibrnI',\n" " 'HTTP_ACCEPT': '*/*',\n" " 'HTTP_CONNECTION': 'close',\n" " 'HTTP_HOST': 'transparencia.capitaogervasiooliveira.pi.gov.br',\n" " 'HTTP_USER_AGENT': 'claudebot',\n" " 'HTTP_X_FORWARDED_FOR': '3.235.120.24',\n" " 'PATH_INFO': '/receitas/detalhada/consulta.pdf',\n" " 'QUERY_STRING': '',\n" " 'RAW_URI': '/receitas/detalhada/consulta.pdf',\n" " 'REMOTE_ADDR': '172.17.0.1',\n" " 'REMOTE_PORT': '33726',\n" " 'REQUEST_METHOD': 'GET',\n" " 'SCRIPT_NAME': '',\n" " 'SERVER_NAME': '0.0.0.0',\n" " 'SERVER_PORT': '8029',\n" " 'SERVER_PROTOCOL': 'HTTP/1.0',\n" " 'SERVER_SOFTWARE': 'gunicorn/19.7.1',\n" " 'gunicorn.socket': <socket.socket fd=10, family=AddressFamily.AF_INET, " "type=SocketKind.SOCK_STREAM, proto=0, laddr=('172.17.0.2', 8029), " "raddr=('172.17.0.1', 33726)>,\n" " 'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWrapper object at " '0x7f6c81bca9e8>,\n' " 'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,\n" " 'wsgi.input': <gunicorn.http.body.Body object at 0x7f6c81bca240>,\n" " 'wsgi.multiprocess': False,\n" " 'wsgi.multithread': False,\n" " 'wsgi.run_once': False,\n" " 'wsgi.url_scheme': 'http',\n" " 'wsgi.version': (1, 0)}>") |
kwargs | {'opcao': 'receitas', 'tipo': 'detalhada'} |
self | <apps.website.views.LicitacaoConsultaView object at 0x7f6c81bca940> |
context | {'nome_consulta': 'Licitacoes - detalhada - Prefeitura de Capitão Gervásio ' 'Olveiria', 'objetos': {}, 'opcao': 'receitas', 'pagesize': 'A4', 'tipo': 'detalhada', 'today': datetime.datetime(2024, 3, 29, 7, 59, 17, 82032), 'view': <apps.website.views.LicitacaoConsultaView object at 0x7f6c81bca940>} |
args | () |
/usr/local/lib/python3.4/site-packages/easy_pdf/views.py
in render_to_response
template=self.get_template_names(),
context=context,
filename=self.get_pdf_filename(),
**self.get_pdf_kwargs()
)
def render_to_response(self, context, **response_kwargs):
return self.get_pdf_response(context, **response_kwargs)...
class PDFTemplateView(PDFTemplateResponseMixin, ContextMixin, View):
"""
Concrete view for serving PDF files.
Variable | Value |
---|---|
self | <apps.website.views.LicitacaoConsultaView object at 0x7f6c81bca940> |
response_kwargs | {} |
context | {'nome_consulta': 'Licitacoes - detalhada - Prefeitura de Capitão Gervásio ' 'Olveiria', 'objetos': {}, 'opcao': 'receitas', 'pagesize': 'A4', 'tipo': 'detalhada', 'today': datetime.datetime(2024, 3, 29, 7, 59, 17, 82032), 'view': <apps.website.views.LicitacaoConsultaView object at 0x7f6c81bca940>} |
/usr/local/lib/python3.4/site-packages/easy_pdf/views.py
in get_pdf_response
:rtype: :class:`django.http.HttpResponse`
"""
return render_to_pdf_response(
request=self.request,
template=self.get_template_names(),
context=context,
filename=self.get_pdf_filename(),
**self.get_pdf_kwargs()...
)
def render_to_response(self, context, **response_kwargs):
return self.get_pdf_response(context, **response_kwargs)
Variable | Value |
---|---|
self | <apps.website.views.LicitacaoConsultaView object at 0x7f6c81bca940> |
response_kwargs | {} |
context | {'nome_consulta': 'Licitacoes - detalhada - Prefeitura de Capitão Gervásio ' 'Olveiria', 'objetos': {}, 'opcao': 'receitas', 'pagesize': 'A4', 'tipo': 'detalhada', 'today': datetime.datetime(2024, 3, 29, 7, 59, 17, 82032), 'view': <apps.website.views.LicitacaoConsultaView object at 0x7f6c81bca940>} |
/usr/local/lib/python3.4/site-packages/easy_pdf/rendering.py
in render_to_pdf_response
if not isinstance(context, Context):
if request is not None:
context = RequestContext(request, context)
else:
context = Context(context)
try:
pdf = render_to_pdf(template, context, encoding=encoding, **kwargs)...
return make_response(pdf, filename)
except PDFRenderingError as e:
logger.exception(e.message)
return HttpResponse(e.message)
Variable | Value |
---|---|
filename | None |
template | ['website/pdf/licitacoes.html'] |
encoding | 'utf-8' |
kwargs | {} |
request | ('<WSGIRequest\n' 'path:/receitas/detalhada/consulta.pdf,\n' 'GET:<QueryDict: {}>,\n' 'POST:<QueryDict: {}>,\n' 'COOKIES:{},\n' "META:{'CSRF_COOKIE': 'fRIxmabWzqAFMT747TZQu3ASx58ibrnI',\n" " 'HTTP_ACCEPT': '*/*',\n" " 'HTTP_CONNECTION': 'close',\n" " 'HTTP_HOST': 'transparencia.capitaogervasiooliveira.pi.gov.br',\n" " 'HTTP_USER_AGENT': 'claudebot',\n" " 'HTTP_X_FORWARDED_FOR': '3.235.120.24',\n" " 'PATH_INFO': '/receitas/detalhada/consulta.pdf',\n" " 'QUERY_STRING': '',\n" " 'RAW_URI': '/receitas/detalhada/consulta.pdf',\n" " 'REMOTE_ADDR': '172.17.0.1',\n" " 'REMOTE_PORT': '33726',\n" " 'REQUEST_METHOD': 'GET',\n" " 'SCRIPT_NAME': '',\n" " 'SERVER_NAME': '0.0.0.0',\n" " 'SERVER_PORT': '8029',\n" " 'SERVER_PROTOCOL': 'HTTP/1.0',\n" " 'SERVER_SOFTWARE': 'gunicorn/19.7.1',\n" " 'gunicorn.socket': <socket.socket fd=10, family=AddressFamily.AF_INET, " "type=SocketKind.SOCK_STREAM, proto=0, laddr=('172.17.0.2', 8029), " "raddr=('172.17.0.1', 33726)>,\n" " 'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWrapper object at " '0x7f6c81bca9e8>,\n' " 'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,\n" " 'wsgi.input': <gunicorn.http.body.Body object at 0x7f6c81bca240>,\n" " 'wsgi.multiprocess': False,\n" " 'wsgi.multithread': False,\n" " 'wsgi.run_once': False,\n" " 'wsgi.url_scheme': 'http',\n" " 'wsgi.version': (1, 0)}>") |
context | [{'None': None, 'True': True, 'False': False}, {'today': datetime.datetime(2024, 3, 29, 7, 59, 17, 82032), 'objetos': {}, 'view': <apps.website.views.LicitacaoConsultaView object at 0x7f6c81bca940>, 'nome_consulta': 'Licitacoes - detalhada - Prefeitura de Capitão Gervásio Olveiria', 'pagesize': 'A4', 'opcao': 'receitas', 'tipo': 'detalhada'}, {}] |
/usr/local/lib/python3.4/site-packages/easy_pdf/rendering.py
in render_to_pdf
:raises: :exc:`~easy_pdf.exceptions.PDFRenderingError`, :exc:`~easy_pdf.exceptions.UnsupportedMediaPathException`
"""
if not isinstance(context, Context):
context = Context(context)
content = loader.render_to_string(template, context)
return html_to_pdf(content, encoding, **kwargs)...
def render_to_pdf_response(request, template, context, filename=None,
encoding="utf-8", **kwargs):
"""
Renders a PDF response using given ``request``, ``template`` and ``context``.
Variable | Value |
---|---|
template | ['website/pdf/licitacoes.html'] |
content | ('\n' ' <style type="text/css">\n' ' @page {\n' ' size: A4;\n' ' margin-left: 1.0cm;\n' ' margin-right: 1.0cm;\n' ' margin-top: 3.0cm;\n' ' margin-bottom: 2cm;\n' ' @frame header {\n' ' -pdf-frame-content: page-header;\n' ' margin-top: 1.3cm;\n' ' margin-right: 2mm;\n' ' margin-bottom: 1cm;\n' ' margin-left: 1.2cm;\n' ' }\n' ' }\n' ' </style>\n' '\n' '\n' '\n' ' <style type="text/css">\n' ' @font-face { font-family: Lato; src: ' 'url(/media/fonts/Lato-Bold.ttf); font-weight: bold; }\n' ' @font-face { font-family: Lato; src: ' 'url(/media/fonts/Lato-Regular.ttf); }\n' ' @font-face { font-family: "Lato Light"; src: ' 'url(/media/fonts/Lato-Light.ttf); }\n' '\n' ' html {\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' color: #333333;\n' ' }\n' ' p {\n' ' margin: 0 0 6px 0;\n' ' font-size: 11pt;\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' }\n' ' table {\n' ' line-height: 140%;\n' ' margin-bottom: 20px;\n' ' }\n' ' table.bordered {\n' ' border-top: 0.1pt solid #999999;\n' ' border-bottom: 0.1pt solid #999999;\n' ' }\n' ' tr, td, th { border: none; }\n' ' th {\n' ' font-size: 10pt;\n' ' border-bottom: 0.1pt solid #999999;\n' ' padding: 3px 0;\n' ' line-height: 1;\n' ' font-weight: bold;\n' ' }\n' ' td {\n' ' font-size: 10pt;\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' vertical-align: top;\n' ' padding: 3px 0;\n' ' }\n' ' td:last-child { padding-bottom: 0; }\n' ' .text-left { text-align: left; }\n' ' .text-right { text-align: right; }\n' ' .bottom-10 { margin-bottom: 10px; }\n' ' .bottom-20 { margin-bottom: 20px; }\n' ' .header { color: #7f7f7f; }\n' ' .header p { font-size: 13px; line-height: 1.5em; }\n' ' .header-link { font-weight: bold; text-decoration: none; color: ' '#4F81BD; font-size: 14px; }\n' ' .logo { margin-bottom: 20px; margin-left: -25px; }\n' ' .logo img { zoom: 60%; }\n' ' .recipient { margin-left: 7cm; }\n' ' .main h1 {\n' ' margin: 18px 0 18px 0;\n' ' font-size: 250%;\n' ' font-weight: normal;\n' ' color: #4F81BD;\n' ' }\n' ' .main h2 {\n' ' margin: 18px 0 6px 0;\n' ' font-size: 180%;\n' ' font-weight: normal;\n' ' }\n' ' .info { border: 1px solid #4F81BD; padding: 10px; margin-top: ' '50px; margin-bottom: 50px; }\n' ' .info a { color: #4F81BD; text-decoration: none; }\n' ' .tg ' '{border-collapse:collapse;border-spacing:0;border-color:#ccc;}\n' ' .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px ' '5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#fff;}\n' ' .tg th{font-family:Arial, ' 'sans-serif;font-size:14px;font-weight:normal;padding:10px ' '5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#f0f0f0;}\n' ' </style>\n' '\n' '\n' '\n' '\n' ' <div id="page-header">\n' ' <div class="header">\n' ' \n' ' </div>\n' '\n' ' </div>\n' '\n' '\n' '\n' '\n' ' <div id="content">\n' ' <div class="recipient bottom-10">\n' ' <p>Consulta realizada em: 29 de Março de 2024 às 07:59</p>\n' ' </div>\n' '\n' ' <div class="main">\n' ' <h1>Licitacoes - detalhada - Prefeitura de Capitão... <trimmed 4718 bytes string> |
encoding | 'utf-8' |
context | [{'None': None, 'True': True, 'False': False}, {'today': datetime.datetime(2024, 3, 29, 7, 59, 17, 82032), 'objetos': {}, 'view': <apps.website.views.LicitacaoConsultaView object at 0x7f6c81bca940>, 'nome_consulta': 'Licitacoes - detalhada - Prefeitura de Capitão Gervásio Olveiria', 'pagesize': 'A4', 'opcao': 'receitas', 'tipo': 'detalhada'}, {}] |
kwargs | {} |
/usr/local/lib/python3.4/site-packages/easy_pdf/rendering.py
in html_to_pdf
:rtype: :class:`bytes`
:raises: :exc:`~easy_pdf.exceptions.PDFRenderingError`
"""
src = BytesIO(content.encode(encoding))
dest = BytesIO()
pdf = pisa.pisaDocument(src, dest, encoding=encoding,
link_callback=link_callback, **kwargs)...
if pdf.err:
logger.error("Error rendering PDF document")
for entry in pdf.log:
if entry[0] == xhtml2pdf.default.PML_ERROR:
logger_x2p.error("line %s, msg: %s, fragment: %s", entry[1], entry[2], entry[3])
raise PDFRenderingError("Errors rendering PDF", content=content, log=pdf.log)
Variable | Value |
---|---|
link_callback | <function fetch_resources at 0x7f6c837036a8> |
encoding | 'utf-8' |
kwargs | {} |
content | ('\n' ' <style type="text/css">\n' ' @page {\n' ' size: A4;\n' ' margin-left: 1.0cm;\n' ' margin-right: 1.0cm;\n' ' margin-top: 3.0cm;\n' ' margin-bottom: 2cm;\n' ' @frame header {\n' ' -pdf-frame-content: page-header;\n' ' margin-top: 1.3cm;\n' ' margin-right: 2mm;\n' ' margin-bottom: 1cm;\n' ' margin-left: 1.2cm;\n' ' }\n' ' }\n' ' </style>\n' '\n' '\n' '\n' ' <style type="text/css">\n' ' @font-face { font-family: Lato; src: ' 'url(/media/fonts/Lato-Bold.ttf); font-weight: bold; }\n' ' @font-face { font-family: Lato; src: ' 'url(/media/fonts/Lato-Regular.ttf); }\n' ' @font-face { font-family: "Lato Light"; src: ' 'url(/media/fonts/Lato-Light.ttf); }\n' '\n' ' html {\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' color: #333333;\n' ' }\n' ' p {\n' ' margin: 0 0 6px 0;\n' ' font-size: 11pt;\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' }\n' ' table {\n' ' line-height: 140%;\n' ' margin-bottom: 20px;\n' ' }\n' ' table.bordered {\n' ' border-top: 0.1pt solid #999999;\n' ' border-bottom: 0.1pt solid #999999;\n' ' }\n' ' tr, td, th { border: none; }\n' ' th {\n' ' font-size: 10pt;\n' ' border-bottom: 0.1pt solid #999999;\n' ' padding: 3px 0;\n' ' line-height: 1;\n' ' font-weight: bold;\n' ' }\n' ' td {\n' ' font-size: 10pt;\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' vertical-align: top;\n' ' padding: 3px 0;\n' ' }\n' ' td:last-child { padding-bottom: 0; }\n' ' .text-left { text-align: left; }\n' ' .text-right { text-align: right; }\n' ' .bottom-10 { margin-bottom: 10px; }\n' ' .bottom-20 { margin-bottom: 20px; }\n' ' .header { color: #7f7f7f; }\n' ' .header p { font-size: 13px; line-height: 1.5em; }\n' ' .header-link { font-weight: bold; text-decoration: none; color: ' '#4F81BD; font-size: 14px; }\n' ' .logo { margin-bottom: 20px; margin-left: -25px; }\n' ' .logo img { zoom: 60%; }\n' ' .recipient { margin-left: 7cm; }\n' ' .main h1 {\n' ' margin: 18px 0 18px 0;\n' ' font-size: 250%;\n' ' font-weight: normal;\n' ' color: #4F81BD;\n' ' }\n' ' .main h2 {\n' ' margin: 18px 0 6px 0;\n' ' font-size: 180%;\n' ' font-weight: normal;\n' ' }\n' ' .info { border: 1px solid #4F81BD; padding: 10px; margin-top: ' '50px; margin-bottom: 50px; }\n' ' .info a { color: #4F81BD; text-decoration: none; }\n' ' .tg ' '{border-collapse:collapse;border-spacing:0;border-color:#ccc;}\n' ' .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px ' '5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#fff;}\n' ' .tg th{font-family:Arial, ' 'sans-serif;font-size:14px;font-weight:normal;padding:10px ' '5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#f0f0f0;}\n' ' </style>\n' '\n' '\n' '\n' '\n' ' <div id="page-header">\n' ' <div class="header">\n' ' \n' ' </div>\n' '\n' ' </div>\n' '\n' '\n' '\n' '\n' ' <div id="content">\n' ' <div class="recipient bottom-10">\n' ' <p>Consulta realizada em: 29 de Março de 2024 às 07:59</p>\n' ' </div>\n' '\n' ' <div class="main">\n' ' <h1>Licitacoes - detalhada - Prefeitura de Capitão... <trimmed 4718 bytes string> |
dest | <_io.BytesIO object at 0x7f6c81ce11c8> |
src | <_io.BytesIO object at 0x7f6c81ce1648> |
/usr/local/lib/python3.4/site-packages/xhtml2pdf/document.py
in pisaDocument
if context_meta is not None:
context.meta.update(context_meta)
context.pathCallback = link_callback
# Build story
context = pisaStory(src, path, link_callback, debug, default_css, xhtml,
encoding, context=context, xml_output=xml_output)...
# Buffer PDF into memory
out = io.BytesIO()
doc = PmlBaseDoc(
out,
Variable | Value |
---|---|
xml_output | None |
path | None |
link_callback | <function fetch_resources at 0x7f6c837036a8> |
context | <xhtml2pdf.context.pisaContext object at 0x7f6c81c19438> |
kw | {} |
debug | 0 |
raise_exception | True |
xhtml | False |
context_meta | None |
capacity | 102400 |
encoding | 'utf-8' |
default_css | None |
dest | <_io.BytesIO object at 0x7f6c81ce11c8> |
src | <_io.BytesIO object at 0x7f6c81ce1648> |
/usr/local/lib/python3.4/site-packages/xhtml2pdf/document.py
in pisaStory
context.pathCallback = link_callback
# Use a default set of CSS definitions to get an expected output
if default_css is None:
default_css = DEFAULT_CSS
# Parse and fill the story
pisaParser(src, context, default_css, xhtml, encoding, xml_output)...
# Avoid empty documents
if not context.story:
context.story = [Spacer(1, 1)]
if context.indexing_story:
Variable | Value |
---|---|
xml_output | None |
path | None |
debug | 0 |
link_callback | <function fetch_resources at 0x7f6c837036a8> |
encoding | 'utf-8' |
xhtml | False |
default_css | ('\n' 'html {\n' ' font-family: Helvetica;\n' ' font-size: 10px;\n' ' font-weight: normal;\n' ' color: #000000;\n' ' background-color: transparent;\n' ' margin: 0;\n' ' padding: 0;\n' ' line-height: 150%;\n' ' border: 1px none;\n' ' display: inline;\n' ' width: auto;\n' ' height: auto;\n' ' white-space: normal;\n' '}\n' '\n' 'b,\n' 'strong {\n' ' font-weight: bold;\n' '}\n' '\n' 'i,\n' 'em {\n' ' font-style: italic;\n' '}\n' '\n' 'u {\n' ' text-decoration: underline;\n' '}\n' '\n' 's,\n' 'strike {\n' ' text-decoration: line-through;\n' '}\n' '\n' 'a {\n' ' text-decoration: underline;\n' ' color: blue;\n' '}\n' '\n' 'ins {\n' ' color: green;\n' ' text-decoration: underline;\n' '}\n' 'del {\n' ' color: red;\n' ' text-decoration: line-through;\n' '}\n' '\n' 'pre,\n' 'code,\n' 'kbd,\n' 'samp,\n' 'tt {\n' ' font-family: "Courier New";\n' '}\n' '\n' 'h1,\n' 'h2,\n' 'h3,\n' 'h4,\n' 'h5,\n' 'h6 {\n' ' font-weight:bold;\n' ' -pdf-outline: true;\n' ' -pdf-outline-open: false;\n' '}\n' '\n' 'h1 {\n' ' /*18px via YUI Fonts CSS foundation*/\n' ' font-size:138.5%;\n' ' -pdf-outline-level: 0;\n' '}\n' '\n' 'h2 {\n' ' /*16px via YUI Fonts CSS foundation*/\n' ' font-size:123.1%;\n' ' -pdf-outline-level: 1;\n' '}\n' '\n' 'h3 {\n' ' /*14px via YUI Fonts CSS foundation*/\n' ' font-size:108%;\n' ' -pdf-outline-level: 2;\n' '}\n' '\n' 'h4 {\n' ' -pdf-outline-level: 3;\n' '}\n' '\n' 'h5 {\n' ' -pdf-outline-level: 4;\n' '}\n' '\n' 'h6 {\n' ' -pdf-outline-level: 5;\n' '}\n' '\n' 'h1,\n' 'h2,\n' 'h3,\n' 'h4,\n' 'h5,\n' 'h6,\n' 'p,\n' 'pre,\n' 'hr {\n' ' margin:1em 0;\n' '}\n' '\n' 'address,\n' 'blockquote,\n' 'body,\n' 'center,\n' 'dl,\n' 'dir,\n' 'div,\n' 'fieldset,\n' 'form,\n' 'h1,\n' 'h2,\n' 'h3,\n' 'h4,\n' 'h5,\n' 'h6,\n' 'hr,\n' 'isindex,\n' 'menu,\n' 'noframes,\n' 'noscript,\n' 'ol,\n' 'p,\n' 'pre,\n' 'table,\n' 'th,\n' 'tr,\n' 'td,\n' 'ul,\n' 'li,\n' 'dd,\n' 'dt,\n' 'pdftoc {\n' ' display: block;\n' '}\n' '\n' 'table {\n' '}\n' '\n' 'tr,\n' 'th,\n' 'td {\n' '\n' ' vertical-align: middle;\n' ' width: auto;\n' '}\n' '\n' 'th {\n' ' text-align: center;\n' ' font-weight: bold;\n' '}\n' '\n' 'center {\n' ' text-align: center;\n' '}\n' '\n' 'big {\n' ' font-size: 125%;\n' '}\n' '\n' 'small {\n' ' font-size: 75%;\n' '}\n' '\n' '\n' 'ul {\n' ' margin-left: 1.5em;\n' ' list-style-type: disc;\n' '}\n' '\n' 'ul ul {\n' ' list-style-type: circle;\n' '}\n' '\n' 'ul ul ul {\n' ' list-style-type: square;\n' '}\n' '\n' 'ol {\n' ' list-style-type: decimal;\n' ' margin-left: 1.5em;\n' '}\n' '\n' 'pre {\n' ' white-space: pre;\n' '}\n' '\n' 'blockquote {\n' ' margin-left: 1.5em;\n' ' margin-right: 1.5em;\n' '}\n' '\n' 'noscript {\n' ' display: none;\n' '}\n') |
kw | {} |
context | <xhtml2pdf.context.pisaContext object at 0x7f6c81c19438> |
src | <_io.BytesIO object at 0x7f6c81ce1648> |
/usr/local/lib/python3.4/site-packages/xhtml2pdf/parser.py
in pisaParser
if default_css:
context.addDefaultCSS(default_css)
pisaPreLoop(document, context)
#try:
context.parseCSS()...
#except:
# context.cssText = DEFAULT_CSS
# context.parseCSS()
# context.debug(9, pprint.pformat(context.css))
pisaLoop(document, context)
Variable | Value |
---|---|
document | <xml.dom.minidom.Document object at 0x7f6c81ce1708> |
xml_output | None |
encoding | 'utf-8' |
xhtml | False |
parser | <html5lib.html5parser.HTMLParser object at 0x7f6c81c382e8> |
default_css | ('\n' 'html {\n' ' font-family: Helvetica;\n' ' font-size: 10px;\n' ' font-weight: normal;\n' ' color: #000000;\n' ' background-color: transparent;\n' ' margin: 0;\n' ' padding: 0;\n' ' line-height: 150%;\n' ' border: 1px none;\n' ' display: inline;\n' ' width: auto;\n' ' height: auto;\n' ' white-space: normal;\n' '}\n' '\n' 'b,\n' 'strong {\n' ' font-weight: bold;\n' '}\n' '\n' 'i,\n' 'em {\n' ' font-style: italic;\n' '}\n' '\n' 'u {\n' ' text-decoration: underline;\n' '}\n' '\n' 's,\n' 'strike {\n' ' text-decoration: line-through;\n' '}\n' '\n' 'a {\n' ' text-decoration: underline;\n' ' color: blue;\n' '}\n' '\n' 'ins {\n' ' color: green;\n' ' text-decoration: underline;\n' '}\n' 'del {\n' ' color: red;\n' ' text-decoration: line-through;\n' '}\n' '\n' 'pre,\n' 'code,\n' 'kbd,\n' 'samp,\n' 'tt {\n' ' font-family: "Courier New";\n' '}\n' '\n' 'h1,\n' 'h2,\n' 'h3,\n' 'h4,\n' 'h5,\n' 'h6 {\n' ' font-weight:bold;\n' ' -pdf-outline: true;\n' ' -pdf-outline-open: false;\n' '}\n' '\n' 'h1 {\n' ' /*18px via YUI Fonts CSS foundation*/\n' ' font-size:138.5%;\n' ' -pdf-outline-level: 0;\n' '}\n' '\n' 'h2 {\n' ' /*16px via YUI Fonts CSS foundation*/\n' ' font-size:123.1%;\n' ' -pdf-outline-level: 1;\n' '}\n' '\n' 'h3 {\n' ' /*14px via YUI Fonts CSS foundation*/\n' ' font-size:108%;\n' ' -pdf-outline-level: 2;\n' '}\n' '\n' 'h4 {\n' ' -pdf-outline-level: 3;\n' '}\n' '\n' 'h5 {\n' ' -pdf-outline-level: 4;\n' '}\n' '\n' 'h6 {\n' ' -pdf-outline-level: 5;\n' '}\n' '\n' 'h1,\n' 'h2,\n' 'h3,\n' 'h4,\n' 'h5,\n' 'h6,\n' 'p,\n' 'pre,\n' 'hr {\n' ' margin:1em 0;\n' '}\n' '\n' 'address,\n' 'blockquote,\n' 'body,\n' 'center,\n' 'dl,\n' 'dir,\n' 'div,\n' 'fieldset,\n' 'form,\n' 'h1,\n' 'h2,\n' 'h3,\n' 'h4,\n' 'h5,\n' 'h6,\n' 'hr,\n' 'isindex,\n' 'menu,\n' 'noframes,\n' 'noscript,\n' 'ol,\n' 'p,\n' 'pre,\n' 'table,\n' 'th,\n' 'tr,\n' 'td,\n' 'ul,\n' 'li,\n' 'dd,\n' 'dt,\n' 'pdftoc {\n' ' display: block;\n' '}\n' '\n' 'table {\n' '}\n' '\n' 'tr,\n' 'th,\n' 'td {\n' '\n' ' vertical-align: middle;\n' ' width: auto;\n' '}\n' '\n' 'th {\n' ' text-align: center;\n' ' font-weight: bold;\n' '}\n' '\n' 'center {\n' ' text-align: center;\n' '}\n' '\n' 'big {\n' ' font-size: 125%;\n' '}\n' '\n' 'small {\n' ' font-size: 75%;\n' '}\n' '\n' '\n' 'ul {\n' ' margin-left: 1.5em;\n' ' list-style-type: disc;\n' '}\n' '\n' 'ul ul {\n' ' list-style-type: circle;\n' '}\n' '\n' 'ul ul ul {\n' ' list-style-type: square;\n' '}\n' '\n' 'ol {\n' ' list-style-type: decimal;\n' ' margin-left: 1.5em;\n' '}\n' '\n' 'pre {\n' ' white-space: pre;\n' '}\n' '\n' 'blockquote {\n' ' margin-left: 1.5em;\n' ' margin-right: 1.5em;\n' '}\n' '\n' 'noscript {\n' ' display: none;\n' '}\n') |
context | <xhtml2pdf.context.pisaContext object at 0x7f6c81c19438> |
src | <_io.BytesIO object at 0x7f6c81ce1648> |
/usr/local/lib/python3.4/site-packages/xhtml2pdf/context.py
in parseCSS
self.cssParser = pisaCSSParser(self.cssBuilder)
self.cssParser.rootPath = self.pathDirectory
#self.cssParser.c = self
self.cssParser._c = weakref.ref(self)
pisaCSSParser.c = property(lambda self: self._c())
self.css = self.cssParser.parse(self.cssText)...
self.cssDefault = self.cssParser.parse(self.cssDefaultText)
self.cssCascade = css.CSSCascadeStrategy(userAgent=self.cssDefault, user=self.css)
self.cssCascade.parser = self.cssParser
# METHODS FOR STORY
def addStory(self, data):
Variable | Value |
---|---|
self | <xhtml2pdf.context.pisaContext object at 0x7f6c81c19438> |
weakref | <module 'weakref' from '/usr/local/lib/python3.4/weakref.py'> |
/usr/local/lib/python3.4/site-packages/xhtml2pdf/w3c/cssParser.py
in parse
self.cssBuilder.beginStylesheet()
try:
# XXX Some simple preprocessing
src = cssSpecial.cleanupCSS(src)
try:
src, stylesheet = self._parseStylesheet(src)...
except self.ParseError as err:
err.setFullCSSSource(src)
raise
finally:
self.cssBuilder.endStylesheet()
return stylesheet
Variable | Value |
---|---|
self | <xhtml2pdf.context.pisaCSSParser object at 0x7f6c81ba7e48> |
src | ('@page {\n' ' size: A4;\n' ' margin-left: 1.0cm;\n' ' margin-right: 1.0cm;\n' ' margin-top: 3.0cm;\n' ' margin-bottom: 2cm;\n' ' @frame header {\n' ' -pdf-frame-content: page-header;\n' ' margin-top: 1.3cm;\n' ' margin-right: 2mm;\n' ' margin-bottom: 1cm;\n' ' margin-left: 1.2cm;\n' ' }\n' ' }\n' '@font-face { font-family: Lato; src: url(/media/fonts/Lato-Bold.ttf); ' 'font-weight: bold; }\n' ' @font-face { font-family: Lato; src: ' 'url(/media/fonts/Lato-Regular.ttf); }\n' ' @font-face { font-family: "Lato Light"; src: ' 'url(/media/fonts/Lato-Light.ttf); }\n' '\n' ' html {\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' color: #333333;\n' ' }\n' ' p {\n' ' margin: 0 0 6px 0;\n' ' font-size: 11pt;\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' }\n' ' table {\n' ' line-height: 140%;\n' ' margin-bottom: 20px;\n' ' }\n' ' table.bordered {\n' ' border-top: 0.1pt solid #999999;\n' ' border-bottom: 0.1pt solid #999999;\n' ' }\n' ' tr, td, th { border: none; }\n' ' th {\n' ' font-size: 10pt;\n' ' border-bottom: 0.1pt solid #999999;\n' ' padding: 3px 0;\n' ' line-height: 1;\n' ' font-weight: bold;\n' ' }\n' ' td {\n' ' font-size: 10pt;\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' vertical-align: top;\n' ' padding: 3px 0;\n' ' }\n' ' td:last-child { padding-bottom: 0; }\n' ' .text-left { text-align: left; }\n' ' .text-right { text-align: right; }\n' ' .bottom-10 { margin-bottom: 10px; }\n' ' .bottom-20 { margin-bottom: 20px; }\n' ' .header { color: #7f7f7f; }\n' ' .header p { font-size: 13px; line-height: 1.5em; }\n' ' .header-link { font-weight: bold; text-decoration: none; color: ' '#4F81BD; font-size: 14px; }\n' ' .logo { margin-bottom: 20px; margin-left: -25px; }\n' ' .logo img { zoom: 60%; }\n' ' .recipient { margin-left: 7cm; }\n' ' .main h1 {\n' ' margin: 18px 0 18px 0;\n' ' font-size: 250%;\n' ' font-weight: normal;\n' ' color: #4F81BD;\n' ' }\n' ' .main h2 {\n' ' margin: 18px 0 6px 0;\n' ' font-size: 180%;\n' ' font-weight: normal;\n' ' }\n' ' .info { border: 1px solid #4F81BD; padding: 10px; margin-top: ' '50px; margin-bottom: 50px; }\n' ' .info a { color: #4F81BD; text-decoration: none; }\n' ' .tg ' '{border-collapse:collapse;border-spacing:0;border-color:#ccc;}\n' ' .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px ' '5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#fff;}\n' ' .tg th{font-family:Arial, ' 'sans-serif;font-size:14px;font-weight:normal;padding:10px ' '5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#f0f0f0;}\n') |
/usr/local/lib/python3.4/site-packages/xhtml2pdf/w3c/cssParser.py
in _parseStylesheet
stylesheetElements = []
# [ [ ruleset | atkeywords ] [S|CDO|CDC]* ]*
while src: # due to ending with ]*
if src.startswith('@'):
# @media, @page, @font-face
src, atResults = self._parseAtKeyword(src)...
if atResults is not None and atResults != NotImplemented:
stylesheetElements.extend(atResults)
else:
# ruleset
src, ruleset = self._parseRuleset(src)
stylesheetElements.append(ruleset)
Variable | Value |
---|---|
self | <xhtml2pdf.context.pisaCSSParser object at 0x7f6c81ba7e48> |
stylesheetImports | [] |
stylesheetElements | [({}, {})] |
atResults | [({}, {})] |
src | ('@font-face { font-family: Lato; src: url(/media/fonts/Lato-Bold.ttf); ' 'font-weight: bold; }\n' ' @font-face { font-family: Lato; src: ' 'url(/media/fonts/Lato-Regular.ttf); }\n' ' @font-face { font-family: "Lato Light"; src: ' 'url(/media/fonts/Lato-Light.ttf); }\n' '\n' ' html {\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' color: #333333;\n' ' }\n' ' p {\n' ' margin: 0 0 6px 0;\n' ' font-size: 11pt;\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' }\n' ' table {\n' ' line-height: 140%;\n' ' margin-bottom: 20px;\n' ' }\n' ' table.bordered {\n' ' border-top: 0.1pt solid #999999;\n' ' border-bottom: 0.1pt solid #999999;\n' ' }\n' ' tr, td, th { border: none; }\n' ' th {\n' ' font-size: 10pt;\n' ' border-bottom: 0.1pt solid #999999;\n' ' padding: 3px 0;\n' ' line-height: 1;\n' ' font-weight: bold;\n' ' }\n' ' td {\n' ' font-size: 10pt;\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' vertical-align: top;\n' ' padding: 3px 0;\n' ' }\n' ' td:last-child { padding-bottom: 0; }\n' ' .text-left { text-align: left; }\n' ' .text-right { text-align: right; }\n' ' .bottom-10 { margin-bottom: 10px; }\n' ' .bottom-20 { margin-bottom: 20px; }\n' ' .header { color: #7f7f7f; }\n' ' .header p { font-size: 13px; line-height: 1.5em; }\n' ' .header-link { font-weight: bold; text-decoration: none; color: ' '#4F81BD; font-size: 14px; }\n' ' .logo { margin-bottom: 20px; margin-left: -25px; }\n' ' .logo img { zoom: 60%; }\n' ' .recipient { margin-left: 7cm; }\n' ' .main h1 {\n' ' margin: 18px 0 18px 0;\n' ' font-size: 250%;\n' ' font-weight: normal;\n' ' color: #4F81BD;\n' ' }\n' ' .main h2 {\n' ' margin: 18px 0 6px 0;\n' ' font-size: 180%;\n' ' font-weight: normal;\n' ' }\n' ' .info { border: 1px solid #4F81BD; padding: 10px; margin-top: ' '50px; margin-bottom: 50px; }\n' ' .info a { color: #4F81BD; text-decoration: none; }\n' ' .tg ' '{border-collapse:collapse;border-spacing:0;border-color:#ccc;}\n' ' .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px ' '5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#fff;}\n' ' .tg th{font-family:Arial, ' 'sans-serif;font-size:14px;font-weight:normal;padding:10px ' '5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#f0f0f0;}\n') |
/usr/local/lib/python3.4/site-packages/xhtml2pdf/w3c/cssParser.py
in _parseAtKeyword
"""[media | page | font_face | unknown_keyword]"""
ctxsrc = src
if isAtRuleIdent(src, 'media'):
src, result = self._parseAtMedia(src)
elif isAtRuleIdent(src, 'page'):
src, result = self._parseAtPage(src)
elif isAtRuleIdent(src, 'font-face'):
src, result = self._parseAtFontFace(src)...
# XXX added @import, was missing!
elif isAtRuleIdent(src, 'import'):
src, result = self._parseAtImports(src)
elif isAtRuleIdent(src, 'frame'):
src, result = self._parseAtFrame(src)
elif src.startswith('@'):
Variable | Value |
---|---|
self | <xhtml2pdf.context.pisaCSSParser object at 0x7f6c81ba7e48> |
ctxsrc | ('@font-face { font-family: Lato; src: url(/media/fonts/Lato-Bold.ttf); ' 'font-weight: bold; }\n' ' @font-face { font-family: Lato; src: ' 'url(/media/fonts/Lato-Regular.ttf); }\n' ' @font-face { font-family: "Lato Light"; src: ' 'url(/media/fonts/Lato-Light.ttf); }\n' '\n' ' html {\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' color: #333333;\n' ' }\n' ' p {\n' ' margin: 0 0 6px 0;\n' ' font-size: 11pt;\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' }\n' ' table {\n' ' line-height: 140%;\n' ' margin-bottom: 20px;\n' ' }\n' ' table.bordered {\n' ' border-top: 0.1pt solid #999999;\n' ' border-bottom: 0.1pt solid #999999;\n' ' }\n' ' tr, td, th { border: none; }\n' ' th {\n' ' font-size: 10pt;\n' ' border-bottom: 0.1pt solid #999999;\n' ' padding: 3px 0;\n' ' line-height: 1;\n' ' font-weight: bold;\n' ' }\n' ' td {\n' ' font-size: 10pt;\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' vertical-align: top;\n' ' padding: 3px 0;\n' ' }\n' ' td:last-child { padding-bottom: 0; }\n' ' .text-left { text-align: left; }\n' ' .text-right { text-align: right; }\n' ' .bottom-10 { margin-bottom: 10px; }\n' ' .bottom-20 { margin-bottom: 20px; }\n' ' .header { color: #7f7f7f; }\n' ' .header p { font-size: 13px; line-height: 1.5em; }\n' ' .header-link { font-weight: bold; text-decoration: none; color: ' '#4F81BD; font-size: 14px; }\n' ' .logo { margin-bottom: 20px; margin-left: -25px; }\n' ' .logo img { zoom: 60%; }\n' ' .recipient { margin-left: 7cm; }\n' ' .main h1 {\n' ' margin: 18px 0 18px 0;\n' ' font-size: 250%;\n' ' font-weight: normal;\n' ' color: #4F81BD;\n' ' }\n' ' .main h2 {\n' ' margin: 18px 0 6px 0;\n' ' font-size: 180%;\n' ' font-weight: normal;\n' ' }\n' ' .info { border: 1px solid #4F81BD; padding: 10px; margin-top: ' '50px; margin-bottom: 50px; }\n' ' .info a { color: #4F81BD; text-decoration: none; }\n' ' .tg ' '{border-collapse:collapse;border-spacing:0;border-color:#ccc;}\n' ' .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px ' '5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#fff;}\n' ' .tg th{font-family:Arial, ' 'sans-serif;font-size:14px;font-weight:normal;padding:10px ' '5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#f0f0f0;}\n') |
src | ('@font-face { font-family: Lato; src: url(/media/fonts/Lato-Bold.ttf); ' 'font-weight: bold; }\n' ' @font-face { font-family: Lato; src: ' 'url(/media/fonts/Lato-Regular.ttf); }\n' ' @font-face { font-family: "Lato Light"; src: ' 'url(/media/fonts/Lato-Light.ttf); }\n' '\n' ' html {\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' color: #333333;\n' ' }\n' ' p {\n' ' margin: 0 0 6px 0;\n' ' font-size: 11pt;\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' }\n' ' table {\n' ' line-height: 140%;\n' ' margin-bottom: 20px;\n' ' }\n' ' table.bordered {\n' ' border-top: 0.1pt solid #999999;\n' ' border-bottom: 0.1pt solid #999999;\n' ' }\n' ' tr, td, th { border: none; }\n' ' th {\n' ' font-size: 10pt;\n' ' border-bottom: 0.1pt solid #999999;\n' ' padding: 3px 0;\n' ' line-height: 1;\n' ' font-weight: bold;\n' ' }\n' ' td {\n' ' font-size: 10pt;\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' vertical-align: top;\n' ' padding: 3px 0;\n' ' }\n' ' td:last-child { padding-bottom: 0; }\n' ' .text-left { text-align: left; }\n' ' .text-right { text-align: right; }\n' ' .bottom-10 { margin-bottom: 10px; }\n' ' .bottom-20 { margin-bottom: 20px; }\n' ' .header { color: #7f7f7f; }\n' ' .header p { font-size: 13px; line-height: 1.5em; }\n' ' .header-link { font-weight: bold; text-decoration: none; color: ' '#4F81BD; font-size: 14px; }\n' ' .logo { margin-bottom: 20px; margin-left: -25px; }\n' ' .logo img { zoom: 60%; }\n' ' .recipient { margin-left: 7cm; }\n' ' .main h1 {\n' ' margin: 18px 0 18px 0;\n' ' font-size: 250%;\n' ' font-weight: normal;\n' ' color: #4F81BD;\n' ' }\n' ' .main h2 {\n' ' margin: 18px 0 6px 0;\n' ' font-size: 180%;\n' ' font-weight: normal;\n' ' }\n' ' .info { border: 1px solid #4F81BD; padding: 10px; margin-top: ' '50px; margin-bottom: 50px; }\n' ' .info a { color: #4F81BD; text-decoration: none; }\n' ' .tg ' '{border-collapse:collapse;border-spacing:0;border-color:#ccc;}\n' ' .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px ' '5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#fff;}\n' ' .tg th{font-family:Arial, ' 'sans-serif;font-size:14px;font-weight:normal;padding:10px ' '5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#f0f0f0;}\n') |
/usr/local/lib/python3.4/site-packages/xhtml2pdf/w3c/cssParser.py
in _parseAtFontFace
result = [self.cssBuilder.atFrame(box, properties)]
return src.lstrip(), result
def _parseAtFontFace(self, src):
src = src[len('@font-face '):].lstrip()
src, properties = self._parseDeclarationGroup(src)
result = [self.cssBuilder.atFontFace(properties)]...
return src, result
def _parseAtIdent(self, src):
ctxsrc = src
atIdent, src = self._getIdent(src[1:])
Variable | Value |
---|---|
self | <xhtml2pdf.context.pisaCSSParser object at 0x7f6c81ba7e48> |
properties | [('font-family', 'Lato', None), ('src', NotImplemented, None), ('font-weight', 'bold', None)] |
src | ('@font-face { font-family: Lato; src: url(/media/fonts/Lato-Regular.ttf); ' '}\n' ' @font-face { font-family: "Lato Light"; src: ' 'url(/media/fonts/Lato-Light.ttf); }\n' '\n' ' html {\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' color: #333333;\n' ' }\n' ' p {\n' ' margin: 0 0 6px 0;\n' ' font-size: 11pt;\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' }\n' ' table {\n' ' line-height: 140%;\n' ' margin-bottom: 20px;\n' ' }\n' ' table.bordered {\n' ' border-top: 0.1pt solid #999999;\n' ' border-bottom: 0.1pt solid #999999;\n' ' }\n' ' tr, td, th { border: none; }\n' ' th {\n' ' font-size: 10pt;\n' ' border-bottom: 0.1pt solid #999999;\n' ' padding: 3px 0;\n' ' line-height: 1;\n' ' font-weight: bold;\n' ' }\n' ' td {\n' ' font-size: 10pt;\n' ' font-family: "Lato", "Helvetica", "sans-serif";\n' ' vertical-align: top;\n' ' padding: 3px 0;\n' ' }\n' ' td:last-child { padding-bottom: 0; }\n' ' .text-left { text-align: left; }\n' ' .text-right { text-align: right; }\n' ' .bottom-10 { margin-bottom: 10px; }\n' ' .bottom-20 { margin-bottom: 20px; }\n' ' .header { color: #7f7f7f; }\n' ' .header p { font-size: 13px; line-height: 1.5em; }\n' ' .header-link { font-weight: bold; text-decoration: none; color: ' '#4F81BD; font-size: 14px; }\n' ' .logo { margin-bottom: 20px; margin-left: -25px; }\n' ' .logo img { zoom: 60%; }\n' ' .recipient { margin-left: 7cm; }\n' ' .main h1 {\n' ' margin: 18px 0 18px 0;\n' ' font-size: 250%;\n' ' font-weight: normal;\n' ' color: #4F81BD;\n' ' }\n' ' .main h2 {\n' ' margin: 18px 0 6px 0;\n' ' font-size: 180%;\n' ' font-weight: normal;\n' ' }\n' ' .info { border: 1px solid #4F81BD; padding: 10px; margin-top: ' '50px; margin-bottom: 50px; }\n' ' .info a { color: #4F81BD; text-decoration: none; }\n' ' .tg ' '{border-collapse:collapse;border-spacing:0;border-color:#ccc;}\n' ' .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px ' '5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#fff;}\n' ' .tg th{font-family:Arial, ' 'sans-serif;font-size:14px;font-weight:normal;padding:10px ' '5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#f0f0f0;}\n') |
/usr/local/lib/python3.4/site-packages/xhtml2pdf/context.py
in atFontFace
# Font style
italic = str(data.get("font-style", "")).lower() in ("italic", "oblique")
# The "src" attribute can be a CSS group but in that case
# ignore everything except the font URI
uri = data['src']
if not isinstance(data['src'], str):
for part in uri:...
if isinstance(part, str):
uri = part
break
src = self.c.getFile(uri, relative=self.c.cssParser.rootPath)
self.c.loadFont(
Variable | Value |
---|---|
fweight | 'bold' |
result | ({<CSSImmutableSelector 0:0:0:0 * >: {'font-family': 'Lato', 'font-weight': 'bold', 'src': NotImplemented}}, {}) |
names | 'Lato' |
bold | True |
data | {'font-family': 'Lato', 'font-weight': 'bold', 'src': NotImplemented} |
self | <xhtml2pdf.context.pisaCSSBuilder object at 0x7f6c81ba7198> |
italic | False |
uri | NotImplemented |
declarations | [('font-family', 'Lato', None), ('src', NotImplemented, None), ('font-weight', 'bold', None)] |
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
wsgi.run_once | False |
wsgi.input | <gunicorn.http.body.Body object at 0x7f6c81bca240> |
PATH_INFO | '/receitas/detalhada/consulta.pdf' |
SERVER_PORT | '8029' |
SCRIPT_NAME | '' |
HTTP_X_FORWARDED_FOR | '3.235.120.24' |
REMOTE_ADDR | '172.17.0.1' |
HTTP_USER_AGENT | 'claudebot' |
wsgi.url_scheme | 'http' |
SERVER_PROTOCOL | 'HTTP/1.0' |
REQUEST_METHOD | 'GET' |
QUERY_STRING | '' |
wsgi.errors | <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7f6c81bca9e8> |
wsgi.file_wrapper | '' |
wsgi.multiprocess | False |
HTTP_HOST | 'transparencia.capitaogervasiooliveira.pi.gov.br' |
SERVER_SOFTWARE | 'gunicorn/19.7.1' |
gunicorn.socket | <socket.socket fd=10, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('172.17.0.2', 8029), raddr=('172.17.0.1', 33726)> |
RAW_URI | '/receitas/detalhada/consulta.pdf' |
wsgi.multithread | False |
SERVER_NAME | '0.0.0.0' |
CSRF_COOKIE | 'fRIxmabWzqAFMT747TZQu3ASx58ibrnI' |
HTTP_CONNECTION | 'close' |
HTTP_ACCEPT | '*/*' |
REMOTE_PORT | '33726' |
wsgi.version | (1, 0) |
prefeitura_digital.settings
Setting | Value |
---|---|
ROOT_URLCONF | 'prefeitura_digital.urls' |
MINIO_STORAGE_ACCESS_KEY | '********************' |
MONTH_DAY_FORMAT | 'F j' |
FILE_UPLOAD_HANDLERS | ('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler') |
SECURE_SSL_REDIRECT | False |
EMAIL_PORT | 587 |
STATICFILES_DIRS | ('/var/www/media/static',) |
CSRF_COOKIE_DOMAIN | None |
DEFAULT_INDEX_TABLESPACE | '' |
EMAIL_SSL_KEYFILE | '********************' |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
DATABASE_ROUTERS | [] |
APPEND_SLASH | True |
SESSION_COOKIE_PATH | '/' |
LOGOUT_URL | '/accounts/logout/' |
FORCE_SCRIPT_NAME | None |
SUIT_CONFIG | {'ADMIN_NAME': 'BluBots', 'MENU': ({'app': 'core', 'color': 'bg-green', 'icon': 'ion ion-ios7-briefcase-outline', 'label': 'Institucional'}, {'app': 'covid', 'color': 'bg-aqua', 'icon': 'ion ion-ios7-briefcase-outline', 'label': 'Covid-19'}, {'app': 'despesas', 'color': 'bg-red', 'icon': 'ion ion-calculator', 'label': 'Despesas'}, {'app': 'diarias', 'color': 'bg-red', 'icon': 'ion ion-pie-graph', 'label': 'Diarias'}, {'app': 'esic', 'color': 'bg-blue', 'icon': 'ion ion-chatbubble-working', 'label': 'Esic'}, {'app': 'informativos', 'color': 'bg-blue', 'icon': 'ion ion-map', 'label': 'Informativos'}, {'app': 'legislacao', 'color': 'bg-green', 'icon': 'ion ion-clipboard', 'label': 'Legislacao'}, {'app': 'licitacao', 'color': 'bg-blue', 'icon': 'ion ion-compose', 'label': 'Licitação'}, {'app': 'receitas', 'color': 'bg-red', 'icon': 'ion ion-android-folder', 'label': 'Receitas'}, {'app': 'relatorios', 'color': 'bg-red', 'icon': 'ion ion-connection-bars', 'label': 'Relatorios'}, {'app': 'servidores', 'color': 'bg-orange', 'icon': 'ion ion-person-stalker', 'label': 'Servidores'}, {'app': 'contratos', 'color': 'bg-blue', 'icon': 'ion ion-person-stalker', 'label': 'Contratos'}, {'app': 'extratos', 'color': 'bg-yellow', 'icon': 'ion ion-person-stalker', 'label': 'Extratos'}, {'icon': 'ion ion-ios7-cog', 'label': 'Configuração', 'models': ('auth.group', 'sites.site', 'flatpages.flatpage')})} |
STATIC_URL | '/static/' |
EMAIL_HOST | 'smtp.gmail.com' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
LANGUAGE_COOKIE_AGE | None |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/var/www/templates'], 'OPTIONS': {'context_processors': ['django.contrib.auth.context_processors.auth', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.contrib.messages.context_processors.messages', 'django.core.context_processors.request', 'prefeitura_digital.context_processors.estaticos']}}] |
TEMPLATE_LOADERS | ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader') |
CSRF_COOKIE_AGE | 31449600 |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
DEFAULT_CONTENT_TYPE | 'text/html' |
LOGGING_CONFIG | 'logging.config.dictConfig' |
SESSION_FILE_PATH | None |
TEMPLATE_DEBUG | False |
MIDDLEWARE_CLASSES | ('prefeitura_digital.middleware.SubdomainMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware') |
FILE_CHARSET | 'utf-8' |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
SESSION_COOKIE_HTTPONLY | True |
EMAIL_TIMEOUT | None |
SESSION_COOKIE_AGE | 1209600 |
INSTALLED_APPS | ('suit', 'ckeditor', 'easy_pdf', 'reportlab', 'xhtml2pdf', 'widget_tweaks', 'easy_thumbnails', 'minio_storage', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'apps.contratos', 'apps.core', 'apps.despesas', 'apps.legislacao', 'apps.licitacao', 'apps.migracao', 'apps.receitas', 'apps.servidores', 'apps.website', 'apps.relatorios', 'apps.diarias', 'apps.esic', 'apps.informativos', 'apps.extratos', 'apps.covid') |
SESSION_SAVE_EVERY_REQUEST | False |
FORMAT_MODULE_PATH | None |
SETTINGS_MODULE | 'prefeitura_digital.settings' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
SHORT_DATE_FORMAT | 'm/d/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') |
LANGUAGE_COOKIE_PATH | '/' |
SESSION_COOKIE_DOMAIN | None |
TEMPLATE_STRING_IF_INVALID | '' |
EMAIL_HOST_PASSWORD | '********************' |
SECURE_BROWSER_XSS_FILTER | False |
BASE_DIR | '/var/www' |
LANGUAGE_COOKIE_DOMAIN | None |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.mysql', 'HOST': '108.61.205.61', 'NAME': 'transparencia_py3', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '3306', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': 'America/Fortaleza', 'USER': 'root'}} |
SESSION_COOKIE_SECURE | False |
SECURE_PROXY_SSL_HEADER | None |
USE_ETAGS | False |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
EMAIL_USE_SSL | False |
ADMINS | () |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
THOUSAND_SEPARATOR | ',' |
CSRF_COOKIE_NAME | 'csrftoken' |
PASSWORD_HASHERS | '********************' |
ABSOLUTE_URL_OVERRIDES | {} |
CSRF_COOKIE_SECURE | False |
SECRET_KEY | '********************' |
DEBUG | True |
SECURE_SSL_HOST | None |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
NUMBER_GROUPING | 0 |
SESSION_CACHE_ALIAS | 'default' |
SECURE_REDIRECT_EXEMPT | [] |
FIXTURE_DIRS | () |
LOCALE_PATHS | () |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DEFAULT_TABLESPACE | '' |
USE_I18N | True |
MINIO_STORAGE_USE_HTTPS | False |
LANGUAGES_BIDI | ('he', 'ar', 'fa', 'ur') |
WSGI_APPLICATION | 'prefeitura_digital.wsgi.application' |
MIGRATION_MODULES | {} |
DECIMAL_SEPARATOR | '.' |
LANGUAGE_COOKIE_NAME | 'django_language' |
SESSION_COOKIE_NAME | 'sessionid' |
TIME_INPUT_FORMATS | ('%H:%M:%S', '%H:%M:%S.%f', '%H:%M') |
TIME_FORMAT | 'P' |
EMAIL_SSL_CERTFILE | None |
USE_TZ | False |
LANGUAGE_CODE | 'pt-BR' |
STATICFILES_FINDERS | ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') |
DATE_FORMAT | 'N j, Y' |
ALLOWED_INCLUDE_ROOTS | () |
DATETIME_FORMAT | 'N j, Y, P' |
INTERNAL_IPS | () |
SECURE_CONTENT_TYPE_NOSNIFF | False |
USE_X_FORWARDED_HOST | False |
MEDIA_ROOT | '/var/www/media' |
MANAGERS | () |
TIME_ZONE | 'America/Fortaleza' |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
STATIC_ROOT | '/var/www/static' |
SECURE_HSTS_SECONDS | 0 |
TEMPLATE_CONTEXT_PROCESSORS | ('django.contrib.auth.context_processors.auth', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.contrib.messages.context_processors.messages') |
TEST_NON_SERIALIZED_APPS | [] |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
LOGIN_URL | '/admin/' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
SILENCED_SYSTEM_CHECKS | [] |
EMAIL_USE_TLS | True |
FILE_UPLOAD_TEMP_DIR | None |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
EMAIL_HOST_USER | 'transparenciamunicipal2018@gmail.com' |
MEDIA_URL | 'http://minio.blubots.com/media-minio/' |
DEFAULT_FILE_STORAGE | 'minio_storage.storage.MinioMediaStorage' |
CACHE_MIDDLEWARE_SECONDS | 600 |
YEAR_MONTH_FORMAT | 'F Y' |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
AUTHENTICATION_BACKENDS | ('django.contrib.auth.backends.ModelBackend',) |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
FIRST_DAY_OF_WEEK | 0 |
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'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian 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'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('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 Bokmal'), ('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-cn', 'Simplified Chinese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese'), ('zh-tw', 'Traditional Chinese')) |
LOG_LEVEL | 'DEBUG' |
USE_L10N | True |
CSRF_COOKIE_HTTPONLY | False |
DISALLOWED_USER_AGENTS | () |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
LOGGING | {} |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
DEFAULT_CHARSET | 'utf-8' |
USE_THOUSAND_SEPARATOR | False |
MINIO_STORAGE_ENDPOINT | '108.61.205.61:9002' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
ALLOWED_HOSTS | ['*'] |
MINIO_STORAGE_SECRET_KEY | '********************' |
MINIO_STORAGE_AUTO_CREATE_MEDIA_BUCKET | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
FILE_UPLOAD_PERMISSIONS | None |
AUTH_USER_MODEL | 'core.Usuario' |
PREPEND_WWW | False |
CSRF_COOKIE_PATH | '/' |
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') |
SERVER_EMAIL | 'root@localhost' |
TEMPLATE_DIRS | () |
IGNORABLE_404_URLS | () |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
CACHE_MIDDLEWARE_ALIAS | 'default' |
MINIO_STORAGE_MEDIA_BUCKET_NAME | 'media-minio' |
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.