I am new to django.
I am trying to write a model that looks like dis.

class Profile(models.Model):
    user = models.OneToOneField(User)
    birth_date = models.DateField()
    bio = models.TextField()
    address = models.CharField(max_length=100)
    city = models.CharField(max_length=50)
    state = models.CharField(max_length=50)

    def create_user_profile(sender, instance, created, **kwargs):
     if created:
        Profile.objects.create(user=instance)

    post_save.connect(create_user_profile, sender=User)

when i run the server this is the error message i get .
Could not import person.views. Error was: cannot import name User
pls help

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
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