Cannot resolve keyword u'dispositivos_legais_fmt_compact' into field. Choices are: alineas, artigos, ativa, data_atualizacao, data_criacao, data_final, data_inicial, data_transito_julgado, dispositivos_legais, empresa, empresa_id, id, multas, orgao, orgao_id, origem, paragrafos, sancao_incisos_set, tipo, tipo_id
Request Method: | GET |
---|---|
Request URL: | http://ceis.cge.al.gov.br/api/sancoes_correntes/?offset=20&ordering=dispositivos_legais_fmt_compact |
Django Version: | 1.8 |
Exception Type: | FieldError |
Exception Value: | Cannot resolve keyword u'dispositivos_legais_fmt_compact' into field. Choices are: alineas, artigos, ativa, data_atualizacao, data_criacao, data_final, data_inicial, data_transito_julgado, dispositivos_legais, empresa, empresa_id, id, multas, orgao, orgao_id, origem, paragrafos, sancao_incisos_set, tipo, tipo_id |
Exception Location: | /var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/django/db/models/sql/query.py in names_to_path, line 1386 |
Python Executable: | /var/www/ceis/envs/env_ceis/bin/python2 |
Python Version: | 2.7.9 |
Python Path: | ['/var/www/ceis/public', '/var/www/ceis/envs/env_ceis', '/var/www/ceis/envs/env_ceis/bin', '/var/www/ceis/envs/env_ceis/lib/python2.7', '/var/www/ceis/envs/env_ceis/lib/python2.7/plat-x86_64-linux-gnu', '/var/www/ceis/envs/env_ceis/lib/python2.7/lib-tk', '/var/www/ceis/envs/env_ceis/lib/python2.7/lib-old', '/var/www/ceis/envs/env_ceis/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages', '/var/www/ceis/public', '/var/www/ceis/public/ceis'] |
Server time: | Qui, 28 Mar 2024 22:40:03 -0300 |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/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 |
---|---|
e | FieldError(u"Cannot resolve keyword u'dispositivos_legais_fmt_compact' into field. Choices are: alineas, artigos, ativa, data_atualizacao, data_criacao, data_final, data_inicial, data_transito_julgado, dispositivos_legais, empresa, empresa_id, id, multas, orgao, orgao_id, origem, paragrafos, sancao_incisos_set, tipo, tipo_id",) |
callback_args | () |
resolver_match | ResolverMatch(func=rest_api.sancao.view_sets.SancoesCorrentesViewSet, args=(), kwargs={}, url_name=sancoes_correntes-list, app_name=None, namespaces=[]) |
middleware_method | <bound method RevisionMiddleware.process_exception of <reversion.middleware.RevisionMiddleware object at 0x7fcef0539d10>> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7fcef3300d50> |
request | "<WSGIRequest\npath:/api/sancoes_correntes/,\nGET:<QueryDict: {u'ordering': [u'dispositivos_legais_fmt_compact'], u'offset': [u'20']}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{u'CSRF_COOKIE': u't1ZS9tCNdYm7XzlVZYKxjshstt5OFvVx',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_CONNECTION': 'close',\n 'HTTP_HOST': 'ceis.cge.al.gov.br',\n 'HTTP_USER_AGENT': 'claudebot',\n 'HTTP_X_REAL_IP': '44.200.230.43',\n 'HTTP_X_SCHEME': 'http',\n 'PATH_INFO': u'/api/sancoes_correntes/',\n 'QUERY_STRING': 'offset=20&ordering=dispositivos_legais_fmt_compact',\n 'RAW_URI': '/api/sancoes_correntes/?offset=20&ordering=dispositivos_legais_fmt_compact',\n 'REMOTE_ADDR': '127.0.0.1',\n 'REMOTE_PORT': '33273',\n 'REQUEST_METHOD': 'GET',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': 'ceis.cge.al.gov.br',\n 'SERVER_PORT': '80',\n 'SERVER_PROTOCOL': 'HTTP/1.0',\n 'SERVER_SOFTWARE': 'gunicorn/18.0',\n 'gunicorn.socket': <socket._socketobject object at 0x7fceed2e8590>,\n 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fcef6d7c1e0>,\n 'wsgi.file_wrapper': <class gunicorn.http.wsgi.FileWrapper at 0x7fcef40c00b8>,\n 'wsgi.input': <gunicorn.http.body.Body object at 0x7fceeda89210>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': False,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
callback | <function SancoesCorrentesViewSet at 0x7fceee3c6050> |
wrapped_callback | <function SancoesCorrentesViewSet at 0x7fceee3c6050> |
resolver | <RegexURLResolver 'ceis.urls' (None:None) ^/> |
callback_kwargs | {} |
response | None |
urlconf | 'ceis.urls' |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/django/views/decorators/csrf.py
in wrapped_view
"""
Marks a view function as being exempt from the CSRF view protection.
"""
# We could just do view_func.csrf_exempt = True, but decorators
# are nicer if they don't have side-effects, so we return a new
# function.
def wrapped_view(*args, **kwargs):
return view_func(*args, **kwargs)...
wrapped_view.csrf_exempt = True
return wraps(view_func, assigned=available_attrs(view_func))(wrapped_view)
Variable | Value |
---|---|
args | (<WSGIRequest: GET '/api/sancoes_correntes/?offset=20&ordering=dispositivos_legais_fmt_compact'>,) |
view_func | <function SancoesCorrentesViewSet at 0x7fceee3baf50> |
kwargs | {} |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/rest_framework/viewsets.py
in view
setattr(self, method, handler)
# Patch this in as it's otherwise only present from 1.5 onwards
if hasattr(self, 'get') and not hasattr(self, 'head'):
self.head = self.get
# And continue as usual
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 |
---|---|
initkwargs | {u'suffix': u'List'} |
self | <rest_api.sancao.view_sets.SancoesCorrentesViewSet object at 0x7fceee122f10> |
args | () |
request | "<WSGIRequest\npath:/api/sancoes_correntes/,\nGET:<QueryDict: {u'ordering': [u'dispositivos_legais_fmt_compact'], u'offset': [u'20']}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{u'CSRF_COOKIE': u't1ZS9tCNdYm7XzlVZYKxjshstt5OFvVx',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_CONNECTION': 'close',\n 'HTTP_HOST': 'ceis.cge.al.gov.br',\n 'HTTP_USER_AGENT': 'claudebot',\n 'HTTP_X_REAL_IP': '44.200.230.43',\n 'HTTP_X_SCHEME': 'http',\n 'PATH_INFO': u'/api/sancoes_correntes/',\n 'QUERY_STRING': 'offset=20&ordering=dispositivos_legais_fmt_compact',\n 'RAW_URI': '/api/sancoes_correntes/?offset=20&ordering=dispositivos_legais_fmt_compact',\n 'REMOTE_ADDR': '127.0.0.1',\n 'REMOTE_PORT': '33273',\n 'REQUEST_METHOD': 'GET',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': 'ceis.cge.al.gov.br',\n 'SERVER_PORT': '80',\n 'SERVER_PROTOCOL': 'HTTP/1.0',\n 'SERVER_SOFTWARE': 'gunicorn/18.0',\n 'gunicorn.socket': <socket._socketobject object at 0x7fceed2e8590>,\n 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fcef6d7c1e0>,\n 'wsgi.file_wrapper': <class gunicorn.http.wsgi.FileWrapper at 0x7fcef40c00b8>,\n 'wsgi.input': <gunicorn.http.body.Body object at 0x7fceeda89210>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': False,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
actions | {u'get': u'list'} |
handler | <bound method SancoesCorrentesViewSet.list of <rest_api.sancao.view_sets.SancoesCorrentesViewSet object at 0x7fceee122f10>> |
kwargs | {} |
action | u'list' |
method | u'get' |
cls | <class 'rest_api.sancao.view_sets.SancoesCorrentesViewSet'> |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/rest_framework/views.py
in dispatch
self.http_method_not_allowed)
else:
handler = self.http_method_not_allowed
response = handler(request, *args, **kwargs)
except Exception as exc:
response = self.handle_exception(exc)...
self.response = self.finalize_response(request, response, *args, **kwargs)
return self.response
def options(self, request, *args, **kwargs):
"""
Variable | Value |
---|---|
exc | FieldError(u"Cannot resolve keyword u'dispositivos_legais_fmt_compact' into field. Choices are: alineas, artigos, ativa, data_atualizacao, data_criacao, data_final, data_inicial, data_transito_julgado, dispositivos_legais, empresa, empresa_id, id, multas, orgao, orgao_id, origem, paragrafos, sancao_incisos_set, tipo, tipo_id",) |
self | <rest_api.sancao.view_sets.SancoesCorrentesViewSet object at 0x7fceee122f10> |
args | () |
request | <rest_framework.request.Request object at 0x7fceee1229d0> |
handler | <bound method SancoesCorrentesViewSet.list of <rest_api.sancao.view_sets.SancoesCorrentesViewSet object at 0x7fceee122f10>> |
kwargs | {} |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/rest_framework/views.py
in dispatch
# Get the appropriate handler method
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
response = handler(request, *args, **kwargs)...
except Exception as exc:
response = self.handle_exception(exc)
self.response = self.finalize_response(request, response, *args, **kwargs)
return self.response
Variable | Value |
---|---|
exc | FieldError(u"Cannot resolve keyword u'dispositivos_legais_fmt_compact' into field. Choices are: alineas, artigos, ativa, data_atualizacao, data_criacao, data_final, data_inicial, data_transito_julgado, dispositivos_legais, empresa, empresa_id, id, multas, orgao, orgao_id, origem, paragrafos, sancao_incisos_set, tipo, tipo_id",) |
self | <rest_api.sancao.view_sets.SancoesCorrentesViewSet object at 0x7fceee122f10> |
args | () |
request | <rest_framework.request.Request object at 0x7fceee1229d0> |
handler | <bound method SancoesCorrentesViewSet.list of <rest_api.sancao.view_sets.SancoesCorrentesViewSet object at 0x7fceee122f10>> |
kwargs | {} |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/rest_framework/mixins.py
in list
class ListModelMixin(object):
"""
List a queryset.
"""
def list(self, request, *args, **kwargs):
queryset = self.filter_queryset(self.get_queryset())
page = self.paginate_queryset(queryset)...
if page is not None:
serializer = self.get_serializer(page, many=True)
return self.get_paginated_response(serializer.data)
serializer = self.get_serializer(queryset, many=True)
return Response(serializer.data)
Variable | Value |
---|---|
queryset | Error in formatting: FieldError: Cannot resolve keyword u'dispositivos_legais_fmt_compact' into field. Choices are: alineas, artigos, ativa, data_atualizacao, data_criacao, data_final, data_inicial, data_transito_julgado, dispositivos_legais, empresa, empresa_id, id, multas, orgao, orgao_id, origem, paragrafos, sancao_incisos_set, tipo, tipo_id |
self | <rest_api.sancao.view_sets.SancoesCorrentesViewSet object at 0x7fceee122f10> |
args | () |
request | <rest_framework.request.Request object at 0x7fceee1229d0> |
kwargs | {} |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/rest_framework/generics.py
in paginate_queryset
def paginate_queryset(self, queryset):
"""
Return a single page of results, or `None` if pagination is disabled.
"""
if self.paginator is None:
return None
return self.paginator.paginate_queryset(queryset, self.request, view=self)...
def get_paginated_response(self, data):
"""
Return a paginated style `Response` object for the given output data.
"""
assert self.paginator is not None
Variable | Value |
---|---|
self | <rest_api.sancao.view_sets.SancoesCorrentesViewSet object at 0x7fceee122f10> |
queryset | Error in formatting: FieldError: Cannot resolve keyword u'dispositivos_legais_fmt_compact' into field. Choices are: alineas, artigos, ativa, data_atualizacao, data_criacao, data_final, data_inicial, data_transito_julgado, dispositivos_legais, empresa, empresa_id, id, multas, orgao, orgao_id, origem, paragrafos, sancao_incisos_set, tipo, tipo_id |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/rest_framework/pagination.py
in paginate_queryset
return None
self.offset = self.get_offset(request)
self.count = _get_count(queryset)
self.request = request
if self.count > self.limit and self.template is not None:
self.display_page_controls = True
return list(queryset[self.offset:self.offset + self.limit])...
def get_paginated_response(self, data):
return Response(OrderedDict([
('count', self.count),
('next', self.get_next_link()),
('previous', self.get_previous_link()),
Variable | Value |
---|---|
request | <rest_framework.request.Request object at 0x7fceee1229d0> |
self | <rest_framework.pagination.LimitOffsetPagination object at 0x7fceee122590> |
queryset | Error in formatting: FieldError: Cannot resolve keyword u'dispositivos_legais_fmt_compact' into field. Choices are: alineas, artigos, ativa, data_atualizacao, data_criacao, data_final, data_inicial, data_transito_julgado, dispositivos_legais, empresa, empresa_id, id, multas, orgao, orgao_id, origem, paragrafos, sancao_incisos_set, tipo, tipo_id |
view | <rest_api.sancao.view_sets.SancoesCorrentesViewSet object at 0x7fceee122f10> |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/django/db/models/query.py
in __iter__
2. sql/compiler.results_iter()
- Returns one row at time. At this point the rows are still just
tuples. In some cases the return values are converted to
Python values at this location.
3. self.iterator()
- Responsible for turning the rows into model objects.
"""
self._fetch_all()...
return iter(self._result_cache)
def __bool__(self):
self._fetch_all()
return bool(self._result_cache)
Variable | Value |
---|---|
self | Error in formatting: FieldError: Cannot resolve keyword u'dispositivos_legais_fmt_compact' into field. Choices are: alineas, artigos, ativa, data_atualizacao, data_criacao, data_final, data_inicial, data_transito_julgado, dispositivos_legais, empresa, empresa_id, id, multas, orgao, orgao_id, origem, paragrafos, sancao_incisos_set, tipo, tipo_id |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/django/db/models/query.py
in _fetch_all
c.__dict__.update(kwargs)
if setup and hasattr(c, '_setup_query'):
c._setup_query()
return c
def _fetch_all(self):
if self._result_cache is None:
self._result_cache = list(self.iterator())...
if self._prefetch_related_lookups and not self._prefetch_done:
self._prefetch_related_objects()
def _next_is_sticky(self):
"""
Indicates that the next filter call and the one following that should
Variable | Value |
---|---|
self | Error in formatting: FieldError: Cannot resolve keyword u'dispositivos_legais_fmt_compact' into field. Choices are: alineas, artigos, ativa, data_atualizacao, data_criacao, data_final, data_inicial, data_transito_julgado, dispositivos_legais, empresa, empresa_id, id, multas, orgao, orgao_id, origem, paragrafos, sancao_incisos_set, tipo, tipo_id |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/django/db/models/query.py
in iterator
An iterator over the results from applying this QuerySet to the
database.
"""
db = self.db
compiler = self.query.get_compiler(using=db)
# Execute the query. This will also fill compiler.select, klass_info,
# and annotations.
results = compiler.execute_sql()...
select, klass_info, annotation_col_map = (compiler.select, compiler.klass_info,
compiler.annotation_col_map)
if klass_info is None:
return
model_cls = klass_info['model']
select_fields = klass_info['select_fields']
Variable | Value |
---|---|
self | Error in formatting: FieldError: Cannot resolve keyword u'dispositivos_legais_fmt_compact' into field. Choices are: alineas, artigos, ativa, data_atualizacao, data_criacao, data_final, data_inicial, data_transito_julgado, dispositivos_legais, empresa, empresa_id, id, multas, orgao, orgao_id, origem, paragrafos, sancao_incisos_set, tipo, tipo_id |
db | 'default' |
compiler | <django.db.models.sql.compiler.SQLCompiler object at 0x7fceee11df90> |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py
in execute_sql
subclasses such as InsertQuery). It's possible, however, that no query
is needed, as the filters describe an empty set. In that case, None is
returned, to avoid any unnecessary database interaction.
"""
if not result_type:
result_type = NO_RESULTS
try:
sql, params = self.as_sql()...
if not sql:
raise EmptyResultSet
except EmptyResultSet:
if result_type == MULTI:
return iter([])
else:
Variable | Value |
---|---|
self | <django.db.models.sql.compiler.SQLCompiler object at 0x7fceee11df90> |
result_type | 'multi' |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py
in as_sql
# setup created. So, take note of alias counts before the query ran.
# However we do not want to get rid of stuff done in pre_sql_setup(),
# as the pre_sql_setup will modify query state in a way that forbids
# another run of it.
self.subquery = subquery
refcounts_before = self.query.alias_refcount.copy()
try:
extra_select, order_by, group_by = self.pre_sql_setup()...
if with_limits and self.query.low_mark == self.query.high_mark:
return '', ()
distinct_fields = self.get_distinct()
# This must come after 'select', 'ordering', and 'distinct' -- see
# docstring of get_from_clause() for details.
Variable | Value |
---|---|
subquery | False |
refcounts_before | {u'sancao_sancao': 6, u'sancao_tiposancao': 1} |
with_limits | True |
with_col_aliases | False |
self | <django.db.models.sql.compiler.SQLCompiler object at 0x7fceee11df90> |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py
in pre_sql_setup
def pre_sql_setup(self):
"""
Does any necessary class setup immediately prior to producing SQL. This
is for things that can't necessarily be done in __init__ because we
might not have all the pieces in place at that time.
"""
self.setup_query()
order_by = self.get_order_by()...
extra_select = self.get_extra_select(order_by, self.select)
group_by = self.get_group_by(self.select + extra_select, order_by)
return extra_select, order_by, group_by
def get_group_by(self, select, order_by):
"""
Variable | Value |
---|---|
self | <django.db.models.sql.compiler.SQLCompiler object at 0x7fceee11df90> |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py
in get_order_by
), False))
continue
if not self.query._extra or col not in self.query._extra:
# 'col' is of the form 'field' or 'field1__field2' or
# '-field1__field2__field', etc.
order_by.extend(self.find_ordering_name(
field, self.query.get_meta(), default_order=asc))...
else:
if col not in self.query.extra_select:
order_by.append((
OrderBy(RawSQL(*self.query.extra[col]), descending=descending),
False))
else:
Variable | Value |
---|---|
order_by | [] |
ordering | [u'dispositivos_legais_fmt_compact'] |
self | <django.db.models.sql.compiler.SQLCompiler object at 0x7fceee11df90> |
pos | 0 |
order | 'ASC' |
asc | 'ASC' |
field | u'dispositivos_legais_fmt_compact' |
descending | False |
col | u'dispositivos_legais_fmt_compact' |
desc | 'DESC' |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py
in find_ordering_name
Returns the table alias (the name might be ambiguous, the alias will
not be) and column name for ordering by the given 'name' parameter.
The 'name' is of the form 'field1__field2__...__fieldN'.
"""
name, order = get_order_dir(name, default_order)
descending = True if order == 'DESC' else False
pieces = name.split(LOOKUP_SEP)
field, targets, alias, joins, path, opts = self._setup_joins(pieces, opts, alias)...
# If we get to this point and the field is a relation to another model,
# append the default ordering for that model unless the attribute name
# of the field is specified.
if field.rel and path and opts.ordering and name != field.attname:
# Firstly, avoid infinite loops.
Variable | Value |
---|---|
name | u'dispositivos_legais_fmt_compact' |
default_order | 'ASC' |
self | <django.db.models.sql.compiler.SQLCompiler object at 0x7fceee11df90> |
pieces | [u'dispositivos_legais_fmt_compact'] |
alias | None |
descending | False |
already_seen | None |
order | 'ASC' |
opts | <Options for Sancao> |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py
in _setup_joins
Note that get_ordering and get_distinct must produce same target
columns on same input, as the prefixes of get_ordering and get_distinct
must match. Executing SQL where this is not true is an error.
"""
if not alias:
alias = self.query.get_initial_alias()
field, targets, opts, joins, path = self.query.setup_joins(
pieces, opts, alias)...
alias = joins[-1]
return field, targets, alias, joins, path, opts
def get_from_clause(self):
"""
Returns a list of strings that are joined together to go after the
Variable | Value |
---|---|
alias | u'sancao_sancao' |
self | <django.db.models.sql.compiler.SQLCompiler object at 0x7fceee11df90> |
opts | <Options for Sancao> |
pieces | [u'dispositivos_legais_fmt_compact'] |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/django/db/models/sql/query.py
in setup_joins
that value. Final field is needed for example in some value
conversions (convert 'obj' in fk__id=obj to pk val using the foreign
key field for example).
"""
joins = [alias]
# First, generate the path for the names
path, final_field, targets, rest = self.names_to_path(
names, opts, allow_many, fail_on_missing=True)...
# Then, add the path to the query's joins. Note that we can't trim
# joins at this stage - we will need the information about join type
# of the trimmed joins.
for join in path:
opts = join.to_opts
Variable | Value |
---|---|
self | <django.db.models.sql.query.Query object at 0x7fceee1226d0> |
alias | u'sancao_sancao' |
names | [u'dispositivos_legais_fmt_compact'] |
joins | [u'sancao_sancao'] |
can_reuse | None |
allow_many | True |
opts | <Options for Sancao> |
/var/www/ceis/envs/env_ceis/local/lib/python2.7/site-packages/django/db/models/sql/query.py
in names_to_path
# We didn't find the current field, so move position back
# one step.
pos -= 1
if pos == -1 or fail_on_missing:
field_names = list(get_field_names_from_opts(opts))
available = sorted(field_names + list(self.annotation_select))
raise FieldError("Cannot resolve keyword %r into field. "
"Choices are: %s" % (name, ", ".join(available)))...
break
# Check if we need any joins for concrete inheritance cases (the
# field lives in parent, but we are currently in one of its
# children)
if model is not opts.model:
# The field lives on a base class of the current model.
Variable | Value |
---|---|
available | ['alineas', 'artigos', 'ativa', 'data_atualizacao', 'data_criacao', 'data_final', 'data_inicial', 'data_transito_julgado', 'dispositivos_legais', 'empresa', u'empresa_id', u'id', u'multas', 'orgao', u'orgao_id', 'origem', 'paragrafos', u'sancao_incisos_set', 'tipo', u'tipo_id'] |
name | u'dispositivos_legais_fmt_compact' |
self | <django.db.models.sql.query.Query object at 0x7fceee1226d0> |
pos | -1 |
names | [u'dispositivos_legais_fmt_compact'] |
fail_on_missing | True |
path | [] |
field_names | ['empresa', 'dispositivos_legais', 'paragrafos', u'tipo_id', 'tipo', 'data_final', u'orgao_id', 'orgao', 'alineas', u'sancao_incisos_set', 'data_inicial', 'data_criacao', 'ativa', 'data_transito_julgado', 'artigos', 'origem', u'multas', 'data_atualizacao', u'id', u'empresa_id'] |
cur_names_with_path | (u'dispositivos_legais_fmt_compact', []) |
names_with_path | [] |
allow_many | True |
opts | <Options for Sancao> |
Variable | Value |
---|---|
ordering | u'dispositivos_legais_fmt_compact' |
offset | u'20' |
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
HTTP_ACCEPT | '*/*' |
SERVER_PROTOCOL | 'HTTP/1.0' |
SERVER_SOFTWARE | 'gunicorn/18.0' |
SCRIPT_NAME | u'' |
wsgi.input | <gunicorn.http.body.Body object at 0x7fceeda89210> |
REQUEST_METHOD | 'GET' |
HTTP_HOST | 'ceis.cge.al.gov.br' |
PATH_INFO | u'/api/sancoes_correntes/' |
wsgi.multithread | False |
QUERY_STRING | 'offset=20&ordering=dispositivos_legais_fmt_compact' |
HTTP_CONNECTION | 'close' |
HTTP_X_REAL_IP | '44.200.230.43' |
HTTP_X_SCHEME | 'http' |
HTTP_USER_AGENT | 'claudebot' |
wsgi.version | (1, 0) |
REMOTE_PORT | '33273' |
RAW_URI | '/api/sancoes_correntes/?offset=20&ordering=dispositivos_legais_fmt_compact' |
REMOTE_ADDR | '127.0.0.1' |
wsgi.run_once | False |
wsgi.errors | <open file '<stderr>', mode 'w' at 0x7fcef6d7c1e0> |
wsgi.multiprocess | False |
wsgi.url_scheme | 'http' |
gunicorn.socket | <socket._socketobject object at 0x7fceed2e8590> |
SERVER_NAME | 'ceis.cge.al.gov.br' |
SERVER_PORT | '80' |
wsgi.file_wrapper | '' |
CSRF_COOKIE | u't1ZS9tCNdYm7XzlVZYKxjshstt5OFvVx' |
ceis.settings.production
Setting | Value |
---|---|
SECURE_BROWSER_XSS_FILTER | False |
USE_THOUSAND_SEPARATOR | False |
CSRF_COOKIE_SECURE | False |
LANGUAGE_CODE | 'pt-br' |
ROOT_URLCONF | 'ceis.urls' |
MANAGERS | (('Fernando Oliveira', 'fernando.oliveira@itec.al.gov.br'),) |
SILENCED_SYSTEM_CHECKS | [] |
DEFAULT_CHARSET | 'utf-8' |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
STATIC_ROOT | '/var/www/ceis/public/static' |
DJANGO_ROOT | '/var/www/ceis/public/ceis' |
ALLOWED_HOSTS | ['*'] |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
SERVER_EMAIL | 'suportesistemas.itec@itec.al.gov.br' |
SECURE_HSTS_SECONDS | 0 |
STATICFILES_FINDERS | ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_NAME | 'sessionid' |
TIME_INPUT_FORMATS | ('%H:%M:%S', '%H:%M:%S.%f', '%H:%M') |
SECURE_REDIRECT_EXEMPT | [] |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'HOST': '10.1.16.173', 'NAME': 'prd_ceis', 'OPTIONS': {}, 'PASSWORD': u'********************', 'PORT': '5432', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': 'UTC', 'USER': 'adm_ceis'}} |
EMAIL_SSL_KEYFILE | u'********************' |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
FILE_UPLOAD_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler') |
DEFAULT_CONTENT_TYPE | 'text/html' |
APPEND_SLASH | True |
LOCALE_PATHS | () |
DATABASE_ROUTERS | [] |
DEFAULT_TABLESPACE | '' |
LOCAL_APPS | ('sancao', 'autenticacao', 'rest_framework', 'reversion', 'crispy_forms', 'relatorio', 'pagination_bootstrap') |
YEAR_MONTH_FORMAT | 'F Y' |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
SESSION_COOKIE_PATH | '/' |
SECURE_CONTENT_TYPE_NOSNIFF | False |
MIDDLEWARE_CLASSES | ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'reversion.middleware.RevisionMiddleware', 'pagination_bootstrap.middleware.PaginationMiddleware') |
USE_I18N | True |
THOUSAND_SEPARATOR | ',' |
SECRET_KEY | u'********************' |
LANGUAGE_COOKIE_NAME | 'django_language' |
DEFAULT_INDEX_TABLESPACE | '' |
LOGGING_CONFIG | 'logging.config.dictConfig' |
TEMPLATE_LOADERS | ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader') |
FIRST_DAY_OF_WEEK | 0 |
WSGI_APPLICATION | 'ceis.wsgi.application' |
TEMPLATE_DEBUG | True |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
AUTHENTICATION_BACKENDS | ('django.contrib.auth.backends.ModelBackend',) |
FORCE_SCRIPT_NAME | None |
USE_X_FORWARDED_HOST | False |
EMAIL_TIMEOUT | None |
SECURE_SSL_HOST | None |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SESSION_COOKIE_SECURE | False |
CSRF_COOKIE_DOMAIN | None |
FILE_CHARSET | 'utf-8' |
DEBUG | True |
LANGUAGE_COOKIE_DOMAIN | None |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
INSTALLED_APPS | ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'sancao', 'autenticacao', 'rest_framework', 'reversion', 'crispy_forms', 'relatorio', 'pagination_bootstrap', 'base') |
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')) |
USE_L10N | True |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
STATICFILES_DIRS | ('/var/www/ceis/public/assets',) |
PREPEND_WWW | False |
SECURE_PROXY_SSL_HEADER | None |
LANGUAGE_COOKIE_AGE | None |
SESSION_COOKIE_HTTPONLY | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
CSRF_COOKIE_AGE | 31449600 |
MONTH_DAY_FORMAT | 'F j' |
LOGIN_URL | '/login/' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
TIME_FORMAT | 'P' |
AUTH_USER_MODEL | 'auth.User' |
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') |
CSRF_COOKIE_NAME | 'csrftoken' |
EMAIL_HOST_PASSWORD | u'********************' |
PASSWORD_RESET_TIMEOUT_DAYS | u'********************' |
SESSION_FILE_PATH | None |
CACHE_MIDDLEWARE_ALIAS | 'default' |
SESSION_SAVE_EVERY_REQUEST | False |
NUMBER_GROUPING | 0 |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_COOKIE_PATH | '/' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
DECIMAL_SEPARATOR | '.' |
IGNORABLE_404_URLS | () |
MIGRATION_MODULES | {} |
TEMPLATE_STRING_IF_INVALID | '' |
LOGOUT_URL | '/accounts/logout/' |
EMAIL_USE_TLS | False |
FIXTURE_DIRS | ('/var/www/ceis/public/fixtures',) |
EMAIL_HOST | 'mail.expresso.al.gov.br' |
DATE_FORMAT | 'N j, Y' |
MEDIA_ROOT | '/var/www/ceis/public/media' |
LANGUAGE_COOKIE_PATH | '/' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
ADMINS | (('Fernando Oliveira', 'fernando.oliveira@itec.al.gov.br'),) |
FORMAT_MODULE_PATH | None |
DEFAULT_FROM_EMAIL | 'suportesistemas.itec@itec.al.gov.br' |
REST_FRAMEWORK | {'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.BasicAuthentication', 'rest_framework.authentication.SessionAuthentication', 'rest_framework.authentication.TokenAuthentication'), 'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend', 'rest_framework.filters.OrderingFilter', 'rest_framework.filters.SearchFilter'), 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', 'DEFAULT_PERMISSION_CLASSES': ['rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly', 'rest_framework.permissions.AllowAny'], 'DEFAULT_RENDERER_CLASSES': ('rest_framework.renderers.JSONRenderer', 'rest_framework.renderers.BrowsableAPIRenderer'), 'PAGE_SIZE': 10} |
MEDIA_URL | '/media/' |
DATETIME_FORMAT | 'N j, Y, P' |
TEMPLATE_DIRS | ('/var/www/ceis/public/templates',) |
SITE_ID | 1 |
DISALLOWED_USER_AGENTS | () |
ALLOWED_INCLUDE_ROOTS | () |
LOGGING | {'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}}, 'loggers': {'django.request': {'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': True}}, 'version': 1} |
SHORT_DATE_FORMAT | 'm/d/Y' |
TEMPLATES | [] |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
CACHE_MIDDLEWARE_KEY_PREFIX | u'********************' |
SECURE_SSL_REDIRECT | False |
TIME_ZONE | 'America/Maceio' |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_USE_SSL | False |
TEMPLATE_CONTEXT_PROCESSORS | ('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages', 'django.core.context_processors.request') |
SITE_NAME | 'ceis' |
SESSION_COOKIE_AGE | 1209600 |
SETTINGS_MODULE | 'ceis.settings.production' |
USE_ETAGS | False |
SITE_ROOT | '/var/www/ceis/public' |
LANGUAGES_BIDI | ('he', 'ar', 'fa', 'ur') |
FILE_UPLOAD_TEMP_DIR | None |
INTERNAL_IPS | () |
STATIC_URL | '/static/' |
EMAIL_PORT | 587 |
USE_TZ | True |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
TEST_NON_SERIALIZED_APPS | [] |
PASSWORD_HASHERS | u'********************' |
ABSOLUTE_URL_OVERRIDES | {} |
DJANGO_APPS | ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin') |
CACHE_MIDDLEWARE_SECONDS | 600 |
EMAIL_SSL_CERTFILE | None |
CSRF_COOKIE_HTTPONLY | False |
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') |
EMAIL_HOST_USER | 'suportesistemas.itec' |
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.