Field 'id' expected a number but got <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>>.
Request Method: | GET |
---|---|
Request URL: | http://www.officexpress.com.tr/wishlist |
Django Version: | 4.2.1 |
Exception Type: | TypeError |
Exception Value: | Field 'id' expected a number but got <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>>. |
Exception Location: | /www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/db/models/fields/__init__.py, line 2057, in get_prep_value |
Raised during: | wishlist.views.WishlistView |
Python Executable: | /www/wwwroot/ofx/venv/bin/python3 |
Python Version: | 3.8.10 |
Python Path: | ['/www/wwwroot/ofx', '/www/wwwroot/ofx/venv/bin', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/www/wwwroot/ofx/venv/lib/python3.8/site-packages'] |
Server time: | Tue, 19 Mar 2024 07:10:07 +0000 |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/db/models/fields/__init__.py
, line 2055, in get_prep_value
return validators_
def get_prep_value(self, value):
value = super().get_prep_value(value)
if value is None:
return None
try:
return int(value)…
except (TypeError, ValueError) as e:
raise e.__class__(
"Field '%s' expected a number but got %r." % (self.name, value),
) from e
def get_db_prep_value(self, value, connection, prepared=False):
Variable | Value |
---|---|
__class__ | <class 'django.db.models.fields.IntegerField'> |
self | <django.db.models.fields.BigAutoField: id> |
value | <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>> |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/core/handlers/exception.py
, line 42, in inner
can rely on getting a response instead of an exception.
"""
if iscoroutinefunction(get_response):
@wraps(get_response)
async def inner(request):
try:
response = await get_response(request)…
except Exception as exc:
response = await sync_to_async(
response_for_exception, thread_sensitive=False
)(request, exc)
return response
Variable | Value |
---|---|
exc | TypeError("Field 'id' expected a number but got <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>>.") |
get_response | <bound method BaseHandler._get_response_async of <django.core.handlers.asgi.ASGIHandler object at 0x7fc215835460>> |
request | <ASGIRequest: GET '/wishlist'> |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/core/handlers/base.py
, line 253, in _get_response_async
wrapped_callback = self.make_view_atomic(callback)
# If it is a synchronous view, run it in a subthread
if not iscoroutinefunction(wrapped_callback):
wrapped_callback = sync_to_async(
wrapped_callback, thread_sensitive=True
)
try:
response = await wrapped_callback(…
request, *callback_args, **callback_kwargs
)
except Exception as e:
response = await sync_to_async(
self.process_exception_by_middleware,
thread_sensitive=True,
Variable | Value |
---|---|
callback | <function View.as_view.<locals>.view at 0x7fc1ed7a8ee0> |
callback_args | () |
callback_kwargs | {} |
middleware_method | <asgiref.sync.SyncToAsync object at 0x7fc213285850> |
request | <ASGIRequest: GET '/wishlist'> |
response | None |
self | <django.core.handlers.asgi.ASGIHandler object at 0x7fc215835460> |
wrapped_callback | <asgiref.sync.SyncToAsync object at 0x7fc1e7ff78b0> |
/usr/lib/python3.8/concurrent/futures/thread.py
, line 57, in run
self.kwargs = kwargs
def run(self):
if not self.future.set_running_or_notify_cancel():
return
try:
result = self.fn(*self.args, **self.kwargs)…
except BaseException as exc:
self.future.set_exception(exc)
# Break a reference cycle with the exception 'exc'
self = None
else:
self.future.set_result(result)
Variable | Value |
---|---|
self | None |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/views/generic/base.py
, line 104, in view
self = 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 'wishlist.views.WishlistView'> |
initkwargs | {} |
kwargs | {} |
request | <ASGIRequest: GET '/wishlist'> |
self | <wishlist.views.WishlistView object at 0x7fc1ecabd070> |
/www/wwwroot/ofx/venv/lib/python3.8/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 TemplateView.get of <wishlist.views.WishlistView object at 0x7fc1ecabd070>> |
kwargs | {} |
request | <ASGIRequest: GET '/wishlist'> |
self | <wishlist.views.WishlistView object at 0x7fc1ecabd070> |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/views/generic/base.py
, line 226, in get
class TemplateView(TemplateResponseMixin, ContextMixin, View):
"""
Render a template. Pass keyword arguments from the URLconf to the context.
"""
def get(self, request, *args, **kwargs):
context = self.get_context_data(**kwargs)…
return self.render_to_response(context)
class RedirectView(View):
"""Provide a redirect on any GET request."""
Variable | Value |
---|---|
args | () |
kwargs | {} |
request | <ASGIRequest: GET '/wishlist'> |
self | <wishlist.views.WishlistView object at 0x7fc1ecabd070> |
/www/wwwroot/ofx/wishlist/views.py
, line 26, in get_context_data
user = self.request.user
website = Website.objects.get(domain=str(self.request.META['HTTP_HOST']).replace('www.',''))
context['website'] = website
categories = ALL_CATEGORIES.get(website)
context['root_categories'] = categories.get('root_categories')
context['categories_2th'] = categories.get('categories_2th')
context['categories_3th'] = categories.get('categories_3th')
wishlist_items = WishlistItem.objects.filter(user=user, website=website)…
context['wishlist_items'] = wishlist_items
return context
@login_required(login_url="hesabim")
def wishlist_add_or_remove(request):
Variable | Value |
---|---|
__class__ | <class 'wishlist.views.WishlistView'> |
args | () |
categories | {'categories_2th': {<Product_Category: Gıda ve Mutfak>: [<Product_Category: Gıda ve Mutfak -> İçecekler>, <Product_Category: Gıda ve Mutfak -> Çaylar>, <Product_Category: Gıda ve Mutfak -> Kahveler>, <Product_Category: Gıda ve Mutfak -> Şeker ve Tatlandırıcılar>, <Product_Category: Gıda ve Mutfak -> Yiyecek ve Atıştırmalıklar>, <Product_Category: Gıda ve Mutfak -> Kullan At Malzemeler>, <Product_Category: Gıda ve Mutfak -> Mutfak Gereçleri>, <Product_Category: Gıda ve Mutfak -> Elektrikli Mutfak Aletleri>], <Product_Category: Ofis - Kırtasiye>: [<Product_Category: Ofis - Kırtasiye -> Gönderi ve Paketleme>, <Product_Category: Ofis - Kırtasiye -> Sunum ve Planlama>, <Product_Category: Ofis - Kırtasiye -> Kalemler>, <Product_Category: Ofis - Kırtasiye -> Okul Ürünleri>, <Product_Category: Ofis - Kırtasiye -> Dosyalama ve Arşivleme>, <Product_Category: Ofis - Kırtasiye -> Masa Üstü Gereçler>, <Product_Category: Ofis - Kırtasiye -> Genel Ofis Ürünleri>], <Product_Category: Kağıt Ürünleri>: [<Product_Category: Kağıt Ürünleri -> Fotokopi ve Baskı>, <Product_Category: Kağıt Ürünleri -> Defter & Ajandalar>, <Product_Category: Kağıt Ürünleri -> Zarflar>, <Product_Category: Kağıt Ürünleri -> Etiketler ve Etiket Makineleri>, <Product_Category: Kağıt Ürünleri -> Teknik ve Özel Kağıtlar>], <Product_Category: Temizlik Ürünleri>: [<Product_Category: Temizlik Ürünleri -> Ofis Hijyen Ürünleri>, <Product_Category: Temizlik Ürünleri -> Ofis Temizlik Ürünleri>, <Product_Category: Temizlik Ürünleri -> Tuvalet Banyo Temizliği>, <Product_Category: Temizlik Ürünleri -> Mutfak Temizliği>, <Product_Category: Temizlik Ürünleri -> Dispenserler>, <Product_Category: Temizlik Ürünleri -> Kişisel Temizlik Ürünleri>], <Product_Category: Reklam Ürünleri>: [<Product_Category: Reklam Ürünleri -> Çerçeveler>, <Product_Category: Reklam Ürünleri -> Kaldırım Panoları>, <Product_Category: Reklam Ürünleri -> Broşürlük ve Föylük>], <Product_Category: Ofis Teknolojileri>: [<Product_Category: Ofis Teknolojileri -> Ofis Cihazları>, <Product_Category: Ofis Teknolojileri -> Veri Depolama>, <Product_Category: Ofis Teknolojileri -> Aksesuarlar>, <Product_Category: Ofis Teknolojileri -> Modem & Switch>, <Product_Category: Ofis Teknolojileri -> Monitörler>, <Product_Category: Ofis Teknolojileri -> Ciltleme… <trimmed 43835 bytes string> |
context | {'categories_2th': {<Product_Category: Gıda ve Mutfak>: [<Product_Category: Gıda ve Mutfak -> İçecekler>, <Product_Category: Gıda ve Mutfak -> Çaylar>, <Product_Category: Gıda ve Mutfak -> Kahveler>, <Product_Category: Gıda ve Mutfak -> Şeker ve Tatlandırıcılar>, <Product_Category: Gıda ve Mutfak -> Yiyecek ve Atıştırmalıklar>, <Product_Category: Gıda ve Mutfak -> Kullan At Malzemeler>, <Product_Category: Gıda ve Mutfak -> Mutfak Gereçleri>, <Product_Category: Gıda ve Mutfak -> Elektrikli Mutfak Aletleri>], <Product_Category: Ofis - Kırtasiye>: [<Product_Category: Ofis - Kırtasiye -> Gönderi ve Paketleme>, <Product_Category: Ofis - Kırtasiye -> Sunum ve Planlama>, <Product_Category: Ofis - Kırtasiye -> Kalemler>, <Product_Category: Ofis - Kırtasiye -> Okul Ürünleri>, <Product_Category: Ofis - Kırtasiye -> Dosyalama ve Arşivleme>, <Product_Category: Ofis - Kırtasiye -> Masa Üstü Gereçler>, <Product_Category: Ofis - Kırtasiye -> Genel Ofis Ürünleri>], <Product_Category: Kağıt Ürünleri>: [<Product_Category: Kağıt Ürünleri -> Fotokopi ve Baskı>, <Product_Category: Kağıt Ürünleri -> Defter & Ajandalar>, <Product_Category: Kağıt Ürünleri -> Zarflar>, <Product_Category: Kağıt Ürünleri -> Etiketler ve Etiket Makineleri>, <Product_Category: Kağıt Ürünleri -> Teknik ve Özel Kağıtlar>], <Product_Category: Temizlik Ürünleri>: [<Product_Category: Temizlik Ürünleri -> Ofis Hijyen Ürünleri>, <Product_Category: Temizlik Ürünleri -> Ofis Temizlik Ürünleri>, <Product_Category: Temizlik Ürünleri -> Tuvalet Banyo Temizliği>, <Product_Category: Temizlik Ürünleri -> Mutfak Temizliği>, <Product_Category: Temizlik Ürünleri -> Dispenserler>, <Product_Category: Temizlik Ürünleri -> Kişisel Temizlik Ürünleri>], <Product_Category: Reklam Ürünleri>: [<Product_Category: Reklam Ürünleri -> Çerçeveler>, <Product_Category: Reklam Ürünleri -> Kaldırım Panoları>, <Product_Category: Reklam Ürünleri -> Broşürlük ve Föylük>], <Product_Category: Ofis Teknolojileri>: [<Product_Category: Ofis Teknolojileri -> Ofis Cihazları>, <Product_Category: Ofis Teknolojileri -> Veri Depolama>, <Product_Category: Ofis Teknolojileri -> Aksesuarlar>, <Product_Category: Ofis Teknolojileri -> Modem & Switch>, <Product_Category: Ofis Teknolojileri -> Monitörler>, <Product_Category: Ofis Teknolojileri -> Ciltleme… <trimmed 43937 bytes string> |
kwargs | {} |
self | <wishlist.views.WishlistView object at 0x7fc1ecabd070> |
user | <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>> |
website | <Website: OfficeXpress> |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/db/models/manager.py
, line 87, in manager_method
return []
@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 | {'user': <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>>, 'website': <Website: OfficeXpress>} |
name | 'filter' |
self | <django.db.models.manager.Manager object at 0x7fc21296a280> |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/db/models/query.py
, line 1436, in filter
def 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 | {'user': <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>>, 'website': <Website: OfficeXpress>} |
self | <QuerySet [<WishlistItem: Esselte 3045 Dar Klasör Siyah - OfficeXpress>, <WishlistItem: OfficeXpress Eco Plastik Klasör Dar Mavi - OfficeXpress>, <WishlistItem: OfficeXpress Eco Plastik Klasör Geniş Mavi - OfficeXpress>, <WishlistItem: Noki Geniş Klasör Pembe - OfficeXpress>, <WishlistItem: Noki Dar Klasör Pembe - OfficeXpress>, <WishlistItem: Edding 751 Boya Markörü - OfficeXpress>, <WishlistItem: 10880 Dahle Maket Bıçağı Metal Gövde(9Mm) - OfficeXpress>]> |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/db/models/query.py
, line 1454, in _filter_or_exclude
if (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 [<WishlistItem: Esselte 3045 Dar Klasör Siyah - OfficeXpress>, <WishlistItem: OfficeXpress Eco Plastik Klasör Dar Mavi - OfficeXpress>, <WishlistItem: OfficeXpress Eco Plastik Klasör Geniş Mavi - OfficeXpress>, <WishlistItem: Noki Geniş Klasör Pembe - OfficeXpress>, <WishlistItem: Noki Dar Klasör Pembe - OfficeXpress>, <WishlistItem: Edding 751 Boya Markörü - OfficeXpress>, <WishlistItem: 10880 Dahle Maket Bıçağı Metal Gövde(9Mm) - OfficeXpress>]> |
kwargs | {'user': <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>>, 'website': <Website: OfficeXpress>} |
negate | False |
self | <QuerySet [<WishlistItem: Esselte 3045 Dar Klasör Siyah - OfficeXpress>, <WishlistItem: OfficeXpress Eco Plastik Klasör Dar Mavi - OfficeXpress>, <WishlistItem: OfficeXpress Eco Plastik Klasör Geniş Mavi - OfficeXpress>, <WishlistItem: Noki Geniş Klasör Pembe - OfficeXpress>, <WishlistItem: Noki Dar Klasör Pembe - OfficeXpress>, <WishlistItem: Edding 751 Boya Markörü - OfficeXpress>, <WishlistItem: 10880 Dahle Maket Bıçağı Metal Gövde(9Mm) - OfficeXpress>]> |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/db/models/query.py
, line 1461, in _filter_or_exclude_inplace
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:
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 | {'user': <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>>, 'website': <Website: OfficeXpress>} |
negate | False |
self | <QuerySet [<WishlistItem: Esselte 3045 Dar Klasör Siyah - OfficeXpress>, <WishlistItem: OfficeXpress Eco Plastik Klasör Dar Mavi - OfficeXpress>, <WishlistItem: OfficeXpress Eco Plastik Klasör Geniş Mavi - OfficeXpress>, <WishlistItem: Noki Geniş Klasör Pembe - OfficeXpress>, <WishlistItem: Noki Dar Klasör Pembe - OfficeXpress>, <WishlistItem: Edding 751 Boya Markörü - OfficeXpress>, <WishlistItem: 10880 Dahle Maket Bıçağı Metal Gövde(9Mm) - OfficeXpress>]> |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/db/models/sql/query.py
, line 1502, 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: ('user', <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>>), ('website', <Website: OfficeXpress>))> |
self | <django.db.models.sql.query.Query object at 0x7fc1eca767c0> |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/db/models/sql/query.py
, line 1533, in _add_q
current_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 | ('user', <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>>) |
connector | 'AND' |
current_negated | False |
joinpromoter | JoinPromoter(connector='AND', num_children=2, negated=False) |
q_object | <Q: (AND: ('user', <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>>), ('website', <Website: OfficeXpress>))> |
self | <django.db.models.sql.query.Query object at 0x7fc1eca767c0> |
split_subq | True |
summarize | False |
target_clause | <WhereNode: (AND: )> |
used_aliases | {'wishlist_wishlistitem'} |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/db/models/sql/query.py
, line 1448, in build_filter
else:
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 | 'wishlist_wishlistitem' |
allow_joins | True |
allow_many | True |
arg | 'user' |
branch_negated | False |
can_reuse | {'wishlist_wishlistitem'} |
check_filterable | True |
col | Col(wishlist_wishlistitem, wishlist.WishlistItem.user) |
current_negated | False |
filter_expr | ('user', <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>>) |
join_info | JoinInfo(final_field=<django.db.models.fields.related.ForeignKey: user>, targets=(<django.db.models.fields.BigAutoField: id>,), opts=<Options for User>, joins=['wishlist_wishlistitem', 'user_user'], path=[PathInfo(from_opts=<Options for WishlistItem>, to_opts=<Options for User>, target_fields=(<django.db.models.fields.BigAutoField: id>,), join_field=<django.db.models.fields.related.ForeignKey: user>, m2m=False, direct=True, filtered_relation=None)], transform_function=<function Query.setup_joins.<locals>.final_transformer at 0x7fc1e7d2e310>) |
join_list | ['wishlist_wishlistitem'] |
lookups | [] |
opts | <Options for WishlistItem> |
parts | ['user'] |
pre_joins | {} |
reffed_expression | False |
reuse_with_filtered_relation | False |
self | <django.db.models.sql.query.Query object at 0x7fc1eca767c0> |
split_subq | True |
summarize | False |
targets | (<django.db.models.fields.related.ForeignKey: user>,) |
used_joins | {'user_user', 'wishlist_wishlistitem'} |
value | <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>> |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/db/models/sql/query.py
, line 1275, 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(wishlist_wishlistitem, wishlist.WishlistItem.user) |
lookup_class | <class 'django.db.models.fields.related_lookups.RelatedExact'> |
lookup_name | 'exact' |
lookups | [] |
rhs | <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>> |
self | <django.db.models.sql.query.Query object at 0x7fc1eca767c0> |
transforms | [] |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/db/models/lookups.py
, line 27, 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(wishlist_wishlistitem, wishlist.WishlistItem.user) |
rhs | <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>> |
self | RelatedExact(Col(wishlist_wishlistitem, wishlist.WishlistItem.user), <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>>) |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/db/models/fields/related_lookups.py
, line 166, in get_prep_lookup
# ForeignKey to IntegerField given value 'abc'. The ForeignKey itself
# doesn't have validation for non-integers, so we must run validation
# using the target field.
if self.prepare_rhs and hasattr(self.lhs.output_field, "path_infos"):
# Get the target field. We can safely assume there is only one
# as we don't get to the direct value branch otherwise.
target_field = self.lhs.output_field.path_infos[-1].target_fields[-1]
self.rhs = target_field.get_prep_value(self.rhs)…
return super().get_prep_lookup()
def as_sql(self, compiler, connection):
if isinstance(self.lhs, MultiColSource):
assert self.rhs_is_direct_value()
Variable | Value |
---|---|
__class__ | <class 'django.db.models.fields.related_lookups.RelatedLookupMixin'> |
self | RelatedExact(Col(wishlist_wishlistitem, wishlist.WishlistItem.user), <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>>) |
target_field | <django.db.models.fields.BigAutoField: id> |
/www/wwwroot/ofx/venv/lib/python3.8/site-packages/django/db/models/fields/__init__.py
, line 2057, in get_prep_value
def get_prep_value(self, value):
value = super().get_prep_value(value)
if value is None:
return None
try:
return int(value)
except (TypeError, ValueError) as e:
raise e.__class__(…
"Field '%s' expected a number but got %r." % (self.name, value),
) from e
def get_db_prep_value(self, value, connection, prepared=False):
value = super().get_db_prep_value(value, connection, prepared)
return connection.ops.adapt_integerfield_value(value, self.get_internal_type())
Variable | Value |
---|---|
__class__ | <class 'django.db.models.fields.IntegerField'> |
self | <django.db.models.fields.BigAutoField: id> |
value | <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fc1e7a27760>> |
AnonymousUser
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
HTTP_ACCEPT | '*/*' |
HTTP_ACCEPT_ENCODING | 'gzip, br' |
HTTP_CDN_LOOP | 'cloudflare' |
HTTP_CF_CONNECTING_IP | '34.228.7.237' |
HTTP_CF_IPCOUNTRY | 'US' |
HTTP_CF_RAY | '866ba40a3a423919-IAD' |
HTTP_CF_VISITOR | '{"scheme":"https"}' |
HTTP_CONNECTION | 'close' |
HTTP_HOST | 'www.officexpress.com.tr' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_X_FORWARDED_FOR | '34.228.7.237, 172.70.38.209' |
HTTP_X_FORWARDED_PROTO | 'https' |
PATH_INFO | '/wishlist' |
QUERY_STRING | '' |
REQUEST_METHOD | 'GET' |
SCRIPT_NAME | '' |
SERVER_NAME | 'unknown' |
SERVER_PORT | '0' |
wsgi.multiprocess | True |
wsgi.multithread | True |
officexpress.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | ['*'] |
APPEND_SLASH | True |
ASGI_APPLICATION | 'officexpress.asgi.application' |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'user.User' |
BASE_DIR | PosixPath('/www/wwwroot/ofx') |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CART_SESSION_ID | 'cart' |
CHANNEL_LAYERS | {'default': {'BACKEND': 'channels.layers.InMemoryChannelLayer'}} |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_MASKED | 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://officexpress.com.tr', 'https://www.officexpress.com.tr', 'https://eddingsatis.com', 'https://www.eddingsatis.com', 'https://fabersatis.com', 'https://www.fabersatis.com', 'https://kirtasiyepazari.com', 'https://www.kirtasiyepazari.com', 'https://b2b.kuzeykirtasiye.com', 'https://www.b2b.kuzeykirtasiye.com', 'https://localhost', 'https://193.164.6.42', 'https://0.0.0.0: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_psycopg2', 'HOST': 'localhost', 'NAME': 'kuzey', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '5432', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIGRATE': True, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'postgres'}} |
DATABASE_ROUTERS | [] |
DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS | 10240 |
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 |
DECIMAL_SEPARATOR | '.' |
DEFAULT_AUTO_FIELD | 'django.db.models.BigAutoField' |
DEFAULT_CHARSET | 'utf-8' |
DEFAULT_EXCEPTION_REPORTER | 'django.views.debug.ExceptionReporter' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_FILE_PATH | PosixPath('/www/wwwroot/ofx/sent_emails') |
EMAIL_HOST | 'mail.kuzeykirtasiye.com' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | '[email protected]' |
EMAIL_PORT | 465 |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_LOCALTIME | False |
EMAIL_USE_SSL | True |
EMAIL_USE_TLS | False |
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 |
FORM_RENDERER | 'django.forms.renderers.DjangoTemplates' |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ['jazzmin', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'constants', 'main', 'user', 'cart', 'wishlist', 'checkout', 'order', 'product', 'panel', 'integration', 'sockets', 'colorfield'] |
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'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('uz', 'Uzbek'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] |
LANGUAGES_BIDI | ['he', 'ar', 'ar-dz', 'ckb', 'fa', 'ur'] |
LANGUAGE_CODE | 'tr' |
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 | {} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/' |
LOGIN_URL | 'my-account' |
LOGOUT_REDIRECT_URL | '/' |
MANAGERS | [] |
MEDIA_ROOT | '' |
MEDIA_URL | '/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT | '********************' |
PREPEND_WWW | False |
ROOT_URLCONF | 'officexpress.urls' |
SECRET_KEY | '********************' |
SECRET_KEY_FALLBACKS | '********************' |
SECURE_CONTENT_TYPE_NOSNIFF | True |
SECURE_CROSS_ORIGIN_OPENER_POLICY | 'same-origin' |
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 |
SERVER_EMAIL | 'root@localhost' |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_AGE | 1209600 |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_HTTPONLY | True |
SESSION_COOKIE_NAME | 'sessionid' |
SESSION_COOKIE_PATH | '/' |
SESSION_COOKIE_SAMESITE | 'Lax' |
SESSION_COOKIE_SECURE | False |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
SESSION_FILE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | False |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'officexpress.settings' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
STATICFILES_DIRS | [] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/www/wwwroot/ofx/static' |
STATIC_URL | '/static/' |
STORAGES | {'default': {'BACKEND': 'django.core.files.storage.FileSystemStorage'}, 'staticfiles': {'BACKEND': 'django.contrib.staticfiles.storage.StaticFilesStorage'}} |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/www/wwwroot/ofx/templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'cart.context_processor.cart_total_amount']}}] |
TEST_NON_SERIALIZED_APPS | [] |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
THOUSAND_SEPARATOR | ',' |
TIME_FORMAT | 'P' |
TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
TIME_ZONE | 'UTC' |
USE_DEPRECATED_PYTZ | False |
USE_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | True |
USE_X_FORWARDED_HOST | False |
USE_X_FORWARDED_PORT | False |
WEBSITE_NAME | 'OfficeXpress' |
WSGI_APPLICATION | 'officexpress.wsgi.application' |
X_FRAME_OPTIONS | 'DENY' |
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.