class Client(UserenaBaseProfile):
    def __str__(self):
        return self.name

    user = models.OneToOneField(User,
                                unique=True,
                                verbose_name=_('Django Login'),
                                related_name='client')

    name = models.CharField(max_length=100, unique=True, default=user.name)


The title says it all - this class is supposed to have a OneToOneField 
relationship with a Django User, and through django-toolbar I've seen that 
when a user signs up, the Django User is created first and then my Client 
class. But how do I get the Client class to have the same name as the 
Django User's name?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cadbc069-1cbd-49e7-996c-fdb94adb537a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to