Skip to content

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

Remove display collection view

Mira Szewczyk897bf70a221f
diff --git a/saleor/product/urls.py b/saleor/product/urls.py
index 3cf96fccbc..792a3322de 100644
--- a/saleor/product/urls.py
+++ b/saleor/product/urls.py
@@ -10,6 +10,4 @@ urlpatterns = [
views.category_index, name='category'),
url(r'(?P<slug>[a-z0-9-_]+?)-(?P<product_id>[0-9]+)/add/$',
views.product_add_to_cart, name="add-to-cart"),
- url(r'^collection/(?P<slug>[a-z0-9-_/]+?)-(?P<collection_id>[0-9]+)/$',
- views.collection_index, name='collection'),
]
diff --git a/saleor/product/views.py b/saleor/product/views.py
index 6c2d4ec176..b9913327fa 100644
--- a/saleor/product/views.py
+++ b/saleor/product/views.py
@@ -114,6 +114,7 @@ def category_index(request, path, category_id):
if actual_path != path:
return redirect('product:category', permanent=True, path=actual_path,
category_id=category_id)
+<<<<<<< HEAD
products = products_with_details(user=request.user).filter(
category__id=category.id).order_by('name')
product_filter = ProductFilter(
@@ -132,3 +133,7 @@ def category_index(request, path, category_id):
'now_sorted_by': now_sorted_by,
'is_descending': is_descending}
return TemplateResponse(request, 'category/index.html', ctx)
+=======
+ return TemplateResponse(request, 'category/index.html',
+ {'category': category})
+>>>>>>> Remove display collection view
diff --git a/tests/test_collection.py b/tests/test_collection.py
index 94b5d1d2af..b42e1da868 100644
--- a/tests/test_collection.py
+++ b/tests/test_collection.py
@@ -87,15 +87,3 @@ def test_collection_delete_view(admin_client, collection):
response = admin_client.post(url)
assert response.status_code == 302
assert Collection.objects.count() == (collections_count - 1)
-
-
-def test_collection_index(client, collection):
- url = reverse(
- 'product:collection',
- kwargs={'slug': collection.slug, 'collection_id': collection.id})
- response = client.get(url)
- assert response.status_code == 200
-
- context = response.context
- assert context['collection'] == collection
-