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' obtain
On 8/26/05, paolo <[EMAIL PROTECTED]> wrote:
> I'd like that once a user select or change a component from the
> component's listbox, its price appears somewhere. I'd like to avoid the
> javascript solution, as probably it wouldn't be trivial and I don't
> know javascript well.. So I thought to ch
On 8/26/05, paolo <[EMAIL PROTECTED]> wrote:
> ... So I thought to change __repr__ to return a
> tuple containing self.code and self.price, but some problems arise.
> ...
Hi paolo -
__repr__ has to return a string - if that was what you wanted, you
could use string formatting to include the pric
Using the following model it is possible to add an arbitrary number of
components (with a quantity) to configurations.
class Configuration(meta.Model):
pass fields definition.
class META:
pass meta definition
class Component(meta.Model):
code = meta.CharField('Code'
4 matches
Mail list logo