Yes I think you should first do "makemigrations" and then run migrate
On Sun, May 26, 2019, 6:15 PM Saeed Pooladzadeh <lingo1357@gmail.com> wrote:
--HiThis is my model:from django.db import modelsfrom django.conf import settings# Create your models here.class Smodel(models.Model):eid=models.IntegerField()elogin = models.CharField(max_length=8)epassword= models.CharField(max_length=8)elikeDay=models.IntegerField()efollowPerDay=models.IntegerField()#esession = models.TextField()class Meta:db_table = "saeed"
And I get this error:OperationalError at /emp
no such table: saeed
Request Method: POST Request URL: http://localhost:50021/emp Django Version: 2.2 Exception Type: OperationalError Exception Value: no such table: saeedException Location: E:\Django_Try\bot4\bot3\env\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 383 Python Executable: E:\Django_Try\bot4\bot3\env\Scripts\python.exe Python Version: 3.6.6 Python Path: ['E:\\Django_Try\\bot4\\bot3', '', 'E:\\Django_Try\\bot4\\bot3', 'E:\\Django_Try\\bot4\\bot3\\env\\Scripts\\python36.zip', 'C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python36_64\\DLLs', 'C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python36_64\\lib', 'C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python36_64', 'E:\\Django_Try\\bot4\\bot3\\env', 'E:\\Django_Try\\bot4\\bot3\\env\\lib\\site-packages']Server time: Sun, 26 May 2019 22:05:31 +0000 What is mean and what can I do?tnanksSaeed
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cf149a11-d875-4d5f-b5be-85dead85fdb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CADNvQ1NjxRaELizWGVpvy_JHdw2sL6%2BngyWDmuyvVFC5_xE7%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment