Django Oscar doesn't see products
See original GitHub issueI was added a new category, then I was added product type, then I was added a product. *screenshoot
I can see my new category, but there is no products at all *screenshoot
But, I can view it on my site follow link localhost:8080/catalogue/zelenaia-kraska_6/ I get this link from dashboard (product -> actions -> view on site)
How to fix this problem?
CONSOLE:
`Failed to query Solr using '*:*': Failed to connect to server at 'http://127.0.0.1:8983/solr/select/?spellcheck=true&facet.query=price_exact%3A%5B0+TO+20%5D&facet.query=price_exact%3A%5B20+TO+40%5D&facet.query=price_exact%3A%5B40+TO+60%5D&facet.query=price_exact%3A%5B60+TO+%2A%5D&rows=1&fl=%2A+score&facet=on&facet.field=rating_exact&facet.field=product_class_exact&q=%2A%3A%2A&spellcheck.collate=true&wt=json&start=0&fq=category_exact%3A%28%22%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%BE%D0%B5%22%29&fq=django_ct%3A%28catalogue.product%29&spellcheck.count=1', are you sure that URL is correct? Checking it in a browser might help: HTTPConnectionPool(host='127.0.0.1', port=8983): Max retries exceeded with url: /solr/select/?spellcheck=true&facet.query=price_exact%3A%5B0+TO+20%5D&facet.query=price_exact%3A%5B20+TO+40%5D&facet.query=price_exact%3A%5B40+TO+60%5D&facet.query=price_exact%3A%5B60+TO+%2A%5D&rows=1&fl=%2A+score&facet=on&facet.field=rating_exact&facet.field=product_class_exact&q=%2A%3A%2A&spellcheck.collate=true&wt=json&start=0&fq=category_exact%3A%28%22%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%BE%D0%B5%22%29&fq=django_ct%3A%28catalogue.product%29&spellcheck.count=1 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f4c746459e8>: Failed to establish a new connection: [Errno 111] Connection refused',))
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/connection.py", line 83, in create_connection
raise err
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 356, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.4/http/client.py", line 1090, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.4/http/client.py", line 1128, in _send_request
self.endheaders(body)
File "/usr/lib/python3.4/http/client.py", line 1086, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.4/http/client.py", line 924, in _send_output
self.send(msg)
File "/usr/lib/python3.4/http/client.py", line 859, in send
self.connect()
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py", line 166, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.HTTPConnection object at 0x7f4c746459e8>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 423, in send
timeout=timeout
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 649, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/retry.py", line 376, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=8983): Max retries exceeded with url: /solr/select/?spellcheck=true&facet.query=price_exact%3A%5B0+TO+20%5D&facet.query=price_exact%3A%5B20+TO+40%5D&facet.query=price_exact%3A%5B40+TO+60%5D&facet.query=price_exact%3A%5B60+TO+%2A%5D&rows=1&fl=%2A+score&facet=on&facet.field=rating_exact&facet.field=product_class_exact&q=%2A%3A%2A&spellcheck.collate=true&wt=json&start=0&fq=category_exact%3A%28%22%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%BE%D0%B5%22%29&fq=django_ct%3A%28catalogue.product%29&spellcheck.count=1 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f4c746459e8>: Failed to establish a new connection: [Errno 111] Connection refused',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/pysolr.py", line 366, in _send_request
timeout=self.timeout)
File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 501, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 487, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8983): Max retries exceeded with url: /solr/select/?spellcheck=true&facet.query=price_exact%3A%5B0+TO+20%5D&facet.query=price_exact%3A%5B20+TO+40%5D&facet.query=price_exact%3A%5B40+TO+60%5D&facet.query=price_exact%3A%5B60+TO+%2A%5D&rows=1&fl=%2A+score&facet=on&facet.field=rating_exact&facet.field=product_class_exact&q=%2A%3A%2A&spellcheck.collate=true&wt=json&start=0&fq=category_exact%3A%28%22%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%BE%D0%B5%22%29&fq=django_ct%3A%28catalogue.product%29&spellcheck.count=1 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f4c746459e8>: Failed to establish a new connection: [Errno 111] Connection refused',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/haystack/backends/solr_backend.py", line 134, in search
raw_results = self.conn.search(query_string, **search_kwargs)
File "/usr/local/lib/python3.4/dist-packages/pysolr.py", line 720, in search
response = self._select(params, handler=search_handler)
File "/usr/local/lib/python3.4/dist-packages/pysolr.py", line 418, in _select
return self._send_request('get', path)
File "/usr/local/lib/python3.4/dist-packages/pysolr.py", line 375, in _send_request
raise SolrError(error_message % params)
pysolr.SolrError: Failed to connect to server at 'http://127.0.0.1:8983/solr/select/?spellcheck=true&facet.query=price_exact%3A%5B0+TO+20%5D&facet.query=price_exact%3A%5B20+TO+40%5D&facet.query=price_exact%3A%5B40+TO+60%5D&facet.query=price_exact%3A%5B60+TO+%2A%5D&rows=1&fl=%2A+score&facet=on&facet.field=rating_exact&facet.field=product_class_exact&q=%2A%3A%2A&spellcheck.collate=true&wt=json&start=0&fq=category_exact%3A%28%22%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%BE%D0%B5%22%29&fq=django_ct%3A%28catalogue.product%29&spellcheck.count=1', are you sure that URL is correct? Checking it in a browser might help: HTTPConnectionPool(host='127.0.0.1', port=8983): Max retries exceeded with url: /solr/select/?spellcheck=true&facet.query=price_exact%3A%5B0+TO+20%5D&facet.query=price_exact%3A%5B20+TO+40%5D&facet.query=price_exact%3A%5B40+TO+60%5D&facet.query=price_exact%3A%5B60+TO+%2A%5D&rows=1&fl=%2A+score&facet=on&facet.field=rating_exact&facet.field=product_class_exact&q=%2A%3A%2A&spellcheck.collate=true&wt=json&start=0&fq=category_exact%3A%28%22%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%BE%D0%B5%22%29&fq=django_ct%3A%28catalogue.product%29&spellcheck.count=1 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f4c746459e8>: Failed to establish a new connection: [Errno 111] Connection refused',))
Failed to query Solr using '*:*': Failed to connect to server at 'http://127.0.0.1:8983/solr/select/?spellcheck=true&facet.query=price_exact%3A%5B0+TO+20%5D&facet.query=price_exact%3A%5B20+TO+40%5D&facet.query=price_exact%3A%5B40+TO+60%5D&facet.query=price_exact%3A%5B60+TO+%2A%5D&rows=0&fl=%2A+score&facet=on&facet.field=rating_exact&facet.field=product_class_exact&q=%2A%3A%2A&spellcheck.collate=true&wt=json&start=0&fq=category_exact%3A%28%22%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%BE%D0%B5%22%29&fq=django_ct%3A%28catalogue.product%29&spellcheck.count=1', are you sure that URL is correct? Checking it in a browser might help: HTTPConnectionPool(host='127.0.0.1', port=8983): Max retries exceeded with url: /solr/select/?spellcheck=true&facet.query=price_exact%3A%5B0+TO+20%5D&facet.query=price_exact%3A%5B20+TO+40%5D&facet.query=price_exact%3A%5B40+TO+60%5D&facet.query=price_exact%3A%5B60+TO+%2A%5D&rows=0&fl=%2A+score&facet=on&facet.field=rating_exact&facet.field=product_class_exact&q=%2A%3A%2A&spellcheck.collate=true&wt=json&start=0&fq=category_exact%3A%28%22%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%BE%D0%B5%22%29&fq=django_ct%3A%28catalogue.product%29&spellcheck.count=1 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f4c745e16d8>: Failed to establish a new connection: [Errno 111] Connection refused',))
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/connection.py", line 83, in create_connection
raise err
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 356, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.4/http/client.py", line 1090, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.4/http/client.py", line 1128, in _send_request
self.endheaders(body)
File "/usr/lib/python3.4/http/client.py", line 1086, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.4/http/client.py", line 924, in _send_output
self.send(msg)
File "/usr/lib/python3.4/http/client.py", line 859, in send
self.connect()
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py", line 166, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.HTTPConnection object at 0x7f4c745e16d8>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 423, in send
timeout=timeout
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 649, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/retry.py", line 376, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=8983): Max retries exceeded with url: /solr/select/?spellcheck=true&facet.query=price_exact%3A%5B0+TO+20%5D&facet.query=price_exact%3A%5B20+TO+40%5D&facet.query=price_exact%3A%5B40+TO+60%5D&facet.query=price_exact%3A%5B60+TO+%2A%5D&rows=0&fl=%2A+score&facet=on&facet.field=rating_exact&facet.field=product_class_exact&q=%2A%3A%2A&spellcheck.collate=true&wt=json&start=0&fq=category_exact%3A%28%22%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%BE%D0%B5%22%29&fq=django_ct%3A%28catalogue.product%29&spellcheck.count=1 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f4c745e16d8>: Failed to establish a new connection: [Errno 111] Connection refused',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/pysolr.py", line 366, in _send_request
timeout=self.timeout)
File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 501, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 487, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8983): Max retries exceeded with url: /solr/select/?spellcheck=true&facet.query=price_exact%3A%5B0+TO+20%5D&facet.query=price_exact%3A%5B20+TO+40%5D&facet.query=price_exact%3A%5B40+TO+60%5D&facet.query=price_exact%3A%5B60+TO+%2A%5D&rows=0&fl=%2A+score&facet=on&facet.field=rating_exact&facet.field=product_class_exact&q=%2A%3A%2A&spellcheck.collate=true&wt=json&start=0&fq=category_exact%3A%28%22%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%BE%D0%B5%22%29&fq=django_ct%3A%28catalogue.product%29&spellcheck.count=1 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f4c745e16d8>: Failed to establish a new connection: [Errno 111] Connection refused',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/haystack/backends/solr_backend.py", line 134, in search
raw_results = self.conn.search(query_string, **search_kwargs)
File "/usr/local/lib/python3.4/dist-packages/pysolr.py", line 720, in search
response = self._select(params, handler=search_handler)
File "/usr/local/lib/python3.4/dist-packages/pysolr.py", line 418, in _select
return self._send_request('get', path)
File "/usr/local/lib/python3.4/dist-packages/pysolr.py", line 375, in _send_request
raise SolrError(error_message % params)
pysolr.SolrError: Failed to connect to server at 'http://127.0.0.1:8983/solr/select/?spellcheck=true&facet.query=price_exact%3A%5B0+TO+20%5D&facet.query=price_exact%3A%5B20+TO+40%5D&facet.query=price_exact%3A%5B40+TO+60%5D&facet.query=price_exact%3A%5B60+TO+%2A%5D&rows=0&fl=%2A+score&facet=on&facet.field=rating_exact&facet.field=product_class_exact&q=%2A%3A%2A&spellcheck.collate=true&wt=json&start=0&fq=category_exact%3A%28%22%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%BE%D0%B5%22%29&fq=django_ct%3A%28catalogue.product%29&spellcheck.count=1', are you sure that URL is correct? Checking it in a browser might help: HTTPConnectionPool(host='127.0.0.1', port=8983): Max retries exceeded with url: /solr/select/?spellcheck=true&facet.query=price_exact%3A%5B0+TO+20%5D&facet.query=price_exact%3A%5B20+TO+40%5D&facet.query=price_exact%3A%5B40+TO+60%5D&facet.query=price_exact%3A%5B60+TO+%2A%5D&rows=0&fl=%2A+score&facet=on&facet.field=rating_exact&facet.field=product_class_exact&q=%2A%3A%2A&spellcheck.collate=true&wt=json&start=0&fq=category_exact%3A%28%22%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%BE%D0%B5%22%29&fq=django_ct%3A%28catalogue.product%29&spellcheck.count=1 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f4c745e16d8>: Failed to establish a new connection: [Errno 111] Connection refused',))
/usr/lib/python3.4/importlib/_bootstrap.py:321: RemovedInDjango110Warning: django.core.context_processors is deprecated in favor of django.template.context_processors.
return f(*args, **kwds)
[11/Mar/2017 20:34:38] "GET /catalogue/category/glavnoe_2/ HTTP/1.1" 200 25858
Not Found: /media/cache/17/d5/17d59725435216b0e455fcb9659a84f3.jpg
Internal Server Error: /media/cache/17/d5/17d59725435216b0e455fcb9659a84f3.jpg
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/django/contrib/sites/models.py", line 44, in _get_site_by_request
SITE_CACHE[host] = self.get(domain__iexact=host)
File "/usr/local/lib/python3.4/dist-packages/django/db/models/manager.py", line 122, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/django/db/models/query.py", line 387, in get
self.model._meta.object_name
django.contrib.sites.models.DoesNotExist: Site matching query does not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py", line 235, in get_response
response = middleware_method(request, response)
File "/usr/local/lib/python3.4/dist-packages/django/contrib/flatpages/middleware.py", line 11, in process_response
return flatpage(request, request.path_info)
File "/usr/local/lib/python3.4/dist-packages/django/contrib/flatpages/views.py", line 35, in flatpage
site_id = get_current_site(request).id
File "/usr/local/lib/python3.4/dist-packages/django/contrib/sites/shortcuts.py", line 15, in get_current_site
return Site.objects.get_current(request)
File "/usr/local/lib/python3.4/dist-packages/django/contrib/sites/models.py", line 67, in get_current
return self._get_site_by_request(request)
File "/usr/local/lib/python3.4/dist-packages/django/contrib/sites/models.py", line 52, in _get_site_by_request
SITE_CACHE[domain] = self.get(domain__iexact=domain)
File "/usr/local/lib/python3.4/dist-packages/django/db/models/manager.py", line 122, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/django/db/models/query.py", line 387, in get
self.model._meta.object_name
django.contrib.sites.models.DoesNotExist: Site matching query does not exist.
[11/Mar/2017 20:34:39] "GET /media/cache/17/d5/17d59725435216b0e455fcb9659a84f3.jpg HTTP/1.1" 500 128371
[11/Mar/2017 20:34:39] "GET /static/oscar/favicon.ico HTTP/1.1" 200 1150`
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Django Oscar doesn't see products - Stack Overflow
Make sure django.contrib.sites is in your INSTALLED_APPS list. Also make sure the SITE_ID settings is populated with an id. SITE_ID = 1.
Read more >Multilingual catalogue and content - Google Groups
By default, Oscar doesn't support multilingual products/pages etc but it isn't that difficult to add support. Multilingual content is tricky in that you...
Read more >How to customise models — django-oscar 3.0 documentation
The first step is to create a local version of the “catalogue” app. At a minimum, this involves creating catalogue/models.py within your project...
Read more >django-oscar Documentation - Read the Docs
Django's migration framework will detect them automatically and ... Oscar does not determine or store user currency and uses it only for ...
Read more >Django Oscar E-commerce Tutorial - Loading of Images (Part ...
Your browser can't play this video. ... Watch my some recent tutorials here: Django Oscar E-commerce Tutorial - Add views and URLs to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Does it work with
HAYSTACK_CONNECTIONS = { 'default': { 'ENGINE': 'haystack.backends.simple_backend.SimpleEngine', }, }
?Yes it just worked for me. i changed my settings to
HAYSTACK_CONNECTIONS = { ‘default’: { ‘ENGINE’: ‘haystack.backends.simple_backend.SimpleEngine’, ‘URL’: ‘http://127.0.0.1:8000/solr/default’, ‘INCLUDE_SPELLING’: True, }, }
and the products just showed up