Skip to content

Commit

Permalink
Fixed same template being twice in the list if the product is simple …
Browse files Browse the repository at this point in the history
…a Product instanceo
  • Loading branch information
Chris Glass committed Feb 17, 2011
1 parent 6c844ad commit 3941b9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shop/views/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def get_object(self, queryset=None):
return obj.get_specific()

def get_template_names(self):
generic_template = 'shop/product_detail.html'
ret = super(ProductDetailView, self).get_template_names()
ret.append('shop/product_detail.html')
if not generic_template in ret:
ret.append(generic_template)
return ret

0 comments on commit 3941b9c

Please sign in to comment.