Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
7023 มุมมอง

How to fetch current logged in database name at server side in particular class??

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

The database cursor should have it. Try:

cr.dbname
อวตาร
ละทิ้ง
ผู้เขียน

but for that i have to inherit osv and the place(http_server.py) where i need dbname is already implemented class and used in many classes,,,so if i am trying to inherit osv.osv then it gives me::TypeError: Error when calling the metaclass bases

Could you edit your post to include more context? Paste some code and such.

ผู้เขียน

Hello Allison,,thank you so much for your reply but i have done what i want, i have fetched db_name from tools.config['db_name']....Thanxxx

Hello Nirav, I use db_name=tools.config['db_name'] but the return value is False. could you please tell me how?

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.พ. 25
875
2
พ.ย. 24
5084
2
ต.ค. 24
2212
2
ส.ค. 24
1384
3
ก.ค. 24
7677