Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed name for base shop view to follow naming conventions

  • Loading branch information...
commit ebffd51f459f32aacffe6b4f50b6dac4b034ee04 1 parent 8ca697b
Chris Glass authored
2  shop/templates/shop/product/product_list.html
View
@@ -1,7 +1,7 @@
<h1>Product list:</h1>
-{% for object in object_list %}
<hr />
+{% for object in object_list %}
<a href="{% url product_detail object.slug %}">{{object.name}}</a><br />
{{object.slug}}<br />
{{object.short_description}}<br />
2  shop/views/__init__.py
View
@@ -5,7 +5,7 @@
else:
from cbv import TemplateView, ListView, DetailView
-class BaseShopView(TemplateView):
+class ShopTemplateView(TemplateView):
'''
A class-based view for use within the shop (this allows to keep the above
import magic in only one place)
4 shop/views/cart.py
View
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
from django.contrib.auth.models import AnonymousUser
from shop.models.cartmodel import Cart
-from shop.views import BaseShopView
+from shop.views import ShopTemplateView
-class CartDetails(BaseShopView):
+class CartDetails(ShopTemplateView):
template_name = 'shop/cart/details.html'
def get_context_data(self, **kwargs):
Please sign in to comment.
Something went wrong with that request. Please try again.