Thanks for awesome work on Flask-Admin.
I believe there is error/bug in actual app. With model and admin:
from sqlalchemy.dialects.postgresql.base import UUID
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
db.UUID = UUID
class ProductType(db.Model):
id = db.Column(db.UUID, default=uuid.uuid4, primary_key=True)
description = db.Column(db.String(50), nullable=False)
admin.add_view(ModelView(ProductType, db.session))
When we create new ProductType we got error:
Failed to create record. (builtins.AttributeError) 'UUID' object has no attribute 'replace' [SQL: 'INSERT INTO product_type (id, description) VALUES (%(id)s, %(description)s)'] [parameters: [{'description': 'test'}]]

I can create failing TestCase PR for that, so it could be maybe patched?
This was issue on my side. Note for everyone in future.
Model should be
class ProductType(db.Model):
id = db.Column(db.UUID(as_uuid=True), default=uuid.uuid4, primary_key=True)
description = db.Column(db.String(50), nullable=False)
this argument as_uuid is really important (db.UUID(as_uuid=True)).
What is uuid in :
default=uuid.uuid4 ?
you have to import it- import uuid
Most helpful comment
This was issue on my side. Note for everyone in future.
Model should be
this argument as_uuid is really important (
db.UUID(as_uuid=True)).