I get this error when I add a something to the text field.I'm trying to create a project where someone can enter random messages.
OperationalError at /admin/submit/submit/add/
no such table: main.auth_user__old
Request Method: POST
Request URL: http://127.0.0.1:8000/admin/submit/submit/add/
Django Version: 2.1
Exception Type: OperationalError
Exception Value:
no such table: main.auth_user__old
Exception Location: D:\Anaconda1\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 296
Python Executable: D:\Anaconda1\python.exe
Python Version: 3.8.3
Python Path:
['D:\\PyProjects\\Website',
'D:\\Anaconda1\\python38.zip',
'D:\\Anaconda1\\DLLs',
'D:\\Anaconda1\\lib',
'D:\\Anaconda1',
'C:\\Users\\heman\\AppData\\Roaming\\Python\\Python38\\site-packages',
'D:\\Anaconda1\\lib\\site-packages',
'D:\\Anaconda1\\lib\\site-packages\\win32',
'D:\\Anaconda1\\lib\\site-packages\\win32\\lib',
'D:\\Anaconda1\\lib\\site-packages\\Pythonwin']
Server time: Mon, 5 Oct 2020 17:19:26 +000
This is my models.py
from django.db import models
# Create your models here.
class Submit(models.Model):
title = models.TextField(max_length=140, default='SOME STRING')
status = models.TextField(max_length=140, default='SOME STRING')
description = models.TextField(max_length=140, default='SOME STRING')
Here is my setting.py installed apps
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'submit.apps.SubmitConfig',
]
Here is my apps.py
from django.apps import AppConfig
class SubmitConfig(AppConfig):
name = 'submit'
Here is my admin.py
from django.contrib import admin
from .models import Submit
# Register your models here.
admin.site.register(Submit)
I also ran python manage.py makemigrations and python manage.py migrate Please help me...Thanks in advance