if i add data on my...
 
Notifications
Clear all

if i add data on my admin side and save it it shows error how to fix it ? but i already migrated ?

1 Posts
2 Users
0 Reactions
32 Views
0
Topic starter

OperationalError at /admin/todo/task/add/

table todo_task has no column named task
Request Method: POST
Request URL: http://127.0.0.1:8000/admin/todo/task/add/
Django Version: 4.2.17
Exception Type: OperationalError
Exception Value:
table todo_task has no column named task
Exception Location: A:\Django CRUD\project\env\lib\site-packages\django\db\backends\sqlite3\base.py, line 328, in execute
Raised during: django.contrib.admin.options.add_view
Python Executable: A:\Django CRUD\project\env\Scripts\python.exe
Python Version: 3.8.10
Python Path:
['A:\\Django CRUD\\project',
 'C:\\Users\\HP\\AppData\\Local\\Programs\\Python\\Python38\\python38.zip',
 'C:\\Users\\HP\\AppData\\Local\\Programs\\Python\\Python38\\DLLs',
 'C:\\Users\\HP\\AppData\\Local\\Programs\\Python\\Python38\\lib',
 'C:\\Users\\HP\\AppData\\Local\\Programs\\Python\\Python38',
 'A:\\Django CRUD\\project\\env',
 'A:\\Django CRUD\\project\\env\\lib\\site-packages']
Server time: Wed, 15 Jan 2025 12:49:46 +0000
This topic was modified 3 weeks ago by Zacchaeus Israel
1 Answer
0

Hi ,

The issue you are facing might be due to the absence of a field named 'task' in your Task model, which is causing a problem in your application. To fix the issue, you can run the following commands:

python manage.py makemigrations
python manage.py migrate

If the issue persists, please share your updated GitHub repository with us. This will allow us to review your code and provide a more accurate solution.

Share: