Answer the question
In order to leave comments, you need to log in
Why am I getting no such table: accounts_accountparameters?
I have a model
class AccountParameters(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
phone = models.CharField('Phone',max_length=15,)
basket = models.ManyToManyField(Offer, blank=True)
admin.site.register(AccountParameters)
127.0.0.1:8000/admin/accounts/accountparameters
OperationalError at /admin/accounts/accountparameters/
no such table: accounts_accountparameters
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/accounts/accountparameters/
Django Version: 3.1.1
Exception Type: OperationalError
Exception Value:
no such table: accounts_accountparameters
Exception Location: C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\sqlite3\base.py, line 413, in execute
Python Executable: C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe
Python Version: 3.7.6
Python Path:
['D:\\Work\\Project\\git\\shop2',
'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python37\\python37.zip',
'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python37\\DLLs',
'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python37\\lib',
'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python37',
'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages',
'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\win32',
'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\win32\\lib',
'C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\Pythonwin',
'D:\\Work\\Project\\git\\shop2\\apps']
Server time: Thu, 04 Mar 2021 14:05:58 +0000
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question