跳至內容
選單
此問題已被標幟
1 回覆
7227 瀏覽次數

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?

相關帖文 回覆 瀏覽次數 活動
0
2月 25
1224
2
11月 24
5777
2
10月 24
2898
2
8月 24
1694
3
7月 24
7994