A
A
Alexander Shendrik2015-06-22 23:12:20
Django
Alexander Shendrik, 2015-06-22 23:12:20

How to get object in django templates by number in dictionary?

The problem is, I have elements in the loop, and in another dictionary I have the corresponding numbers, which are in the same order, how to get them?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Shikanov, 2015-06-22
@TheSuperD20

1) Write a template tag that will receive a key and return a value
2) Preliminarily create another dictionary, where the key will correspond to a tuple with a pair of values.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question