تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
7317 أدوات العرض

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
يوليو 25
1362
2
نوفمبر 24
6078
2
أكتوبر 24
3086
2
أغسطس 24
1804
3
يوليو 24
8165