bugfix
This commit is contained in:
parent
bc883e3b86
commit
ca8fcbdca9
@ -28,6 +28,7 @@ from appPublic.unicoding import unicoding,uDict,uObject
|
||||
from appPublic.Singleton import SingletonDecorator
|
||||
from appPublic.rc4 import password
|
||||
from appPublic.registerfunction import RegisterFunction
|
||||
from appPublic.httpclient import HttpClient
|
||||
|
||||
from sqlor.dbpools import DBPools,runSQL,runSQLPaging
|
||||
from sqlor.filter import DBFilter, default_filterjson
|
||||
@ -41,6 +42,12 @@ from .filetest import current_fileno
|
||||
from .filestorage import FileStorage
|
||||
from .serverenv import ServerEnv
|
||||
|
||||
def basic_auth_headers(user, passwd):
|
||||
ba = BasicAuth(login=user, password=passwd)
|
||||
return {
|
||||
"Authorization":ba.encode()
|
||||
}
|
||||
|
||||
def data2xlsx(rows,headers=None):
|
||||
wb = Workbook()
|
||||
ws = wb.active
|
||||
@ -211,6 +218,8 @@ def initEnv():
|
||||
g.save_file = save_file
|
||||
g.realpath = realpath
|
||||
g.format_exc = format_exc
|
||||
g.basic_auth_headers = basic_auth_headers
|
||||
g.HttpClient = HttpClient
|
||||
g.rfexe = RegisterFunction().exe
|
||||
|
||||
def set_builtins():
|
||||
|
Loading…
Reference in New Issue
Block a user