ValueError: Dependency on app with no migrations: customuser
Solution 1
You haven't run manage.py makemigrations customuser
to create the migrations for your CustomUser app.
Also, you haven't run any of the existing migrations - you should do manage.py migrate
.
Solution 2
Run the following commands
python manage.py makemigrations
python manage.py migrate
This solved my error. Hope it helps you.
Solution 3
For me makemigrations was the one throwing the error which was super annoying. Finally I realized I had deleted all the migration files, but you have to delete the migrations folder as well! Otherwise you'll get this error.
Related videos on Youtube
VITALYS WEB
Updated on May 10, 2022Comments
-
VITALYS WEB almost 2 years
I am trying to start a webpage using the Django framework. This is my first web development project.
After creating the project, I tried to start an app that utilizes customized users and registration with email validation using django-registration.
This is what happened when I ran
manage runserver
:This is what models.py file contains:
from django.db import models from django.contrib.auth.models import AbstractUser from django.utils.translation import ugettext_lazy as _ class User(AbstractUser): username = models.CharField(max_length=255, unique=True, verbose_name=_("Username")) email = models.EmailField(unique=True, verbose_name=_("Email Address")) favorite_animal = models.CharField(max_length=255, verbose_name=_("Favorite Animal"))
-
VITALYS WEB almost 7 yearsok i'll not miss it next time thanx
-
Cornelius Roemer almost 2 yearsPlease put the error message/stacktrace as text not as an image so it's better search engine indexable and readable by screen reader etc.
-
-
emanuel sanga almost 4 yearsYou should add a scenario where this is required boss... It's a high level solution where all else have failed