Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Drop unused django-selectable

Patryk Zawadzki1e4a3bd9db01
diff --git a/requirements.in b/requirements.in
index 8dd706f306..f8949f1462 100644
--- a/requirements.in
+++ b/requirements.in
@@ -16,7 +16,6 @@ django-prices>=0.4.11,<0.5a0
django-prices-openexchangerates>=0.1.12,<0.2a0
django-redis>=4.0.0
djangorestframework>=3.1
-django-selectable>=0.8.0
django-storages>=1.4.1
django-versatileimagefield>=1.0.1
django-webpack-loader>=0.3.0
diff --git a/requirements.txt b/requirements.txt
index db16afbcf0..63449e8697 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -29,7 +29,6 @@ django-payments==0.10.0
django-prices-openexchangerates==0.1.12
django-prices==0.4.13
django-redis==4.7.0
-django-selectable==0.9.0
django-storages==1.5.2
django-versatileimagefield==1.6.2
django-webpack-loader==0.4.1
diff --git a/saleor/product/lookups.py b/saleor/product/lookups.py
deleted file mode 100644
index fbc8c79be3..0000000000
--- a/saleor/product/lookups.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from __future__ import unicode_literals
-
-from selectable.base import LookupBase
-from selectable.registry import registry
-from django.db.models import Count
-
-from .models import Product
-
-
-class CollectionLookup(LookupBase):
- def get_query(self, request, term):
- products = Product.objects.filter(collection__isnull=False,
- collection__istartswith=term)
- products = products.select_subclasses()
- qs = products.values('collection').annotate(
- products=Count('collection')).order_by('-products')
- return qs
-
- def get_item_value(self, item):
- return item['collection']
-
- def get_item_label(self, item):
- collections = '{collection} ({products} products)'.format(**item)
- return collections
-
-
-registry.register(CollectionLookup)
diff --git a/saleor/settings.py b/saleor/settings.py
index b07453d94d..c701f5b8dc 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -171,7 +171,6 @@ INSTALLED_APPS = [
'graphene_django',
'mptt',
'payments',
- 'selectable',
'materializecssform',
'rest_framework',
'webpack_loader',
diff --git a/saleor/urls.py b/saleor/urls.py
index f913be4f27..9b6befe2f5 100644
--- a/saleor/urls.py
+++ b/saleor/urls.py
@@ -33,7 +33,6 @@ urlpatterns = [
url(r'^products/', include(product_urls, namespace='product')),
url(r'^profile/', include(userprofile_urls, namespace='profile')),
url(r'^search/', include(search_urls, namespace='search')),
- url(r'^selectable/', include('selectable.urls')),
url(r'^feeds/', include(feed_urls, namespace='data_feeds')),
url(r'^sitemap\.xml$', sitemap, {'sitemaps': sitemaps},
name='django.contrib.sitemaps.views.sitemap'),