Carlos Yoder escribió:
> The problem is, I don't know how to do this in Django. I tried doing:

Well, I'm new to django, but I don't believe that the ManytoMany field 
could be used this way. It can for sure relate both tables (user and 
car), but I don't know how to add a third value.

I'd do it the "classic" way.

  class Car(models.Model):
  #...

  class SpecialPrice(models.Model):
        """ A price for a special user (company)"""
        user    = models.ForeignKey(User)
        car     = models.ForeignKey(Car)
        special_price = models.FloatField("Custom Price", max_digits=9,
  decimal_places=2)

But maybe there is some better way.

> Mil gracias,

De nada ;).

Javier.


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to