parent
67bf326c15
commit
32d7f19fc0
7
views.py
7
views.py
|
@ -22,8 +22,13 @@ def amazon_search(request):
|
||||||
|
|
||||||
result = []
|
result = []
|
||||||
for product in products:
|
for product in products:
|
||||||
|
if product.small_image_url:
|
||||||
|
small_image_url = product.small_image_url.replace('http://ecx.images-amazon.com/images/I/', '')
|
||||||
|
else:
|
||||||
|
small_image_url = None
|
||||||
|
|
||||||
result.append({
|
result.append({
|
||||||
'image': product.small_image_url.replace('http://ecx.images-amazon.com/images/I/', ''),
|
'image': small_image_url,
|
||||||
'price': product.list_price,
|
'price': product.list_price,
|
||||||
'review': striptags(product.editorial_review),
|
'review': striptags(product.editorial_review),
|
||||||
'reviews': product.reviews,
|
'reviews': product.reviews,
|
||||||
|
|
Loading…
Reference in New Issue