Skip to content
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

How can i print sql with register_tortoise() in fastapi? #1553

Open
zyk-miao opened this issue Feb 1, 2024 · 3 comments
Open

How can i print sql with register_tortoise() in fastapi? #1553

zyk-miao opened this issue Feb 1, 2024 · 3 comments

Comments

@zyk-miao
Copy link

zyk-miao commented Feb 1, 2024

How can i print sql with register_tortoise() in fastapi?

@qingshuiyuyu
Copy link

i want know too ~i have to use another script to insert my admin user 这个框架太难用了吧,一堆bug,现在想写测试用例,死活跑不起来,最骚的是官方给的例子跑不起来,真难顶

@qingshuiyuyu
Copy link

qingshuiyuyu commented May 7, 2024

ok,maybe you can look this page https://github.com/tortoise/tortoise-orm/issues/1576
if use it init admin

@fullonic
Copy link
Contributor

fullonic commented May 7, 2024

How can i print sql with register_tortoise() in fastapi?

Hey @zyk-miao! What is your final goal? Would you like to know what SQL has been generated? If is that, you can change your logs. See it here https://tortoise.github.io/logging.html?h=log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants