Hello, I am implementing a simple 'shop'. The (simplified) model consists of these classes:
class Product(models.Model): name = models.CharField(max_length = 100) class Country(models.Model): currency = models.CharField(max_length = 3) class Price(models.Model): product = models.ForeignKey( Products ) country = models.ForeignKey( Country ) price = models.FloatField() The product to buy is selected from a <select> widget. I would like the label displayed on the widget to be something like: "%s %s %s" % (product.name , country.currency , price (product , country)) The country comes from the url the customer has used to access the page, but I wonder how to pass this value to the function rendering the label for the selevct widget? And furthermore: currently I am adjusting the __unicode__() function of the Products class to manipulate this rendering; is it possible to the rendering to use another function (I am currently just rendering the form with xxx.as_table()). Best Regards Joakim Hove --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---