On Fri, Nov 2, 2012 at 4:34 PM, Michael Muster <
[email protected]> wrote:

> Hi,
>
> I am using django 1.5 and want to add an extra
> field to the django user class.
> The documentation says that i have to subclass AbstractUser
> and add extra fields to it.
>
> So i tried it, in my app 'news' i have:
>
> from django.contrib.auth.models import AbstractUser
>
> class cpUser(AbstractUser):
>     twitter = models.CharField(max_length=100)
>     def __unicode__(self):
>         return self.twitter
>
>
> and in my settings.py file:
>
> AUTH_USER_MODEL = 'news.cpUser'
>
> however, after running
>
> $ python manage syncdb
>
> i get
>
> NameError: name 'settings' is not defined
>
> What am i doing wrong?
>
>
>
> best regards,
> Michael
>
> --
> 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.
>
>

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