Deploy in Heroku application PYTHON / DJANGO giving error

2

I made a change in the default auth of django and my project is working correctly however when I give git push heroku master and then I use the command heroku run python manage.py migrate to create my database and it gives the error:

  

django.db.migrations.exceptions.NodeNotFoundError: Migration   accounts.0001_initial dependencies reference nonexis nt parent node   ('auth', '0008_alter_user_username_max_length')

Does anyone know how to solve it?

    
asked by anonymous 11.06.2017 / 20:32

1 answer

0

I believe your makemigrations has created the "0008_alter_user_username_max_length" in the auth app folder that is not versioned along with your project. So for heroku the dependency on your migration really does not exist.

To resolve would advise you to extend the auth app. Create your own user template and set it as the default. No settings for example:

AUTH_USER_MODEL = 'myapp.MyUser'

And no models:

class MyUser(AbstractBaseUser):
    ...
    date_of_birth = models.DateField()
    height = models.FloatField()
    ...
    REQUIRED_FIELDS = ['date_of_birth', 'height']

link

    
06.11.2017 / 16:25