Dec 19 2007

Django Template Tag for Dictionary Access

published by Peter Harkins
in blog Push cx
original entryDjango Template Tag for Dictionary Access

code dictionaries django hash templates

About a million times when writing Django pages I’ve been iterating through a list of objects and wanted to look up a value in a dictionary keyed by But you can’t, the built-in tags don’t allow it. The standard workaround is to loop over the list and zip the hash data into some kind […]

Tag cloud

Social Sharing