django.db.migrations.exceptions.NodeNotFoundError

前端 未结 5 1986
无人共我
无人共我 2020-12-07 01:00

When i run makemigrations command, i got this error:

Traceback (most recent call last):
 ...
django.db.migrations.exceptions.NodeNotFoundError:          


        
5条回答
  •  死守一世寂寞
    2020-12-07 01:27

    If it not solve after reseting the migrations, follow the following steps: Apparently django kept migration files within it's own module folder. This is why you need to flush the django:

    1. pip uninstall django.
    2. /Lib/site-packages, deleted django folder.
    3. Deleted all *.pyc files in my project.
    4. Deleted all pycache folders in my project.
    5. Cleared all migrations folders in my project (keep init.py).
    6. pip install django==x.x.x.
    7. python manage.py migrate.
    8. python manage.py makemigrations .
    9. python manage.py migrate.
    10. python manage.py runserver. Now your problem will be solved.

提交回复
热议问题