Suppose I have a django template with the following context:
data1 = "this is data1"
data2 = "this is data2"
data_name = "data2"
Now I know the value of data_name(assume it's "data2"), is it possible to use it to access the variable data2?
To make my intention clearer, this is how you might do it with Python
>>> a = 1
>>> b = 2
>>> name = 'a'
>>> locals()[name]
1
>>> name = 'b'
>>> locals()[name]
2