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

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -