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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -