Coder Social home page Coder Social logo

SQLModel support about sqladmin HOT 8 CLOSED

aminalaee avatar aminalaee commented on July 22, 2024 4
SQLModel support

from sqladmin.

Comments (8)

JonasKs avatar JonasKs commented on July 22, 2024 1

Thank you! Looking forward to it!

from sqladmin.

aminalaee avatar aminalaee commented on July 22, 2024 1

Honestly I haven't taken a deep look into it, but yeah maybe something like that will do it.

What I suggest is to split that into multiple PRs, so my first attempt would be to just make it work with SQLModel because right now the field conversion fails.
Then we. can work on it and improve the validations.
Even in that, if any PR will be big we can split it into parts.

If needed, I wish to provide some contribution to it.

That would be more than welcome, feel free to go for it 👍

from sqladmin.

aminalaee avatar aminalaee commented on July 22, 2024 1

Hey @EZhivaikin ,
Yes ideally I think SQLAdmin should work with SQLModel, but as far as I saw we only need to defined the converters for creating wtform field validators in SQLModel.

And yes, all sorts of contributions are welcome, please do create a PR for it 👍

As for other improvements, my initial goal is to support the flask-admin features, there are still some of them missing here. So what I suggest is that if you want/can help with anything first let's create an issue and then do the PRs. How does that sound?

from sqladmin.

aminalaee avatar aminalaee commented on July 22, 2024 1

I've created a PR to add SQLModel support in SQLAdmin. It would be appreciated if anyone could take a look.

from sqladmin.

aminalaee avatar aminalaee commented on July 22, 2024

Thanks a lot for the suggestion 👍

from sqladmin.

ischaojie avatar ischaojie commented on July 22, 2024

Awesome! SQLModel use pydantic for type annotation, that is better for model convert to forms, for example,

name: str = Field(max_length=12)
age: int = Field(ge=0, le=100)

We can auto-add validators( like validators.Length()) for name and age fields in wtforms Forms.

If needed, I wish to provide some contribution to it.

from sqladmin.

EZhivaikin avatar EZhivaikin commented on July 22, 2024

Hi! Do you want to add fully support of sqlmodel? I just have done some "tweaks" to make it work in my current project, and can make a PR. By the way, if there is some requirements, I would try to help

from sqladmin.

EZhivaikin avatar EZhivaikin commented on July 22, 2024

Sounds great, I'll try to do this all asap 😃

from sqladmin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.