I have a class like this:
class Rank (models.Model):
respect=models.IntegerField(max_length=3)
#some other attributes
Rank has many attributes (the first of which is respect).
The names of the attributes of Rank are stored in the list, attributes.
I would like to iterate through them, setting them to somevalue, an arbitrary variable.
I'm attempting:
rank=Rank()
for att in attributes:
rank.att=somevalue #I want rank.(value of att) instead of this
rank.attto actually meanrank.{value_of_att}I think.