On Tue, Sep 1, 2009 at 11:19 AM, Joru<avenp...@gmail.com> wrote:
>
> Hi
>
> I got name error in my models when using models.ManyToManyField
> Here are my models
>
> class Ank(models.Model):
>    route = models.ManyToManyField(Dek)
>    intercity = models.BooleanField()
>
> class Dek(models.Model):
>    ank = models.ManyToManyField(Ank)
>
> How come I got "NameError: name 'Dek' is not defined" when running
> runserver
>
>
>
> >
>

Take a look at:
http://docs.djangoproject.com/en/dev/ref/models/fields/#lazy-relationships

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
"Code can always be simpler than you think, but never as simple as you
want" -- Me

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to