Document matching query does not exist.
Request Method: | GET |
---|---|
Request URL: | http://fastinform.com/d/655526/?text=space%20station |
Django Version: | 5.0.3 |
Exception Type: | DoesNotExist |
Exception Value: | Document matching query does not exist. |
Exception Location: | /home/fastinform/env/lib/python3.10/site-packages/django/db/models/query.py, line 649, in get |
Raised during: | fastinform.frontend.views.DocumentView |
Python Executable: | /home/fastinform/env/bin/python |
Python Version: | 3.10.12 |
Python Path: | ['/home/fastinform/app', '/home/fastinform/env/bin', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/home/fastinform/env/lib/python3.10/site-packages', '/home/fastinform/app', '/home/fastinform/env/lib/python3.10/site-packages/odf', '/home/fastinform/env/lib/python3.10/site-packages/odf', '/home/fastinform/env/lib/python3.10/site-packages/odf', '/home/fastinform/env/lib/python3.10/site-packages/odf', '/home/fastinform/env/lib/python3.10/site-packages/odf', '/home/fastinform/env/lib/python3.10/site-packages/odf', '/home/fastinform/env/lib/python3.10/site-packages/odf'] |
Server time: | Thu, 28 Mar 2024 22:27:08 -0400 |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/fields/__init__.py
, line 2752, in to_pythonreturn value
return value.hex
def to_python(self, value):
if value is not None and not isinstance(value, uuid.UUID):
input_form = "int" if isinstance(value, int) else "hex"
try:
return uuid.UUID(**{input_form: value})…
except (AttributeError, ValueError):
raise exceptions.ValidationError(
self.error_messages["invalid"],
code="invalid",
params={"value": value},
)
Variable | Value |
---|---|
input_form | 'hex' |
self | <django.db.models.fields.UUIDField: id> |
value | '655526' |
/usr/lib/python3.10/uuid.py
, line 177, in __init__if [hex, bytes, bytes_le, fields, int].count(None) != 4:
raise TypeError('one of the hex, bytes, bytes_le, fields, '
'or int arguments must be given')
if hex is not None:
hex = hex.replace('urn:', '').replace('uuid:', '')
hex = hex.strip('{}').replace('-', '')
if len(hex) != 32:
raise ValueError('badly formed hexadecimal UUID string')…
int = int_(hex, 16)
if bytes_le is not None:
if len(bytes_le) != 16:
raise ValueError('bytes_le is not a 16-char string')
bytes = (bytes_le[4-1::-1] + bytes_le[6-1:4-1:-1] +
bytes_le[8-1:6-1:-1] + bytes_le[8:])
Variable | Value |
---|---|
bytes | None |
bytes_le | None |
fields | None |
hex | '655526' |
int | None |
is_safe | <SafeUUID.unknown: None> |
self | Error in formatting: AttributeError: 'UUID' object has no attribute 'int' |
version | None |
/home/fastinform/app/fastinform/frontend/views.py
, line 250, in getuser_qs = self.request.GET.get("u", None)
user = self.request.user.id if self.request.user.is_authenticated else user_qs
if user_qs:
action = "sendgrid_click"
else:
action = "document_click"
try:
document = Document.objects.get(pk=self.kwargs["pk"])…
except (Document.DoesNotExist, ValidationError):
document = Document.objects.get(original_id=str(self.kwargs["pk"]))
text = urllib.parse.quote(self.request.GET.get("text", ""))
if document.fileo:
url = document.fileo.file.url
else:
Variable | Value |
---|---|
action | 'document_click' |
args | () |
kwargs | {'pk': '655526'} |
request | <WSGIRequest: GET '/d/655526/?text=space%20station'> |
self | <fastinform.frontend.views.DocumentView object at 0x7201205bc7f0> |
user | None |
user_qs | None |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/manager.py
, line 87, in manager_methodreturn []
@classmethod
def _get_queryset_methods(cls, queryset_class):
def create_method(name, method):
@wraps(method)
def manager_method(self, *args, **kwargs):
return getattr(self.get_queryset(), name)(*args, **kwargs)…
return manager_method
new_methods = {}
for name, method in inspect.getmembers(
queryset_class, predicate=inspect.isfunction
Variable | Value |
---|---|
args | () |
kwargs | {'pk': '655526'} |
name | 'get' |
self | <django.db.models.manager.Manager object at 0x720123363490> |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/query.py
, line 635, in getkeyword arguments.
"""
if self.query.combinator and (args or kwargs):
raise NotSupportedError(
"Calling QuerySet.get(...) with filters after %s() is not "
"supported." % self.query.combinator
)
clone = self._chain() if self.query.combinator else self.filter(*args, **kwargs)…
if self.query.can_filter() and not self.query.distinct_fields:
clone = clone.order_by()
limit = None
if (
not clone.query.select_for_update
or connections[clone.db].features.supports_select_for_update_with_limit
Variable | Value |
---|---|
args | () |
kwargs | {'pk': '655526'} |
self | <QuerySet [<Document: Document object (8247a0cc-74b6-4997-8755-54d483ef776e)>, <Document: Document object (36ec54c8-11e7-471d-82b5-3a9782ccc060)>, <Document: Document object (228cdd47-28e7-416b-a8f7-22bd992b4602)>, <Document: Document object (1d54bcf5-1128-46a2-b904-b1d47b8e54e7)>, <Document: Document object (3100671b-7f39-490b-95a7-9088450a10b3)>, <Document: Document object (c6ea8e42-2962-45c3-9692-7762c35c2f62)>, <Document: Document object (5bd4ced7-c5b7-4f91-aaf9-efa16e5aa379)>, <Document: Document object (82216520-a885-4263-b14f-9d74218576b3)>, <Document: Document object (ee5c39ce-9788-4c85-94e0-6967ba5a6f69)>, <Document: Document object (6e6c80c8-c72d-40ad-bfee-f5fc86d81843)>, <Document: Document object (2eb8d15e-1ddc-47eb-90e2-393e8ff2b644)>, <Document: Document object (0aae7437-5bcf-4f83-863c-02d21c361a9e)>, <Document: Document object (db6688f5-739a-4f0c-ae93-0e7dcb62ddfc)>, <Document: Document object (a657cb4d-d8a2-4e01-8e8d-b9eb0199b0c6)>, <Document: Document object (44d0b1dc-b389-421a-9867-6a8a871e9a32)>, <Document: Document object (4baf68c0-2339-4bda-bb86-852f227d1bee)>, <Document: Document object (8ff138bb-e5c6-4a34-8ff6-563b1cfade0e)>, <Document: Document object (e0bc27e5-f249-49c0-afba-20e78ebe04f6)>, <Document: Document object (73d1a797-9574-44f7-ab7e-8aaf0e40fa9c)>, <Document: Document object (fa672093-bf77-433e-9665-79789d32ea34)>, '...(remaining elements truncated)...']> |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/query.py
, line 1476, in filterdef filter(self, *args, **kwargs):
"""
Return a new QuerySet instance with the args ANDed to the existing
set.
"""
self._not_support_combined_queries("filter")
return self._filter_or_exclude(False, args, kwargs)…
def exclude(self, *args, **kwargs):
"""
Return a new QuerySet instance with NOT (args) ANDed to the existing
set.
"""
Variable | Value |
---|---|
args | () |
kwargs | {'pk': '655526'} |
self | <QuerySet [<Document: Document object (8247a0cc-74b6-4997-8755-54d483ef776e)>, <Document: Document object (36ec54c8-11e7-471d-82b5-3a9782ccc060)>, <Document: Document object (228cdd47-28e7-416b-a8f7-22bd992b4602)>, <Document: Document object (1d54bcf5-1128-46a2-b904-b1d47b8e54e7)>, <Document: Document object (3100671b-7f39-490b-95a7-9088450a10b3)>, <Document: Document object (c6ea8e42-2962-45c3-9692-7762c35c2f62)>, <Document: Document object (5bd4ced7-c5b7-4f91-aaf9-efa16e5aa379)>, <Document: Document object (82216520-a885-4263-b14f-9d74218576b3)>, <Document: Document object (ee5c39ce-9788-4c85-94e0-6967ba5a6f69)>, <Document: Document object (6e6c80c8-c72d-40ad-bfee-f5fc86d81843)>, <Document: Document object (2eb8d15e-1ddc-47eb-90e2-393e8ff2b644)>, <Document: Document object (0aae7437-5bcf-4f83-863c-02d21c361a9e)>, <Document: Document object (db6688f5-739a-4f0c-ae93-0e7dcb62ddfc)>, <Document: Document object (a657cb4d-d8a2-4e01-8e8d-b9eb0199b0c6)>, <Document: Document object (44d0b1dc-b389-421a-9867-6a8a871e9a32)>, <Document: Document object (4baf68c0-2339-4bda-bb86-852f227d1bee)>, <Document: Document object (8ff138bb-e5c6-4a34-8ff6-563b1cfade0e)>, <Document: Document object (e0bc27e5-f249-49c0-afba-20e78ebe04f6)>, <Document: Document object (73d1a797-9574-44f7-ab7e-8aaf0e40fa9c)>, <Document: Document object (fa672093-bf77-433e-9665-79789d32ea34)>, '...(remaining elements truncated)...']> |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/query.py
, line 1494, in _filter_or_excludeif (args or kwargs) and self.query.is_sliced:
raise TypeError("Cannot filter a query once a slice has been taken.")
clone = self._chain()
if self._defer_next_filter:
self._defer_next_filter = False
clone._deferred_filter = negate, args, kwargs
else:
clone._filter_or_exclude_inplace(negate, args, kwargs)…
return clone
def _filter_or_exclude_inplace(self, negate, args, kwargs):
if negate:
self._query.add_q(~Q(*args, **kwargs))
else:
Variable | Value |
---|---|
args | () |
clone | <QuerySet [<Document: Document object (8247a0cc-74b6-4997-8755-54d483ef776e)>, <Document: Document object (36ec54c8-11e7-471d-82b5-3a9782ccc060)>, <Document: Document object (228cdd47-28e7-416b-a8f7-22bd992b4602)>, <Document: Document object (1d54bcf5-1128-46a2-b904-b1d47b8e54e7)>, <Document: Document object (3100671b-7f39-490b-95a7-9088450a10b3)>, <Document: Document object (c6ea8e42-2962-45c3-9692-7762c35c2f62)>, <Document: Document object (5bd4ced7-c5b7-4f91-aaf9-efa16e5aa379)>, <Document: Document object (82216520-a885-4263-b14f-9d74218576b3)>, <Document: Document object (ee5c39ce-9788-4c85-94e0-6967ba5a6f69)>, <Document: Document object (6e6c80c8-c72d-40ad-bfee-f5fc86d81843)>, <Document: Document object (2eb8d15e-1ddc-47eb-90e2-393e8ff2b644)>, <Document: Document object (0aae7437-5bcf-4f83-863c-02d21c361a9e)>, <Document: Document object (db6688f5-739a-4f0c-ae93-0e7dcb62ddfc)>, <Document: Document object (a657cb4d-d8a2-4e01-8e8d-b9eb0199b0c6)>, <Document: Document object (44d0b1dc-b389-421a-9867-6a8a871e9a32)>, <Document: Document object (4baf68c0-2339-4bda-bb86-852f227d1bee)>, <Document: Document object (8ff138bb-e5c6-4a34-8ff6-563b1cfade0e)>, <Document: Document object (e0bc27e5-f249-49c0-afba-20e78ebe04f6)>, <Document: Document object (73d1a797-9574-44f7-ab7e-8aaf0e40fa9c)>, <Document: Document object (fa672093-bf77-433e-9665-79789d32ea34)>, '...(remaining elements truncated)...']> |
kwargs | {'pk': '655526'} |
negate | False |
self | <QuerySet [<Document: Document object (8247a0cc-74b6-4997-8755-54d483ef776e)>, <Document: Document object (36ec54c8-11e7-471d-82b5-3a9782ccc060)>, <Document: Document object (228cdd47-28e7-416b-a8f7-22bd992b4602)>, <Document: Document object (1d54bcf5-1128-46a2-b904-b1d47b8e54e7)>, <Document: Document object (3100671b-7f39-490b-95a7-9088450a10b3)>, <Document: Document object (c6ea8e42-2962-45c3-9692-7762c35c2f62)>, <Document: Document object (5bd4ced7-c5b7-4f91-aaf9-efa16e5aa379)>, <Document: Document object (82216520-a885-4263-b14f-9d74218576b3)>, <Document: Document object (ee5c39ce-9788-4c85-94e0-6967ba5a6f69)>, <Document: Document object (6e6c80c8-c72d-40ad-bfee-f5fc86d81843)>, <Document: Document object (2eb8d15e-1ddc-47eb-90e2-393e8ff2b644)>, <Document: Document object (0aae7437-5bcf-4f83-863c-02d21c361a9e)>, <Document: Document object (db6688f5-739a-4f0c-ae93-0e7dcb62ddfc)>, <Document: Document object (a657cb4d-d8a2-4e01-8e8d-b9eb0199b0c6)>, <Document: Document object (44d0b1dc-b389-421a-9867-6a8a871e9a32)>, <Document: Document object (4baf68c0-2339-4bda-bb86-852f227d1bee)>, <Document: Document object (8ff138bb-e5c6-4a34-8ff6-563b1cfade0e)>, <Document: Document object (e0bc27e5-f249-49c0-afba-20e78ebe04f6)>, <Document: Document object (73d1a797-9574-44f7-ab7e-8aaf0e40fa9c)>, <Document: Document object (fa672093-bf77-433e-9665-79789d32ea34)>, '...(remaining elements truncated)...']> |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/query.py
, line 1501, in _filter_or_exclude_inplaceclone._filter_or_exclude_inplace(negate, args, kwargs)
return clone
def _filter_or_exclude_inplace(self, negate, args, kwargs):
if negate:
self._query.add_q(~Q(*args, **kwargs))
else:
self._query.add_q(Q(*args, **kwargs))…
def complex_filter(self, filter_obj):
"""
Return a new QuerySet instance with filter_obj added to the filters.
filter_obj can be a Q object or a dictionary of keyword lookup
Variable | Value |
---|---|
args | () |
kwargs | {'pk': '655526'} |
negate | False |
self | <QuerySet [<Document: Document object (8247a0cc-74b6-4997-8755-54d483ef776e)>, <Document: Document object (36ec54c8-11e7-471d-82b5-3a9782ccc060)>, <Document: Document object (228cdd47-28e7-416b-a8f7-22bd992b4602)>, <Document: Document object (1d54bcf5-1128-46a2-b904-b1d47b8e54e7)>, <Document: Document object (3100671b-7f39-490b-95a7-9088450a10b3)>, <Document: Document object (c6ea8e42-2962-45c3-9692-7762c35c2f62)>, <Document: Document object (5bd4ced7-c5b7-4f91-aaf9-efa16e5aa379)>, <Document: Document object (82216520-a885-4263-b14f-9d74218576b3)>, <Document: Document object (ee5c39ce-9788-4c85-94e0-6967ba5a6f69)>, <Document: Document object (6e6c80c8-c72d-40ad-bfee-f5fc86d81843)>, <Document: Document object (2eb8d15e-1ddc-47eb-90e2-393e8ff2b644)>, <Document: Document object (0aae7437-5bcf-4f83-863c-02d21c361a9e)>, <Document: Document object (db6688f5-739a-4f0c-ae93-0e7dcb62ddfc)>, <Document: Document object (a657cb4d-d8a2-4e01-8e8d-b9eb0199b0c6)>, <Document: Document object (44d0b1dc-b389-421a-9867-6a8a871e9a32)>, <Document: Document object (4baf68c0-2339-4bda-bb86-852f227d1bee)>, <Document: Document object (8ff138bb-e5c6-4a34-8ff6-563b1cfade0e)>, <Document: Document object (e0bc27e5-f249-49c0-afba-20e78ebe04f6)>, <Document: Document object (73d1a797-9574-44f7-ab7e-8aaf0e40fa9c)>, <Document: Document object (fa672093-bf77-433e-9665-79789d32ea34)>, '...(remaining elements truncated)...']> |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/sql/query.py
, line 1613, in add_q# type to remain inner. Existing outer joins can however be demoted.
# (Consider case where rel_a is LOUTER and rel_a__col=1 is added - if
# rel_a doesn't produce any rows, then the whole condition must fail.
# So, demotion is OK.
existing_inner = {
a for a in self.alias_map if self.alias_map[a].join_type == INNER
}
clause, _ = self._add_q(q_object, self.used_aliases)…
if clause:
self.where.add(clause, AND)
self.demote_joins(existing_inner)
def build_where(self, filter_expr):
return self.build_filter(filter_expr, allow_joins=False)[0]
Variable | Value |
---|---|
existing_inner | set() |
q_object | <Q: (AND: ('pk', '655526'))> |
self | <django.db.models.sql.query.Query object at 0x7201205bf4f0> |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/sql/query.py
, line 1645, in _add_qcurrent_negated ^= q_object.negated
branch_negated = branch_negated or q_object.negated
target_clause = WhereNode(connector=connector, negated=q_object.negated)
joinpromoter = JoinPromoter(
q_object.connector, len(q_object.children), current_negated
)
for child in q_object.children:
child_clause, needed_inner = self.build_filter(…
child,
can_reuse=used_aliases,
branch_negated=branch_negated,
current_negated=current_negated,
allow_joins=allow_joins,
split_subq=split_subq,
Variable | Value |
---|---|
allow_joins | True |
branch_negated | False |
check_filterable | True |
child | ('pk', '655526') |
connector | 'AND' |
current_negated | False |
joinpromoter | JoinPromoter(connector='AND', num_children=1, negated=False) |
q_object | <Q: (AND: ('pk', '655526'))> |
self | <django.db.models.sql.query.Query object at 0x7201205bf4f0> |
split_subq | True |
summarize | False |
target_clause | <WhereNode: (AND: )> |
update_join_types | True |
used_aliases | {'documents'} |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/sql/query.py
, line 1559, in build_filterelse:
col = MultiColSource(
alias, targets, join_info.targets, join_info.final_field
)
else:
col = self._get_col(targets[0], join_info.final_field, alias)
condition = self.build_lookup(lookups, col, value)…
lookup_type = condition.lookup_name
clause = WhereNode([condition], connector=AND)
require_outer = (
lookup_type == "isnull" and condition.rhs is True and not current_negated
)
Variable | Value |
---|---|
alias | 'documents' |
allow_joins | True |
allow_many | True |
arg | 'pk' |
branch_negated | False |
can_reuse | {'documents'} |
check_filterable | True |
col | Col(documents, content.Document.id) |
current_negated | False |
filter_expr | ('pk', '655526') |
join_info | JoinInfo(final_field=<django.db.models.fields.UUIDField: id>, targets=(<django.db.models.fields.UUIDField: id>,), opts=<Options for Document>, joins=['documents'], path=[], transform_function=<function Query.setup_joins.<locals>.final_transformer at 0x720120fea0e0>) |
join_list | ['documents'] |
lookups | [] |
opts | <Options for Document> |
parts | ['pk'] |
pre_joins | {} |
reffed_expression | False |
self | <django.db.models.sql.query.Query object at 0x7201205bf4f0> |
split_subq | True |
summarize | False |
targets | (<django.db.models.fields.UUIDField: id>,) |
update_join_types | True |
used_joins | {'documents'} |
value | '655526' |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/sql/query.py
, line 1389, in build_lookup# and do an Exact lookup against it.
lhs = self.try_transform(lhs, lookup_name)
lookup_name = "exact"
lookup_class = lhs.get_lookup(lookup_name)
if not lookup_class:
return
lookup = lookup_class(lhs, rhs)…
# Interpret '__exact=None' as the sql 'is NULL'; otherwise, reject all
# uses of None as a query value unless the lookup supports it.
if lookup.rhs is None and not lookup.can_use_none_as_rhs:
if lookup_name not in ("exact", "iexact"):
raise ValueError("Cannot use None as a query value")
return lhs.get_lookup("isnull")(lhs, True)
Variable | Value |
---|---|
lhs | Col(documents, content.Document.id) |
lookup_class | <class 'django.db.models.lookups.Exact'> |
lookup_name | 'exact' |
lookups | [] |
rhs | '655526' |
self | <django.db.models.sql.query.Query object at 0x7201205bf4f0> |
transforms | [] |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/lookups.py
, line 30, in __init__class Lookup(Expression):
lookup_name = None
prepare_rhs = True
can_use_none_as_rhs = False
def __init__(self, lhs, rhs):
self.lhs, self.rhs = lhs, rhs
self.rhs = self.get_prep_lookup()…
self.lhs = self.get_prep_lhs()
if hasattr(self.lhs, "get_bilateral_transforms"):
bilateral_transforms = self.lhs.get_bilateral_transforms()
else:
bilateral_transforms = []
if bilateral_transforms:
Variable | Value |
---|---|
lhs | Col(documents, content.Document.id) |
rhs | '655526' |
self | Exact(Col(documents, content.Document.id), '655526') |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/lookups.py
, line 364, in get_prep_lookupself.rhs.clear_select_clause()
self.rhs.add_fields(["pk"])
else:
raise ValueError(
"The QuerySet value for an exact lookup must be limited to "
"one result using slicing."
)
return super().get_prep_lookup()…
def as_sql(self, compiler, connection):
# Avoid comparison against direct rhs if lhs is a boolean value. That
# turns "boolfield__exact=True" into "WHERE boolean_field" instead of
# "WHERE boolean_field = True" when allowed.
if (
Variable | Value |
---|---|
Query | <class 'django.db.models.sql.query.Query'> |
__class__ | <class 'django.db.models.lookups.Exact'> |
self | Exact(Col(documents, content.Document.id), '655526') |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/lookups.py
, line 88, in get_prep_lookupself.lhs, self.rhs = new_exprs
def get_prep_lookup(self):
if not self.prepare_rhs or hasattr(self.rhs, "resolve_expression"):
return self.rhs
if hasattr(self.lhs, "output_field"):
if hasattr(self.lhs.output_field, "get_prep_value"):
return self.lhs.output_field.get_prep_value(self.rhs)…
elif self.rhs_is_direct_value():
return Value(self.rhs)
return self.rhs
def get_prep_lhs(self):
if hasattr(self.lhs, "resolve_expression"):
Variable | Value |
---|---|
self | Exact(Col(documents, content.Document.id), '655526') |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/fields/__init__.py
, line 2736, in get_prep_valuereturn name, path, args, kwargs
def get_internal_type(self):
return "UUIDField"
def get_prep_value(self, value):
value = super().get_prep_value(value)
return self.to_python(value)…
def get_db_prep_value(self, value, connection, prepared=False):
if value is None:
return None
if not isinstance(value, uuid.UUID):
value = self.to_python(value)
Variable | Value |
---|---|
__class__ | <class 'django.db.models.fields.UUIDField'> |
self | <django.db.models.fields.UUIDField: id> |
value | '655526' |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/fields/__init__.py
, line 2754, in to_pythondef to_python(self, value):
if value is not None and not isinstance(value, uuid.UUID):
input_form = "int" if isinstance(value, int) else "hex"
try:
return uuid.UUID(**{input_form: value})
except (AttributeError, ValueError):
raise exceptions.ValidationError(…
self.error_messages["invalid"],
code="invalid",
params={"value": value},
)
return value
Variable | Value |
---|---|
input_form | 'hex' |
self | <django.db.models.fields.UUIDField: id> |
value | '655526' |
/home/fastinform/env/lib/python3.10/site-packages/django/core/handlers/exception.py
, line 55, in innerreturn inner
else:
@wraps(get_response)
def inner(request):
try:
response = get_response(request)…
except Exception as exc:
response = response_for_exception(request, exc)
return response
return inner
Variable | Value |
---|---|
exc | DoesNotExist('Document matching query does not exist.') |
get_response | <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x720129457730>> |
request | <WSGIRequest: GET '/d/655526/?text=space%20station'> |
/home/fastinform/env/lib/python3.10/site-packages/django/core/handlers/base.py
, line 197, in _get_responseif response is None:
wrapped_callback = self.make_view_atomic(callback)
# If it is an asynchronous view, run it in a subthread.
if iscoroutinefunction(wrapped_callback):
wrapped_callback = async_to_sync(wrapped_callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)…
except Exception as e:
response = self.process_exception_by_middleware(e, request)
if response is None:
raise
# Complain if the view returned None (a common error).
Variable | Value |
---|---|
callback | <function View.as_view.<locals>.view at 0x7201233979a0> |
callback_args | () |
callback_kwargs | {'pk': '655526'} |
middleware_method | <function CsrfViewMiddleware.process_view at 0x7201235d7d00> |
request | <WSGIRequest: GET '/d/655526/?text=space%20station'> |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x720129457730> |
wrapped_callback | <function View.as_view.<locals>.view at 0x7201233979a0> |
/home/fastinform/env/lib/python3.10/site-packages/django/views/generic/base.py
, line 104, in viewself = cls(**initkwargs)
self.setup(request, *args, **kwargs)
if not hasattr(self, "request"):
raise AttributeError(
"%s instance has no 'request' attribute. Did you override "
"setup() and forget to call super()?" % cls.__name__
)
return self.dispatch(request, *args, **kwargs)…
view.view_class = cls
view.view_initkwargs = initkwargs
# __name__ and __qualname__ are intentionally left unchanged as
# view_class should be used to robustly determine the name of the view
Variable | Value |
---|---|
args | () |
cls | <class 'fastinform.frontend.views.DocumentView'> |
initkwargs | {} |
kwargs | {'pk': '655526'} |
request | <WSGIRequest: GET '/d/655526/?text=space%20station'> |
self | <fastinform.frontend.views.DocumentView object at 0x7201205bc7f0> |
/home/fastinform/env/lib/python3.10/site-packages/htmlmin/decorators.py
, line 26, in not_minifyreturn minify
def not_minified_response(f):
@wraps(f)
def not_minify(*args, **kwargs):
response = f(*args, **kwargs)…
response.minify_response = False
return response
return not_minify
Variable | Value |
---|---|
args | (<fastinform.frontend.views.DocumentView object at 0x7201205bc7f0>, <WSGIRequest: GET '/d/655526/?text=space%20station'>) |
f | <function DocumentView.dispatch at 0x7201234365f0> |
kwargs | {'pk': '655526'} |
/home/fastinform/app/fastinform/frontend/views.py
, line 240, in dispatchtemplate_name = "terms_of_use.html"
class DocumentView(View):
@not_minified_response
def dispatch(self, request, *args, **kwargs):
return super().dispatch(request, *args, **kwargs)…
def get(self, request, *args, **kwargs):
user_qs = self.request.GET.get("u", None)
user = self.request.user.id if self.request.user.is_authenticated else user_qs
if user_qs:
action = "sendgrid_click"
Variable | Value |
---|---|
__class__ | <class 'fastinform.frontend.views.DocumentView'> |
args | () |
kwargs | {'pk': '655526'} |
request | <WSGIRequest: GET '/d/655526/?text=space%20station'> |
self | <fastinform.frontend.views.DocumentView object at 0x7201205bc7f0> |
/home/fastinform/env/lib/python3.10/site-packages/django/views/generic/base.py
, line 143, in dispatch# 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,
Variable | Value |
---|---|
args | () |
handler | <bound method DocumentView.get of <fastinform.frontend.views.DocumentView object at 0x7201205bc7f0>> |
kwargs | {'pk': '655526'} |
request | <WSGIRequest: GET '/d/655526/?text=space%20station'> |
self | <fastinform.frontend.views.DocumentView object at 0x7201205bc7f0> |
/home/fastinform/app/fastinform/frontend/views.py
, line 252, in getif user_qs:
action = "sendgrid_click"
else:
action = "document_click"
try:
document = Document.objects.get(pk=self.kwargs["pk"])
except (Document.DoesNotExist, ValidationError):
document = Document.objects.get(original_id=str(self.kwargs["pk"]))…
text = urllib.parse.quote(self.request.GET.get("text", ""))
if document.fileo:
url = document.fileo.file.url
else:
url = document.direct_url
user_agent = self.request.META.get("HTTP_USER_AGENT")
Variable | Value |
---|---|
action | 'document_click' |
args | () |
kwargs | {'pk': '655526'} |
request | <WSGIRequest: GET '/d/655526/?text=space%20station'> |
self | <fastinform.frontend.views.DocumentView object at 0x7201205bc7f0> |
user | None |
user_qs | None |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/manager.py
, line 87, in manager_methodreturn []
@classmethod
def _get_queryset_methods(cls, queryset_class):
def create_method(name, method):
@wraps(method)
def manager_method(self, *args, **kwargs):
return getattr(self.get_queryset(), name)(*args, **kwargs)…
return manager_method
new_methods = {}
for name, method in inspect.getmembers(
queryset_class, predicate=inspect.isfunction
Variable | Value |
---|---|
args | () |
kwargs | {'original_id': '655526'} |
name | 'get' |
self | <django.db.models.manager.Manager object at 0x720123363490> |
/home/fastinform/env/lib/python3.10/site-packages/django/db/models/query.py
, line 649, in get):
limit = MAX_GET_RESULTS
clone.query.set_limits(high=limit)
num = len(clone)
if num == 1:
return clone._result_cache[0]
if not num:
raise self.model.DoesNotExist(…
"%s matching query does not exist." % self.model._meta.object_name
)
raise self.model.MultipleObjectsReturned(
"get() returned more than one %s -- it returned %s!"
% (
self.model._meta.object_name,
Variable | Value |
---|---|
args | () |
clone | <QuerySet []> |
kwargs | {'original_id': '655526'} |
limit | 21 |
num | 0 |
self | <QuerySet [<Document: Document object (8247a0cc-74b6-4997-8755-54d483ef776e)>, <Document: Document object (36ec54c8-11e7-471d-82b5-3a9782ccc060)>, <Document: Document object (228cdd47-28e7-416b-a8f7-22bd992b4602)>, <Document: Document object (1d54bcf5-1128-46a2-b904-b1d47b8e54e7)>, <Document: Document object (3100671b-7f39-490b-95a7-9088450a10b3)>, <Document: Document object (c6ea8e42-2962-45c3-9692-7762c35c2f62)>, <Document: Document object (5bd4ced7-c5b7-4f91-aaf9-efa16e5aa379)>, <Document: Document object (82216520-a885-4263-b14f-9d74218576b3)>, <Document: Document object (ee5c39ce-9788-4c85-94e0-6967ba5a6f69)>, <Document: Document object (6e6c80c8-c72d-40ad-bfee-f5fc86d81843)>, <Document: Document object (2eb8d15e-1ddc-47eb-90e2-393e8ff2b644)>, <Document: Document object (0aae7437-5bcf-4f83-863c-02d21c361a9e)>, <Document: Document object (db6688f5-739a-4f0c-ae93-0e7dcb62ddfc)>, <Document: Document object (a657cb4d-d8a2-4e01-8e8d-b9eb0199b0c6)>, <Document: Document object (44d0b1dc-b389-421a-9867-6a8a871e9a32)>, <Document: Document object (4baf68c0-2339-4bda-bb86-852f227d1bee)>, <Document: Document object (8ff138bb-e5c6-4a34-8ff6-563b1cfade0e)>, <Document: Document object (e0bc27e5-f249-49c0-afba-20e78ebe04f6)>, <Document: Document object (73d1a797-9574-44f7-ab7e-8aaf0e40fa9c)>, <Document: Document object (fa672093-bf77-433e-9665-79789d32ea34)>, '...(remaining elements truncated)...']> |
AnonymousUser
Variable | Value |
---|---|
text | 'space station' |
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
HTTP_ACCEPT | '*/*' |
HTTP_CONNECTION | 'close' |
HTTP_HOST | 'fastinform.com' |
HTTP_REMOTE_ADDR | '3.230.1.23' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_X_FORWARDED_FOR | '3.230.1.23' |
HTTP_X_REAL_IP | '3.230.1.23' |
HTTP_X_SCHEME | 'https' |
PATH_INFO | '/d/655526/' |
QUERY_STRING | 'text=space%20station' |
RAW_URI | '/d/655526/?text=space%20station' |
REMOTE_ADDR | '127.0.0.1' |
REMOTE_PORT | '34868' |
REQUEST_METHOD | 'GET' |
SCRIPT_NAME | '' |
SERVER_NAME | '127.0.0.1' |
SERVER_PORT | '8302' |
SERVER_PROTOCOL | 'HTTP/1.1' |
SERVER_SOFTWARE | 'gunicorn/21.2.0' |
gunicorn.socket | <socket.socket fd=10, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 8302), raddr=('127.0.0.1', 34868)> |
wsgi.errors | <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7201205bf460> |
wsgi.file_wrapper | <class 'gunicorn.http.wsgi.FileWrapper'> |
wsgi.input | <gunicorn.http.body.Body object at 0x7201205be6b0> |
wsgi.input_terminated | True |
wsgi.multiprocess | True |
wsgi.multithread | False |
wsgi.run_once | False |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
fastinform.core.frontend
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ACCOUNT_AUTHENTICATION_METHOD | 'email' |
ACCOUNT_EMAIL_REQUIRED | True |
ACCOUNT_UNIQUE_EMAIL | True |
ACCOUNT_USERNAME_REQUIRED | False |
ACCOUNT_USER_EMAIL_FIELD | 'email' |
ACCOUNT_USER_MODEL_USERNAME_FIELD | None |
ADMINS | [] |
AI_COLLECTIONS_DB | Redis<ConnectionPool<Connection<host=172.31.9.229,port=6379,db=1>>> |
AI_ELASTIC_DB | Redis<ConnectionPool<Connection<host=172.31.9.229,port=6379,db=4>>> |
AI_FEED_DB | Redis<ConnectionPool<Connection<host=172.31.9.229,port=6379,db=3>>> |
AI_NAME_DB | Redis<ConnectionPool<Connection<host=172.31.9.229,port=6379,db=2>>> |
AI_SEARCH_DB | Redis<ConnectionPool<Connection<host=172.31.9.229,port=6379,db=0>>> |
ALLOWED_HOSTS | ['*'] |
ANYMAIL | {'SENDGRID_API_KEY': '********************'} |
APPEND_SLASH | True |
ASSETS_DIR | '/home/fastinform/app/fastinform/assets' |
AUTHENTICATION_BACKENDS | ('fastinform.users.backend.EmailBackend',) |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'users.User' |
AWS_ACCESS_KEY_ID | '********************' |
AWS_BEDROCK_REGION | 'us-east-1' |
AWS_LOGGER_NAME | 'watchtower-logger' |
AWS_LOG_GROUP | 'fastinform' |
AWS_LOG_STREAM | 'DjangoStream' |
AWS_QUERYSTRING_EXPIRE | 300 |
AWS_S3_FILE_OVERWRITE | True |
AWS_S3_REGION_NAME | 'us-east-2' |
AWS_S3_SIGNATURE_VERSION | '********************' |
AWS_SECRET_ACCESS_KEY | '********************' |
AWS_STORAGE_BUCKET_NAME | 'fastinform' |
BACKEND_URL | None |
BASE_DIR | '/home/fastinform/app/fastinform' |
BOTO3_SESSION | Session(region_name=None) |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CACHE_TIMES | {'3mn': 7776000, '48hr': 172800} |
CELERY_ACCEPT_CONTENT | ['pickle'] |
CELERY_BROKER_URL | 'amqp://fastinform:otTNW0kvgD9Cu8GllXrEP4kHEb0F35gWOTtRTHHq@172.31.14.93:5672' |
CELERY_DB | Redis<ConnectionPool<Connection<host=172.31.11.115,port=6379,db=0>>> |
CELERY_GROUP | 'WEB' |
CELERY_IP | '172.31.14.93' |
CELERY_PASSWORD | '********************' |
CELERY_RESULT_BACKEND | None |
CELERY_RESULT_SERIALIZER | 'pickle' |
CELERY_TASK_SEND_SENT_EVENT | True |
CELERY_TASK_SERIALIZER | 'pickle' |
CELERY_USERNAME | 'fastinform' |
CELERY_WORKER_SEND_TASK_EVENTS | True |
COLLECTIONS | {'blogs & journals': '3e9095d2-4912-4c03-8b75-aa2b10d1b1b7', 'clinical trials': '17e20404-db44-4849-afe2-d37c60778ead', 'legislations': 'b79a0257-3dd3-4375-83a4-02a0b05802ad', 'litigation': '5604b0cf-b690-4dfd-85b7-561e41b34df7', 'news articles': 'a4fec1bf-f463-4d57-a1e1-22528eacb477', 'patents': 'e195a972-6e57-4e8b-b277-df570441d9ad', 'press releases': '95cb99a8-12fe-4fd7-bf4e-33a8da99ebbf', 'regulations': 'ec60889d-d9d0-4413-9608-8633ad709161', 'scientific studies': '96614883-e33e-496a-834f-9bb4a79e0621', 'securities filings': '097c0361-2d4f-4f3f-89cf-2948979d9501', 'trademarks': '588dd3b7-5ed7-48a5-a300-c88434683537'} |
CORS_ORIGIN_ALLOW_ALL | True |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_NAME | 'csrftoken' |
CSRF_COOKIE_PATH | '/' |
CSRF_COOKIE_SAMESITE | 'Lax' |
CSRF_COOKIE_SECURE | False |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | ['https://*.fastinform.com', 'http://localhost:8000'] |
CSRF_USE_SESSIONS | False |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_HEALTH_CHECKS': False, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.postgresql', 'HOST': 'fastinform.cpg9ycj8gcx6.us-east-2.rds.amazonaws.com', 'NAME': 'fastinform', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIGRATE': True, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'fastinform'}, 'frontend': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_HEALTH_CHECKS': False, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.postgresql', 'HOST': 'frontend.cpg9ycj8gcx6.us-east-2.rds.amazonaws.com', 'NAME': 'frontend', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIGRATE': True, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'fastinform'}, 'logs': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_HEALTH_CHECKS': False, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.postgresql', 'HOST': 'logs.cpg9ycj8gcx6.us-east-2.rds.amazonaws.com', 'NAME': 'logs', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIGRATE': True, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'fastinform'}} |
DATABASE_ROUTERS | ['fastinform.feeds.router.FrontendRouter', 'fastinform.gpt_logs.router.LogsRouter', 'fastinform.core.router.DefaultRouter'] |
DATA_DB | Redis<ConnectionPool<Connection<host=172.31.9.229,port=6379,db=6>>> |
DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS | None |
DATA_UPLOAD_MAX_NUMBER_FILES | 100 |
DATETIME_FORMAT | 'N j, Y, P' |
DATETIME_INPUT_FORMATS | ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M'] |
DATE_FORMAT | 'N j, Y' |
DATE_INPUT_FORMATS | ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] |
DEBUG | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
DEBUG_TOOLBAR_CONFIG | {'SHOW_TOOLBAR_CALLBACK': 'fastinfomr.mis.middleware.show_toolbar'} |
DECIMAL_SEPARATOR | '.' |
DEFAULT_AUTO_FIELD | 'django.db.models.AutoField' |
DEFAULT_CHARSET | 'utf-8' |
DEFAULT_EXCEPTION_REPORTER | 'django.views.debug.ExceptionReporter' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
DEFAULT_FILE_STORAGE | 'storages.backends.s3boto3.S3Boto3Storage' |
DEFAULT_FROM_EMAIL | 'no-reply@fastinform.com' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DEFAULT_TIME_PERC | 75.0 |
DISALLOWED_USER_AGENTS | [] |
DOCUMENTS_DIR | '/home/fastinform/app/fastinform/documents' |
ELASTICSEARCH_API | '********************' |
ELASTIC_DEFAULT_COLLECTIONS | [{'filter': {'term': {'collection_id': '17e20404-db44-4849-afe2-d37c60778ead'}}, 'weight': 1.0}, {'filter': {'term': {'collection_id': 'a4fec1bf-f463-4d57-a1e1-22528eacb477'}}, 'weight': 1.0}, {'filter': {'term': {'collection_id': '3e9095d2-4912-4c03-8b75-aa2b10d1b1b7'}}, 'weight': 1.0}, {'filter': {'term': {'collection_id': '95cb99a8-12fe-4fd7-bf4e-33a8da99ebbf'}}, 'weight': 1.0}, {'filter': {'term': {'collection_id': '5604b0cf-b690-4dfd-85b7-561e41b34df7'}}, 'weight': 1.0}, {'filter': {'term': {'collection_id': 'ec60889d-d9d0-4413-9608-8633ad709161'}}, 'weight': 1.0}, {'filter': {'term': {'collection_id': 'b79a0257-3dd3-4375-83a4-02a0b05802ad'}}, 'weight': 1.0}, {'filter': {'term': {'collection_id': 'e195a972-6e57-4e8b-b277-df570441d9ad'}}, 'weight': 1.0}, {'filter': {'term': {'collection_id': '588dd3b7-5ed7-48a5-a300-c88434683537'}}, 'weight': 1.0}, {'filter': {'term': {'collection_id': '96614883-e33e-496a-834f-9bb4a79e0621'}}, 'weight': 1.0}, {'filter': {'term': {'collection_id': '097c0361-2d4f-4f3f-89cf-2948979d9501'}}, 'weight': 1.0}] |
ELASTIC_DEFAULT_COLLECTION_SCORES | {'097c0361-2d4f-4f3f-89cf-2948979d9501': 1.0, '17e20404-db44-4849-afe2-d37c60778ead': 1.0, '3e9095d2-4912-4c03-8b75-aa2b10d1b1b7': 1.0, '5604b0cf-b690-4dfd-85b7-561e41b34df7': 1.0, '588dd3b7-5ed7-48a5-a300-c88434683537': 1.0, '95cb99a8-12fe-4fd7-bf4e-33a8da99ebbf': 1.0, '96614883-e33e-496a-834f-9bb4a79e0621': 1.0, 'a4fec1bf-f463-4d57-a1e1-22528eacb477': 1.0, 'b79a0257-3dd3-4375-83a4-02a0b05802ad': 1.0, 'e195a972-6e57-4e8b-b277-df570441d9ad': 1.0, 'ec60889d-d9d0-4413-9608-8633ad709161': 1.0} |
ELASTIC_DEFAULT_CUTOFF | 'now-7d' |
ELASTIC_DEFAULT_QUERY | 'Tesla' |
ELASTIC_DEFAULT_SIZE | 100 |
ELASTIC_QUERY_TEMPLATE | ('{\n' ' "_source": [\n' ' "id",\n' ' "timestamp",\n' ' "name",\n' ' "score",\n' ' "url",\n' ' "text",\n' ' "excerpt",\n' ' "collection_id",\n' ' "collection",\n' ' "source_id",\n' ' "source",\n' ' "timestamp_int",\n' ' "timestamp_date",\n' ' "published_timestamp",\n' ' "publisher",\n' ' "publish_date"\n' ' ],\n' ' "from": 0,\n' ' "sort": {\n' ' "_score": "desc"\n' ' },\n' ' "size": {page_size},\n' ' "query": {\n' ' "function_score": {\n' ' "query": {\n' ' "bool": {\n' ' "must": [\n' ' {must_query},\n' ' {\n' ' "range": {\n' ' "publish_date": {\n' ' "gte": "{timeframe}",\n' ' "lt": "now"\n' ' }\n' ' }\n' ' }\n' ' ],\n' ' "filter": ["{sources}"],\n' ' "should": [{should_query}],\n' ' "must_not": {must_not_query}\n' ' }\n' ' },\n' ' "functions": {collections_score},\n' ' "score_mode": "sum",\n' ' "boost_mode": "multiply"\n' ' }\n' ' },\n' ' "highlight": {\n' ' "type": "unified",\n' ' "boundary_max_scan": "200",\n' ' "number_of_fragments": 40,\n' ' "order": "score",\n' ' "fragment_size": 170,\n' ' "pre_tags": [\n' ' "<em>"\n' ' ],\n' ' "post_tags": [\n' ' "</em>"\n' ' ],\n' ' "max_analyzed_offset": 1000000,\n' ' "fields": {\n' ' "text": {}\n' ' }\n' ' }\n' '}') |
ELASTIC_STREAM_QUERY_TEMPLATE | ('{\n' ' "_source": [\n' ' "id",\n' ' "document_id",\n' ' "config",\n' ' "timestamp",\n' ' "headline",\n' ' "keyword",\n' ' "score",\n' ' "url",\n' ' "summary",\n' ' "collection_id",\n' ' "collection",\n' ' "source_id",\n' ' "source",\n' ' "timestamp_int",\n' ' "timestamp_date",\n' ' "published_timestamp",\n' ' "publisher",\n' ' "publish_date"\n' ' ],\n' ' "from": 0,\n' ' "sort": {\n' ' "publish_date": "desc"\n' ' },\n' ' "size": 100,\n' ' "query": {\n' ' "bool": {\n' ' "must": [\n' ' {\n' ' "term": {\n' ' "config.keyword": {\n' ' "value": "{CONFIG_ID}"\n' ' }\n' ' }},\n' ' ],\n' ' "filter": [],\n' ' "should": [],\n' ' "must_not": []\n' ' }\n' ' }\n' '}') |
EMAIL_BACKEND | 'anymail.backends.sendgrid.EmailBackend' |
EMAIL_HOST | 'localhost' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | '' |
EMAIL_PORT | 25 |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_LOCALTIME | False |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | False |
ENVIRONMENT | 'frontend' |
ENV_PATH | '/home/fastinform/app/fastinform/.env' |
ES_DOCUMENTS_INDEX | 'fi-documents' |
ES_DOCUMENTS_INDEX2 | 'fi-documents' |
ES_FRONTEND_SOURCES_INDEX | 'fi-frontend-sources' |
ES_HOSTNAME | 'https://172.31.7.183:9200' |
ES_PASSWORD | '********************' |
ES_SOURCES_INDEX | 'fi-sources' |
ES_STREAM_INDEX | 'fi-stream' |
ES_SYS_INDEX | 'fi-systems' |
ES_TAGS_INDEX | 'fi-tags' |
ES_USERNAME | 'elastic' |
EXCLUDE_FROM_MINIFYING | ('^newsmanager/', '^admin/') |
FAVICON_ROOT | '/home/fastinform/app/../storage/media/favicon' |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
FILE_UPLOAD_PERMISSIONS | 420 |
FILE_UPLOAD_TEMP_DIR | None |
FIRST_DAY_OF_WEEK | 0 |
FIXTURE_DIRS | [] |
FORCE_SCRIPT_NAME | None |
FORMAT_MODULE_PATH | None |
FORMS_URLFIELD_ASSUME_HTTPS | False |
FORM_RENDERER | 'django.forms.renderers.DjangoTemplates' |
FRONTEND_REDIS_IP | '172.31.9.229' |
FRONTEND_REDIS_PASSWORD | '********************' |
FRONTEND_URL | 'https://fastinform.com' |
GOOGLE_OAUTH_CLIENT_ID | None |
GOOGLE_OAUTH_CLIENT_SECRET | '********************' |
GPT_DEFAULTS | {'cache': 4, 'collection_score_retry': 0, 'collection_score_timeout': 12, 'collections_override': False, 'description': '', 'elasticsearch_query': '{\n' ' "_source": [\n' ' "id",\n' ' "timestamp",\n' ' "name",\n' ' "score",\n' ' "url",\n' ' "text",\n' ' "excerpt",\n' ' "collection_id",\n' ' "collection",\n' ' "source_id",\n' ' "source",\n' ' "timestamp_int",\n' ' "timestamp_date",\n' ' "published_timestamp",\n' ' "publisher",\n' ' "publish_date"\n' ' ],\n' ' "from": 0,\n' ' "sort": {\n' ' "_score": "desc"\n' ' },\n' ' "size": {page_size},\n' ' "query": {\n' ' "function_score": {\n' ' "query": {\n' ' "bool": {\n' ' "must": [\n' ' {must_query},\n' ' {\n' ' "range": {\n' ' "publish_date": {\n' ' "gte": "{timeframe}",\n' ' "lt": "now"\n' ' }\n' ' }\n' ' }\n' ' ],\n' ' "filter": ["{sources}"],\n' ' "should": [{should_query}],\n' ' "must_not": {must_not_query}\n' ' }\n' ' },\n' ' "functions": {collections_score},\n' ' "score_mode": "sum",\n' ' "boost_mode": "multiply"\n' ' }\n' ' },\n' ' "highlight": {\n' ' "type": "unified",\n' ' "boundary_max_scan": "200",\n' ' "number_of_fragments": 40,\n' ' "order": "score",\n' ' "fragment_size": 170,\n' ' "pre_tags": [\n' ' "<em>"\n' ' ],\n' ' "post_tags": [\n' ' "</em>"\n' ' ],\n' ' "max_analyzed_offset": 1000000,\n' ' "fields": {\n' ' "text": {}\n' ' }\n' ' }\n' '}', 'feed_name_retry': 0, 'feed_name_timeout': 12, 'filter_type': 'AND', 'grouping_retry': 3, 'grouping_timeout': 60, 'language': ISO6391Languages.EN, 'page_size': 100, 'related_words_retry': 0, 'related_words_timeout': 15, 'relevance_retry': 0, 'relevance_timeout': 12, 'search_retry': 0, 'search_timeout': 12, 'summarization_retry': 0, 'summarization_timeout': 15, 'summarization_total_documents': 36, 'summarization_total_tokens': '********************', 'synonyms_retry': 0, 'synonyms_timeout': 15, 'synthesis_retry': 0, 'synthesis_timeout': 600, 'timeframe': '', 'timeframe_minimum_documents_count': 20} |
HTML_MINIFY | True |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ['django.contrib.admin', 'fastinform.users', 'fastinform.staff', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'django.contrib.humanize', 'django.contrib.sitemaps', 'rest_framework', 'drf_yasg', 'fastinform.mis', 'import_export', 'widget_tweaks', 'anymail', 'documents.content', 'fastinform.frontend', 'fastinform.feeds', 'fastinform.assistants', 'fastinform.newsroom', 'fastinform.onboarding', 'fastinform.gpt_logs', 'fastinform.api'] |
INTERNAL_IPS | [] |
LANGUAGES | [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ar-dz', 'Algerian Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('ckb', 'Central Kurdish (Sorani)'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('ig', 'Igbo'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('ky', 'Kyrgyz'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('ms', 'Malay'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('tg', 'Tajik'), ('th', 'Thai'), ('tk', 'Turkmen'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('ug', 'Uyghur'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('uz', 'Uzbek'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] |
LANGUAGES_BIDI | ['he', 'ar', 'ar-dz', 'ckb', 'fa', 'ug', 'ur'] |
LANGUAGE_CODE | 'en' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_HTTPONLY | False |
LANGUAGE_COOKIE_NAME | 'django_language' |
LANGUAGE_COOKIE_PATH | '/' |
LANGUAGE_COOKIE_SAMESITE | None |
LANGUAGE_COOKIE_SECURE | False |
LOCALE_PATHS | [] |
LOGGING | {'disable_existing_loggers': False, 'formatters': {'aws': {'datefmt': '%Y-%m-%d %H:%M:%S', 'format': '%(asctime)s [%(levelname)-8s] %(message)s ' '[%(pathname)s:%(lineno)d]'}}, 'handlers': {'console': {'class': 'logging.StreamHandler'}, 'watchtower': {'boto3_client': <botocore.client.CloudWatchLogs object at 0x72015659fca0>, 'class': 'watchtower.CloudWatchLogHandler', 'formatter': 'aws', 'level': 'DEBUG', 'log_group': 'fastinform', 'stream_name': 'DjangoStream'}}, 'loggers': {'django': {'handlers': ['console'], 'level': 'INFO', 'propagate': False}, 'watchtower-logger': {'handlers': ['watchtower'], 'level': 'DEBUG', 'propagate': False}}, 'root': {'handlers': ['console']}, 'version': 1} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGIN_URL | 'home' |
LOGOUT_REDIRECT_URL | None |
LOGOUT_URL | 'users:signout' |
MANAGERS | [] |
MEDIA_ROOT | '/home/fastinform/app/../storage/media' |
MEDIA_URL | '/media/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | ['django.middleware.gzip.GZipMiddleware', 'htmlmin.middleware.HtmlMinifyMiddleware', 'htmlmin.middleware.MarkRequestMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'corsheaders.middleware.CorsMiddleware', 'fastinform.mis.middleware.visitor_tracker'] |
MIGRATION_MODULES | {} |
MIS_TEMPLATES | '/home/fastinform/app/fastinform/core/templates' |
MONTH_DAY_FORMAT | 'F j' |
NEWS_COLLECTION | 'a4fec1bf-f463-4d57-a1e1-22528eacb477' |
NUMBER_GROUPING | 0 |
OPENAI_API_KEYS | '********************' |
OPENAI_API_KEY_SET_1 | '********************' |
OPENAI_API_KEY_SET_2 | '********************' |
OPENAI_API_KEY_SET_3 | '********************' |
OPENAI_API_KEY_SET_4 | '********************' |
OPENAI_API_KEY_SET_5 | '********************' |
OPENAI_API_KEY_SET_6 | '********************' |
OPENAI_API_KEY_SET_7 | '********************' |
PACER_DIR | '/home/fastinform/app/fastinform/documents/pacer' |
PAGE_SIZE | 25 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT | '********************' |
PREPEND_WWW | False |
REDIS_DB | 0 |
REDIS_IP | '172.31.11.115' |
REDIS_PASSWORD | '********************' |
REST_FRAMEWORK | {'DEFAULT_AUTHENTICATION_CLASSES': ['rest_framework.authentication.SessionAuthentication', 'rest_framework.authentication.TokenAuthentication'], 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', 'DEFAULT_PERMISSION_CLASSES': ['rest_framework.permissions.IsAuthenticated', 'rest_framework.permissions.DjangoModelPermissions'], 'DEFAULT_RENDERER_CLASSES': ('rest_framework.renderers.JSONRenderer',), 'PAGE_SIZE': 25} |
ROOT_URLCONF | 'fastinform.frontend.urls' |
SEARCH_DB | Redis<ConnectionPool<Connection<host=172.31.11.115,port=6379,db=2>>> |
SECRETS | '********************' |
SECRETS_MANAGER | '********************' |
SECRET_KEY | '********************' |
SECRET_KEY_FALLBACKS | '********************' |
SECURE_CONTENT_TYPE_NOSNIFF | True |
SECURE_CROSS_ORIGIN_OPENER_POLICY | 'SECURE_CROSS_ORIGIN_OPENER_POLICY' |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
SECURE_HSTS_PRELOAD | False |
SECURE_HSTS_SECONDS | 0 |
SECURE_PROXY_SSL_HEADER | None |
SECURE_REDIRECT_EXEMPT | [] |
SECURE_REFERRER_POLICY | 'same-origin' |
SECURE_SSL_HOST | None |
SECURE_SSL_REDIRECT | False |
SENDGRID_KEY | '********************' |
SERVER_EMAIL | 'no-reply@fastinform.com' |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_AGE | 2592000 |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_HTTPONLY | True |
SESSION_COOKIE_NAME | 'sessionid' |
SESSION_COOKIE_PATH | '/' |
SESSION_COOKIE_SAMESITE | 'Lax' |
SESSION_COOKIE_SECURE | False |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
SESSION_FILE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | False |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'fastinform.core.frontend' |
SETUP_DB | Redis<ConnectionPool<Connection<host=172.31.9.229,port=6379,db=7>>> |
SHARDS_COUNT | 32 |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
SITE_ID | 1 |
STANDARD_ID | '4f54d11e-fd61-40cb-8847-08ace0a2abb4' |
STATICFILES_DIRS | ['/home/fastinform/app/fastinform/assets'] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/home/fastinform/app/../storage/static' |
STATIC_URL | '/static/' |
STORAGES | {'default': {'BACKEND': 'storages.backends.s3boto3.S3Boto3Storage'}, 'staticfiles': {'BACKEND': 'django.contrib.staticfiles.storage.StaticFilesStorage'}} |
STORAGE_DIR | '/home/fastinform/app/../storage/' |
SWAGGER_SETTINGS | {'LOGIN_URL': 'home', 'LOGOUT_URL': 'users:signout', 'SECURITY_DEFINITIONS': {'Bearer': {'in': 'header', 'name': 'Authorization', 'type': 'apiKey'}}} |
TAGS_DB | Redis<ConnectionPool<Connection<host=172.31.9.229,port=6379,db=7>>> |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/home/fastinform/app/fastinform/core/templates', '/home/fastinform/app/fastinform/templates', '/home/fastinform/app/fastinform/assets'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'fastinform.mis.middleware.append_site', 'fastinform.mis.middleware.generate_messages_js']}}] |
TEMPLATES_DIR | '/home/fastinform/app/fastinform/templates' |
TEST_MODE | False |
TEST_NON_SERIALIZED_APPS | [] |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
THOUSAND_SEPARATOR | ',' |
TIME_FORMAT | 'P' |
TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
TIME_ZONE | 'America/New_York' |
USE_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | True |
USE_TZ | True |
USE_X_FORWARDED_HOST | False |
USE_X_FORWARDED_PORT | False |
WSGI_APPLICATION | 'fastinform.core.wsgi.application' |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
YEAR_MONTH_FORMAT | 'F Y' |
You’re seeing this error because you have DEBUG = True
in your Django settings file. Change that to False
, and Django will display a standard page generated by the handler for this status code.