I realized that it was enough to have a string containing both the
component name and the price. In this way in the admin page for adding
a new configuration (that shows the components list too, due to
edit_inline=True) will be shown a combobox with, as said, the string
'comp name -- price' obtained via __repr__.

Initially instead I though that a tuple could keep the two values
separated, so that they could be used in different contexts. For
example, and it was my initial question, to have in the admin a listbox
'Component' filled with the name, and a dummy-display-box 'Price'
filled with the price.

Sorry for the confusion, I'm new to Django and I'm still trying to
figure how the things work together.

Reply via email to