Product Name | Current Price | % Changed |
product 1 20 1.5
results = dict()
for item in products:
data = pt.get_product_by_id(item.product_slug)
price = (data['product_data']['current_price']['GBP'])
day_change_percentage = (data['product_data']['change_percentage_24h'])
results.add({item.product_price:price,item.day_change_percentage:day_change_percentage})
{% for each ... %}
Product Name | Current Price | % Changed |
product 1 {{results.product_price}} {{results.day_changed_percentage}}
Im not really sure Ken.
But i see this wont work cause im not defining what the different keys are. So i need to understand how i create a new key/value for each item in products