Thanks, Joey! Would've saved me a lot of time if they'd included that in 
the example!

-s

On Friday, January 25, 2013 7:04:08 AM UTC-8, JoeLinux wrote:
>
> Scott,
>
> There is no django.db.models.AbstractBaseUser model. Try adding this to 
> your import statements:
>
>     from django.contrib.auth.models import AbstractBaseUser
>
> Hope that helps.
>
> --
> Joey "JoeLinux" Espinosa*
> *
> <http://joelinux117.blogspot.com> 
> <http://twitter.com/therealjoelinux><http://about.me/joelinux>
>  
>
> On Fri, Jan 25, 2013 at 10:02 AM, scott212 <scottw...@gmail.com<javascript:>
> > wrote:
>
>> Here's the docs I'm using: 
>> https://docs.djangoproject.com/en/dev/topics/auth/customizing/#specifying-a-custom-user-model
>>
>>
>> On Friday, January 25, 2013 7:00:47 AM UTC-8, scott212 wrote:
>>>
>>> I'm trying to take Django 1.5 for a spin (used older versions for a 
>>> while) to create a basic user that authenticates by email. I'm using the 
>>> docs for 1.5 and it says to inherit AbstractBaseUser but oddly, it doesn't 
>>> seem to be available to use. Here's my code:
>>>
>>> from django.db import models
>>>
>>> class User(models.AbstractBaseUser):**    
>>>     identifier = models.EmailField(max_length=**254)
>>>     first_name = models.CharField()
>>>     last_name  = models.CharField()
>>>     
>>>     REQUIRED_FIELDS = ['first_name','last_name']
>>>
>>> Here's what I get back from syncdb:
>>>
>>> *new-host-2:locations_site scott$* python manage.py syncdb
>>> AttributeError: 'module' object has no attribute 'AbstractBaseUser'
>>>
>>>  I've tried the import every different way I can think of. What am I 
>>> missing?
>>>
>>>
>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django...@googlegroups.com<javascript:>
>> .
>> To unsubscribe from this group, send email to 
>> django-users...@googlegroups.com <javascript:>.
>>
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to