'makemigrations - No changes detected -Django
I am new to Django, and im trying to create a company profile for user to fill up.
when i make migrations, i got the following error which is no changes detect.
heres the model.py
class Company(models.Model):
name = models.CharField(max_length=100)
about = models.TextField(gettext_lazy('about'), max_length=500, blank=True)
role = models.CharField(max_length=100)
address=models.CharField(max_length=100)
contact=models.CharField(max_length=100)
def __str__(self):
return f'{self.user.username} Profile'
I didnt create anything in other .py file only model and i have another class which is profile in the same model.py as company.
Do correct or lmk if i make any mistake, thanks!
Solution 1:[1]
Your app must be included in INSTALLED_APPS first (inside settings.py).
INSTALLED_APPS = [
...
'<myapp>',
...
]
After that you can run
python manage.py makemigrations <myapp>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | iamjazzar |
