MCPcopy
hub / github.com/django/django / _configure_connection

Method _configure_connection

django/db/backends/postgresql/base.py:381–392  ·  view source on GitHub ↗
(self, connection)

Source from the content-addressed store, hash-verified

379 return False
380
381 def _configure_connection(self, connection):
382 # This function is called from init_connection_state and from the
383 # psycopg pool itself after a connection is opened.
384
385 # Commit after setting the time zone.
386 commit_tz = self._configure_timezone(connection)
387 # Set the role on the connection. This is useful if the credential used
388 # to login is not the same as the role that owns database resources. As
389 # can be the case when using temporary or ephemeral credentials.
390 commit_role = self._configure_role(connection)
391
392 return commit_role or commit_tz
393
394 def _close(self):
395 if self.connection is not None:

Calls 2

_configure_timezoneMethod · 0.95
_configure_roleMethod · 0.95