On Sun, May 17, 2009 at 5:31 PM, Thierry <lamthie...@gmail.com> wrote:
> > In the Django doc at > http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ForeignKey > , > it mentions explicitly specifying the application label in 1.0: > > class Car(models.Model): > manufacturer = models.ForeignKey('production.Manufacturer') > > The above is using a string for the ForeignKey, is that the preferred > way over explicitly specifying Manufacturer, like the following: > > # assuming class Manufacturer is in the same file as class Car > class Car(models.Model): > manufacturer = models.ForeignKey(Manufacturer) > > > > The generally reccomended way to use it is to always import the module, except in the case where a circular reference would prevent you from doing so. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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 -~----------~----~----~----~------~----~------~--~---