I'm trying to add new product details on product table. But whenever I try to save this it's show me
OperationalError at /admin/products/product/add/
*Here are errors detail: * Environment:
Request Method: POST Request URL: http://127.0.0.1:8000/admin/products/product/add/
Exception Type: OperationalError at /admin/products/product/add/ Exception Value: no such table: main.auth_user__old
This is model
from django.db import models
class Product(models.Model):
name = models.CharField(max_length=255)
price = models.FloatField()
stock = models.IntegerField()
image_url = models.CharField(max_length=2088)
class Offer(models.Model):
code = models.CharField(max_length=10)
description = models.CharField(max_length=255)
discount = models.FloatField()
admin
from django.contrib import admin
from .models import Product
admin.site.register(Product)