How Do I Fix the errors in Django Models? [duplicate]

I am trying to create models in Django, but when I go to the admin page and click into the models, it gives me an error.

Please see my code in python below.

I also had problems when I was trying to make migrations, but it worked in the end, and in my admin panel. I could see the two models I created, but when I click into any of them, I got an error page.

models.py

from django.db import models
from datetime import datetime
import uuid


# Create your models here.
class ProductType(models.Model):
    Type_Name = models.CharField(max_length=200)
    id = models.UUIDField(default=uuid.uuid4, unique=True, primary_key=True, editable=False)

    def __str__(self):
        return self.Type_Name


class ProductItem(models.Model):
    product_title = models.CharField(max_length=500, default="Product Name")
    product_type = models.ForeignKey('ProductType', on_delete=models.CASCADE)
    product_size = models.CharField(max_length=500, default="Product Size")
    product_finish = models.CharField(max_length=500, default="Product Finish")
    date = models.DateField(default=datetime.now, blank=False)
    quantity = models.IntegerField(default=0)
    unit_cost = models.DecimalField(max_digits=10, decimal_places=2, default=0.00)
    unit_price = models.DecimalField(max_digits=10, decimal_places=2, default=0.00)
    reorder_quantity = models.IntegerField(default=0)
    reorder_date = models.DateField(default=datetime.now, blank=False)
    image = models.ImageField(null=True, blank=True, default='404-img.png')
    id = models.UUIDField(default=uuid.uuid4, unique=True, primary_key=True, editable=False)


    def __str__(self):
        return self.product_title

admin.py

from django.contrib import admin
from .models import ProductItem, ProductType

# Register your models here.
admin.site.register(ProductItem)
admin.site.register(ProductType)
models.py

from django.db import models
from datetime import datetime
import uuid


# Create your models here.
class ProductType(models.Model):
    Type_Name = models.CharField(max_length=200)
    id = models.UUIDField(default=uuid.uuid4, unique=True, primary_key=True, editable=False)

    def __str__(self):
        return self.Type_Name


class ProductItem(models.Model):
    product_title = models.CharField(max_length=500, default="Product Name")
    product_type = models.ForeignKey('ProductType', on_delete=models.CASCADE)
    product_size = models.CharField(max_length=500, default="Product Size")
    product_finish = models.CharField(max_length=500, default="Product Finish")
    date = models.DateField(default=datetime.now, blank=False)
    quantity = models.IntegerField(default=0)
    unit_cost = models.DecimalField(max_digits=10, decimal_places=2, default=0.00)
    unit_price = models.DecimalField(max_digits=10, decimal_places=2, default=0.00)
    reorder_quantity = models.IntegerField(default=0)
    reorder_date = models.DateField(default=datetime.now, blank=False)
    image = models.ImageField(null=True, blank=True, default='404-img.png')
    id = models.UUIDField(default=uuid.uuid4, unique=True, primary_key=True, editable=False)


    def __str__(self):
        return self.product_title

admin.py

from django.contrib import admin
from .models import ProductItem, ProductType

# Register your models here.
admin.site.register(ProductItem)
admin.site.register(ProductType)

enter image description here

After I click in.

enter image description here

Back to Top