2👍
✅
In your data:
{'PAP': 10, 'btw': 10, 'via': 20, 'crowd': 10, 'is': 10, 'half': 10, 'anyway': 10, "#fb'": 10, 'items': 10, '[@leynaaaa': 10, 'are': 10}
There’s a key called items
. Can you pass in a test dictionary without the items
key to the template to see if it works?
Workaround:
Assuming you can’t rename the items
key, you can pass in {'latest_status': tags.items()}
from your view. In the template, do a for loop on {% for k, v in latest_status %}
.
0👍
latest_status.items is returning a single integer, not an interable data-structure.
Log the value of latest_status.items and tell me what you get.
👤bdd
- [Answered ]-How to concatenate double curly brackets with variables in javascript
- [Answered ]-Not able to set custom 404 page (Django 1.9)
- [Answered ]-Django query to Sum the lengths of ArrayFields
- [Answered ]-How do I optimize the following Django model queries?
Source:stackexchange.com