Re: After changing User.username to PhoneNumberField I can't migrate

2019-11-06 Thread Laura Pérez
Great! thanks for sharing , I'm going to see the link. El mié., 6 de nov. de 2019 a la(s) 10:45, Ahmed Shahwan ( dev.ahmed.shah...@gmail.com) escribió: > Thank you, Laura, for your input. > I found the problem related to the `django-guardian` pacakge which seems > to create an anonymous user

Re: After changing User.username to PhoneNumberField I can't migrate

2019-11-06 Thread Ahmed Shahwan
Thank you, Laura, for your input. I found the problem related to the `django-guardian` pacakge which seems to create an anonymous user when I issue `manage.py migrate` which has a username of "AnonymousUser" and that, of course, doesn't pass the validation error of `PhoneNumberField` which has

Re: After changing User.username to PhoneNumberField I can't migrate

2019-11-06 Thread Laura Pérez
I was having a similar error yesterday, after adding another field to my model I ran the migrations and was giving me an error as if I was overwriting another field. After a time searching for an answer for me ,the solution was (and I know this is not a good practice) delete all the migration

After changing User.username to PhoneNumberField I can't migrate

2019-11-06 Thread Ahmed Shahwan
Hello everybody, I work on a project started from the cookiecutter-django, and I altered the username of the User model to use `PhoneNumberField` from django-phonenumber-field package instead of the ordinary `models.CharField` and made the necessary changes, then I issued `manage.py