I have a Django template that gets a list of objects in a context variable browsers.
I want to select the first object in the list and access one of its attributes, for example:
<a class="{{ browsers|first.classified_name }}" href="">{{ browsers|first }}</a>
However, I get a syntax error related to attribute selection .classified_name.
Is there any way to select the attribute of the first object in the list?
source
share