Data base connection problem

74 views
Skip to first unread message

ahmed waqas Nasir

unread,
Feb 14, 2016, 12:42:23 AM2/14/16
to Django users
i have made a model  names STUDENT and when i run migrataion no migration applied but when from admin i tried to browse student i got following error

OperationalError at /admin/app/student/

no such table: app_student
Request Method:GET
Request URL:http://127.0.0.1:8000/admin/app/student/
Django Version:1.9.2
Exception Type:OperationalError
Exception Value:
no such table: app_student
Exception Location:C:\Users\nauman malik\Google Drive\feedbacknew\feedbacknew\env\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 323
Python Executable:C:\Users\nauman malik\Google Drive\feedbacknew\feedbacknew\env\Scripts\python.exe
Python Version:2.7.10
Python Path:
['C:\\Users\\nauman malik\\Google Drive\\feedbacknew\\feedbacknew',
 'C:\\Windows\\SYSTEM32\\python27.zip',
 'C:\\Users\\nauman malik\\Google Drive\\feedbacknew\\feedbacknew\\env\\DLLs',
 'C:\\Users\\nauman malik\\Google Drive\\feedbacknew\\feedbacknew\\env\\lib',
 'C:\\Users\\nauman malik\\Google Drive\\feedbacknew\\feedbacknew\\env\\lib\\plat-win',
 'C:\\Users\\nauman malik\\Google Drive\\feedbacknew\\feedbacknew\\env\\lib\\lib-tk',
 'C:\\Users\\nauman malik\\Google Drive\\feedbacknew\\feedbacknew\\env\\Scripts',
 'C:\\Python27\\Lib',
 'C:\\Python27\\DLLs',
 'C:\\Python27\\Lib\\lib-tk',
 'C:\\Users\\nauman malik\\Google Drive\\feedbacknew\\feedbacknew\\env',
 'C:\\Users\\nauman malik\\Google Drive\\feedbacknew\\feedbacknew\\env\\lib\\site-packages']

James Schneider

unread,
Feb 14, 2016, 12:48:37 AM2/14/16
to django...@googlegroups.com


On Feb 13, 2016 9:42 PM, "ahmed waqas Nasir" <waqasn...@gmail.com> wrote:
>
> i have made a model  names STUDENT and when i run migrataion no migration applied but when from admin i tried to browse student i got following error

Have you run 'manage.py makemigrations' to generate a new migration, and then run 'manage.py migrate'? It sounds like you haven't created a new migration file to apply after making your changes.

-James

namal.f...@gmail.com

unread,
Feb 15, 2016, 12:31:45 PM2/15/16
to Django users
yes i did run makemigrations  ... but i got following response .... no changes to apply 

James Schneider

unread,
Feb 15, 2016, 12:38:46 PM2/15/16
to django...@googlegroups.com

On Feb 13, 2016 9:42 PM, "ahmed waqas Nasir" <waqasn...@gmail.com> wrote:
>
> i have made a model  names STUDENT and when i run migrataion no migration applied but when from admin i tried to browse student i got following error

Have you run 'manage.py makemigrations' to generate a new migration, and then run 'manage.py migrate'? It sounds like you haven't created a new migration file to apply after making your changes.

-James


yes i did run makemigrations  ... but i got following response .... no changes to apply 

Have you applied the existing migrations? 

-James

Chris Bartos

unread,
Apr 17, 2017, 10:49:55 AM4/17/17
to Django users
Few things you can do:

  1. Check to make sure your app is in INSTALLED_APPS
  2. Delete the migrations folder and run 'manage.py makemigrations' & 'manage.py migrate' again
  3. depending on the name of the app (let's say student) you can try running 'manage.py makemigrations student' & 'manage.py migrate'
Chris
Reply all
Reply to author
Forward
0 new messages