Sorry, double post I don't see my answer published:
I found this in stackoverflow:
After syncdb:
$ ./manage.py migrate
$ ./manage.py convert_to_south app
You will got:
CommandError: One or more models did not validate:
auth.user: Model has been swapped out for 'app.MyUser' which has not been
installed or is abstract.
Create a fake migration:
./manage.py migrate app 0001 --fake
Change your models:
./manage.py schemamigration app --auto
./manage.py migrate app
It should work!!!
('django.contrib.auth', must be in INSTALLED_APPS)
El viernes, 1 de febrero de 2013 08:28:01 UTC-3, Tejinder Singh escribió:
>
> I have a custom app in my project named 'profiles' which contains a custom
> User model. Here is the declaration of the same:
>
> class CustomUser(AbstractUser):
> image = models.ImageField(_('Image Field'), upload_to='user_images')
>
> I have pointed this in my settings module, AUTH_USER_MODEL =
> 'profiles.CustomUser'
>
> and in my settings i have 2 installed apps only, 1. South and 2. profiles.
>
> when i do syncdb, everything seems to work fine, but when I
> django-admin.py convert_to_south profiles, it gives me following error:
> Creating migrations directory at
> '/Users/tejinder/Projects/basidia/apps/profiles/migrations'...
> Creating __init__.py in
> '/Users/tejinder/Projects/basidia/apps/profiles/migrations'...
> + Added model profiles.CustomUser
> + Added M2M table for groups on profiles.CustomUser
> + Added M2M table for user_permissions on profiles.CustomUser
> Created 0001_initial.py. You can now apply this migration with:
> ./manage.py migrate profiles
> CommandError: One or more models did not validate:
> auth.user: Model has been swapped out for 'profiles.CustomUser' which has
> not been installed or is abstract.
>
> What could have been gone wrong? Thanks in advance.
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.