Re: Syncdb error with new 1.5rc1

2013-01-08 Thread galgal
As for my problem, I solved it by making manage.py migrate --fake 
But I don't know that is the best and good solution. So far it works somehow :)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Suged2nr3fMJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Syncdb error with new 1.5rc1

2013-01-08 Thread Thiago Carvalho D' Ávila
I found out what I was doing wrong in my model. I was using UserManager
without having 'is_active' and 'is_admin' fields. Solved!

As with galgal's problem. I had no luck using South to migrate from
auth_mixin to django 1.5. I am doing it manually =/

2013/1/8 galgal 

> I also get strange error:
> https://groups.google.com/forum/#!topic/django-users/lVUZ3hClyUg
>
>
> On Monday, January 7, 2013 10:46:18 PM UTC+1, Thiago wrote:
>>
>> I used auth mixin before in my app, then made the changes to make it work
>> on the official Django with new custom user.
>>
>> The problem is that, when I run on my new empty db:
>> python manage.py syncdb --all
>>
>> ...
>> You just installed Django's auth system, which means you don't have any
>> superusers defined.
>> Would you like to create one now? (yes/no): yes
>> E-mail address: e...@il.xx
>> Password:
>> Password (again):
>> TypeError: create_superuser() takes exactly 4 arguments (3 given)
>>
>> Do you know what is wrong?
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/N6aoa9nWW9IJ.
>
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> 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 django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Syncdb error with new 1.5rc1

2013-01-08 Thread galgal
I also get strange error: 
https://groups.google.com/forum/#!topic/django-users/lVUZ3hClyUg

On Monday, January 7, 2013 10:46:18 PM UTC+1, Thiago wrote:
>
> I used auth mixin before in my app, then made the changes to make it work 
> on the official Django with new custom user.
>
> The problem is that, when I run on my new empty db:
> python manage.py syncdb --all
>
> ...
> You just installed Django's auth system, which means you don't have any 
> superusers defined.
> Would you like to create one now? (yes/no): yes
> E-mail address: e...@il.xx
> Password: 
> Password (again): 
> TypeError: create_superuser() takes exactly 4 arguments (3 given)
>
> Do you know what is wrong?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/N6aoa9nWW9IJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Syncdb error with new 1.5rc1

2013-01-08 Thread Thiago Carvalho D' Ávila
Basically, I am using Person class as my AUTH_USER_MODEL. I realized it was
missing 'username' in REQUIRED_FIELDS.

from django.contrib.auth.models import UserManager, AbstractBaseUser
...

class Person(AbstractBaseUser):
objects = UserManager()
username = models.CharField(_('username'), max_length=30, unique=True,
help_text=_('Required. 30 characters or fewer. Letters, numbers and
'
'@/./+/-/_ characters'))
email = models.EmailField(_('e-mail address'), unique=True, blank=True,
null=True)
...
USERNAME_FIELD = 'email'
REQUIRED_FIELDS = ['username']

But it continues to give me error to syncdb:
You just installed Django's auth system, which means you don't have any
superusers defined.
Would you like to create one now? (yes/no): yes
E-mail address: e...@il.xx
Username: test
Password:
Password (again):
TypeError: 'is_active' is an invalid keyword argument for this function

There is no is_active reference in my model.

2013/1/8 Russell Keith-Magee 

>
> On Tue, Jan 8, 2013 at 5:46 AM, Thiago Carvalho D' Ávila <
> thiagocav...@gmail.com> wrote:
>
>> I used auth mixin before in my app, then made the changes to make it work
>> on the official Django with new custom user.
>>
>> The problem is that, when I run on my new empty db:
>> python manage.py syncdb --all
>>
>> ...
>> You just installed Django's auth system, which means you don't have any
>> superusers defined.
>> Would you like to create one now? (yes/no): yes
>> E-mail address: e...@il.xx
>> Password:
>> Password (again):
>> TypeError: create_superuser() takes exactly 4 arguments (3 given)
>>
>> Do you know what is wrong?
>
>
> It's impossible to tell you the exact problem without seeing code, but
> from the look of it, your user manager isn't defined correctly.
>
> The arguments of the create_superuser() method on your user manager must
> match the required fields on your user model (i.e., the contents of
> REQUIRED_FIELDS, plus username and password). Based on the error you're
> describing, you've defined a create_superuser() that takes an argument that
> isn't listed as a required field.
>
> Yours,
> Russ Magee %-)
>
>
>
>  --
> 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
> django-users+unsubscr...@googlegroups.com.
> 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 django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Syncdb error with new 1.5rc1

2013-01-07 Thread Russell Keith-Magee
On Tue, Jan 8, 2013 at 5:46 AM, Thiago Carvalho D' Ávila <
thiagocav...@gmail.com> wrote:

> I used auth mixin before in my app, then made the changes to make it work
> on the official Django with new custom user.
>
> The problem is that, when I run on my new empty db:
> python manage.py syncdb --all
>
> ...
> You just installed Django's auth system, which means you don't have any
> superusers defined.
> Would you like to create one now? (yes/no): yes
> E-mail address: e...@il.xx
> Password:
> Password (again):
> TypeError: create_superuser() takes exactly 4 arguments (3 given)
>
> Do you know what is wrong?


It's impossible to tell you the exact problem without seeing code, but from
the look of it, your user manager isn't defined correctly.

The arguments of the create_superuser() method on your user manager must
match the required fields on your user model (i.e., the contents of
REQUIRED_FIELDS, plus username and password). Based on the error you're
describing, you've defined a create_superuser() that takes an argument that
isn't listed as a required field.

Yours,
Russ Magee %-)

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Syncdb error with new 1.5rc1

2013-01-07 Thread Thiago Carvalho D' Ávila
I used auth mixin before in my app, then made the changes to make it work
on the official Django with new custom user.

The problem is that, when I run on my new empty db:
python manage.py syncdb --all

...
You just installed Django's auth system, which means you don't have any
superusers defined.
Would you like to create one now? (yes/no): yes
E-mail address: e...@il.xx
Password:
Password (again):
TypeError: create_superuser() takes exactly 4 arguments (3 given)

Do you know what is wrong?

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.