python - Foreign Key to get many instances of a class -
so, code looks right now:
and when click on products ideally this:
so, right code allowing me 1 product, option of adding unlimited amount of products.
here's code:
class purchaseorder(models.model): product = models.foreignkey('product') vendor = models.foreignkey('vendorprofile') dollar_amount = models.floatfield(verbose_name='price') class product(models.model): products = models.charfield(max_length=256) def __unicode__(self): return self.products
how can this? or, rather, possible?
use manytomanyfield instead of foreignkey.
Comments
Post a Comment