hi,guys:

Here is my models:

from django.db import models

# Create your models here.
class User(models.Model):
        pass

class MyEntity(models.Model):
        user = models.ForeignKey(User)
        name = models.CharField(maxlength=30)
        create_date = models.DateTimeField()

class Category(MyEntity):
        pass

class Product(MyEntity):
        #user = models.ForeignKey(User) ## -------------THE-LINE----------------
        category = models.ForeignKey(Category,limit_choices_to={"user":user})

If ther is no "THE-LINE",when i "manage.py syncdb",error:

"
Error: Couldn't install apps, because there were errors in one or more models:
t.tt: name 'user' is not defined
"

Is it a bug?

-- 

argan

--~--~---------~--~----~------------~-------~--~----~
 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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to