Below is my models.py
My problem is when I syncdb (I have dropped the db couple times to start over)
the country_name field with m2m never shows in the db. what am I doing wrong? I am using postgres
class Products(models.Model):
hs_number = models.CharField(primary_key=True, blank=True, max_length=4)
product_descript = models.CharField(max_length=250)
class Meta:
db_table = "Products"
def __unicode__(self):
return self.hs_number
class Countries(models.Model):
country_id = models.CharField(primary_key=True, max_length=2, blank=True)
country_name = models.ManyToManyField(Products, through="Imports", blank=True)
region = models.CharField(max_length=200)
class Imports(models.Model):
hs_number = models.ForeignKey(Products)
country_id = models.ForeignKey(Countries)
imported_value2008 = models.DecimalField(max_digits=12, decimal_places=2, default=0.00)
imported_value2009 = models.DecimalField(max_digits=12, decimal_places=2, default=0.00)