I want to know how i can concat object fields with a variable, it\'s hard to explain to me, let me give an example
Example:
My object have:
myobj
I'm guessing you are looking for getattr:
print getattr(myobject, some_dumb_field)
This will look up the attribute of myobject
whose name is given by the string some_dumb_field
.
For example,
getattr(myobject, 'name')
is equivalent to
myobject.name
(Warning: This could be called attribute lookup; you won't find it under the term "concat".)