amisadmin / fastapi-amis-admin

FastAPI-Amis-Admin is a high-performance, efficient and easily extensible FastAPI admin framework. Inspired by django-admin, and has as many powerful functions as django-admin.
http://docs.amis.work
Apache License 2.0
979 stars 144 forks source link

Raise not implemented error for CHAR(36) column type #135

Open BhuwanPandey opened 9 months ago

BhuwanPandey commented 9 months ago

Hy there,

I had used [fastapi-users-db-sqlalchemy] package for user model setup. Column type of id for user model is chat(36). For admin panel setup i have used this package but this raise not implementation error.

Error raise from crud/parsers.py file on lineno:355 ( type_ = expression.type.python_type )

  if isinstance(expression.type, String):
        field_info_kwargs["max_length"] = expression.type.length
    if "default_factory" not in field_info_kwargs:
        field_info_kwargs["default"] = default

    type_ = expression.type.python_type

    if PYDANTIC_V2:
        field_info_kwargs["annotation"] = type_
    return create_response_field(

Tools that i used

SQLAlchemy 2.0.0 fastapi-users 10.4.1 fastapi-users-db-sqlalchemy 5.0.0 psycopg2 2.9.5 fastapi 0.103.2

MatsiukMykola commented 9 months ago

sqlalchemy = "1.4.41"

work perfectly, maybe issue there, because sqlmodel not support sqlalchemy 2 at this moment