Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
7341 Näkymät

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

Avatar
Hylkää
Paras vastaus

The database cursor should have it. Try:

cr.dbname
Avatar
Hylkää
Tekijä

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.

Tekijä

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?

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
heinäk. 25
1419
2
marrask. 24
6211
2
lokak. 24
3159
2
elok. 24
1833
3
heinäk. 24
8230