'Django: no such table: users_company
i was trying to create a user's company profile but i got the following error:
OperationalError at /admin/users/company/
Exception Value:
no such table: users_company
I think theres something wrong in my user' model.py because when i try to make migrations myapp> it shows
No changes detected in app
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} Company'
Does anyone can help me with this? I am new to django, lmk if you need any other information. Thanks !
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
