Re: ManyToMany quick question

2014-04-01 Thread willyhakim
Camillo, YOU'RE DA MAN! Thank you so much? One day, at djangocon, I will buy you a beer -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr..

Re: ManyToMany quick question

2014-04-01 Thread Camilo Torres
Hello, By using default table names and default (or automatic) many to many field management, you get a join table like countries_products, but in your case, you are doing the many to many field management through the Imports model, so in the DB you should see data in the imports table for each

Re: ManyToMany quick question

2014-04-01 Thread willyhakim
I think I was missing the concept all together. So the m2m field is just there to show the relationship but does not take any data. That is why when I look in pgadmin, I do not see it. So sorry, I was missing the concept all together. -- You received this message because you are subscribed t

Re: ManyToMany quick question

2014-04-01 Thread antialiasis
I don't know why you're calling a ManyToManyField to Products a country name, but you shouldn't get a country_name field - the Imports table will contain all the data needed to associate countries with products. What exactly do you want to be stored in the country_name field on the Countries mo

Re: ManyToMany quick question

2014-04-01 Thread willyhakim
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, m

Re: ManyToMany quick question

2014-03-31 Thread Camilo Torres
On Monday, March 31, 2014 5:37:05 PM UTC-4:30, willyhakim wrote: > > when creating your models, how do you know which field to assign the > ManyToManyField ? > from django.db import models class Student(models.Model): name = models.TextField() class Course(models.Model): name = m

Re: ManyToMany quick question

2014-03-31 Thread willyhakim
So sorry, I should have been clear. I meant when you are assigning a field ManyToManyField (through) properties -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email

Re: ManyToMany quick question

2014-03-31 Thread Mike Dewhirst
On 1/04/2014 9:07 AM, willyhakim wrote: when creating your models, how do you know which field to assign the ManyToManyField ? https://docs.djangoproject.com/en/1.6/topics/db/models/#many-to-many-relationships -- You received this message because you are subscribed to the Google Groups "Djan