class Register(models.Model): name = models.CharField(unique=True, max_length=48, db_column='name', blank=True) title = models.CharField(max_length=48, blank=True) firstname = models.CharField(max_length=48, blank=True)
class Meta: db_table = u'Register' class Charity(models.Model): name = models.CharField(max_length=96, blank=True) register = models.ForeignKey(Register) class Meta: db_table = u'Charity' I use MySQL on OSX, the schema created for the above shows two tables one called Register and one called charity (note leading lower case) - as far as I can tell this is the result of the ForeignKey field in Charity. In that if I remove that field the table is created with a Capital C(harity). Why is this behaviour correct? Python naming conventions suggest that class names should always be in CapWords style, and this style is observed in those tutorials which I have worked through. Thank-you Trying to correct this inconsistency(?) some way down the road in the development process can be a nightmare. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.