File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,10 @@ in DATABASES control the behavior of the backend:
7474 Boolean. Set this to ` False ` if you want to disable
7575 Django's transaction management and implement your own.
7676
77+ - Trusted_Connection
78+
79+ String. Default is ` "yes" ` . Can be set to ` "no" ` if required.
80+
7781and the following entries are also available in the ` TEST ` dictionary
7882for any given database-level settings dictionary:
7983
Original file line number Diff line number Diff line change @@ -249,6 +249,7 @@ def get_new_connection(self, conn_params):
249249 user = conn_params .get ('USER' , None )
250250 password = conn_params .get ('PASSWORD' , None )
251251 port = conn_params .get ('PORT' , None )
252+ trusted_connection = conn_params .get ('Trusted_Connection' , 'yes' )
252253
253254 options = conn_params .get ('OPTIONS' , {})
254255 driver = options .get ('driver' , 'ODBC Driver 13 for SQL Server' )
@@ -290,7 +291,7 @@ def get_new_connection(self, conn_params):
290291 cstr_parts ['PWD' ] = password
291292 else :
292293 if ms_drivers .match (driver ):
293- cstr_parts ['Trusted_Connection' ] = 'yes'
294+ cstr_parts ['Trusted_Connection' ] = trusted_connection
294295 else :
295296 cstr_parts ['Integrated Security' ] = 'SSPI'
296297
You can’t perform that action at this time.
0 commit comments