I have passed from view dictionary to template page. How to inside template check if dictionary’s size is larger than 0 and if it is larger that 0 to fetch first key value pair ?
I have passed from view dictionary to template page. How to inside template check
Share
Note that Python dicts are unordered, so there is no “first” k-v pair.
And are you sure template is a good place for this logic? I am not.