fix: extracted all web related stuff to a new app
This commit is contained in:
+3
-3
@@ -7,7 +7,7 @@ from shop.models import Product
|
||||
|
||||
|
||||
class IndexView(TemplateView):
|
||||
template_name = "shop/index.html"
|
||||
template_name = "web/index.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
return {
|
||||
@@ -16,7 +16,7 @@ class IndexView(TemplateView):
|
||||
|
||||
|
||||
class ListProducts(TemplateView, FilteredQuerysetMixin, PaginatedQuerysetMixin):
|
||||
template_name = "shop/list_products.html"
|
||||
template_name = "web/list_products.html"
|
||||
queryset = Product.objects.all()
|
||||
filter_class = ProductFilter
|
||||
|
||||
@@ -30,7 +30,7 @@ class ListProducts(TemplateView, FilteredQuerysetMixin, PaginatedQuerysetMixin):
|
||||
|
||||
|
||||
class ProductDetail(TemplateView):
|
||||
template_name = "shop/product_detail.html"
|
||||
template_name = "web/product_detail.html"
|
||||
|
||||
def get_context_data(self, pk, slug, **kwargs):
|
||||
product = get_object_or_404(Product, pk=pk)
|
||||
|
||||
Reference in New Issue
Block a user