I have this situation in my views.py
d = {'05:45':3,'06:30':6 (...) }
T = ['05:45','06:30' (...)]
I would like to get d[T[i]]
in my HTML site
I tried to call this with dot, but it doesn't work. I will be thankful for help/hint.
I have this situation in my views.py
d = {'05:45':3,'06:30':6 (...) }
T = ['05:45','06:30' (...)]
I would like to get d[T[i]]
in my HTML site
I tried to call this with dot, but it doesn't work. I will be thankful for help/hint.
Thing you are trying to do is to get element from dictionary using variable. Am I right ? In django template engine it's a little bit tricky, but possible. Use some template tag from this question to acomplish this