Reputation: 31
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!
Upvotes: 0
Views: 1727
Reputation: 201
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>
Upvotes: 1