1👍
The following line looks wrong:
# Here, dictt[e] is a set that contains coupon_code.coupon_code and w.service_type
dictt.update({e:{coupon_code.coupon_code,w.service_type}})
Instead, write:
dictt.update({e: coupon_code.coupon_code})
0👍
You should use dictionary like this:
{% for key, value in dict.items %}
{{key}}-{{value}}
{% endfor %}
- More efficient way of writing this function? (Django, AJAX)
- Extending Django Admin templates
- Django ForeignKey Works for Filter but not List Display
- Why can't I run django app outside visual studio?
Source:stackexchange.com