-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use sqladmin with sqlalchemy core #831
Comments
Please provide a minimal example with the error of what is happening |
from sqlalchemy import Column, Integer, String, create_engine, Table, MetaData
from fastapi import FastAPI
from sqladmin import Admin, ModelView
engine = create_engine(
"sqlite:///example.db",
connect_args={"check_same_thread": False},
)
metadata = MetaData()
User = Table(
"users",
metadata,
Column("id", Integer, primary_key=True),
Column("name", String),
)
metadata.create_all(engine)
class UserAdmin(ModelView, model=User):
column_list = [User.columns.id, User.columns.name]
app = FastAPI()
admin = Admin(app, engine)
admin.add_view(UserAdmin)
I read sqladmin sources and realized that your code is addicted to orm |
If I change
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checklist
Is your feature related to a problem? Please describe.
I want use sqladmin with sqlalchemy core
Describe the solution you would like.
Looks like we must rewrite many code
Describe alternatives you considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: