Skip to content

Commit bb79b01

Browse files
committed
Fixed #14054 -- Added documentation for the connection_created event. Thanks to Rob Hudson for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 6909c22 commit bb79b01

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

docs/ref/signals.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,3 +454,39 @@ Arguments sent with this signal:
454454
context
455455
The :class:`~django.template.Context` with which the template was
456456
rendered.
457+
458+
Database Wrappers
459+
=================
460+
461+
.. module:: django.db.backends
462+
:synopsis: Core signals sent by the database wrapper.
463+
464+
Signals sent by the database wrapper when a database connection is
465+
initiated.
466+
467+
connection_created
468+
------------------
469+
470+
.. data:: django.db.backends.signals.connection_created
471+
:module:
472+
473+
.. versionadded:: 1.1
474+
475+
.. versionchanged:: 1.2
476+
The connection argument was added
477+
478+
Sent when the database wrapper makes the initial connection to the
479+
database. This is particularly useful if you'd like to send any post
480+
connection commands to the SQL backend.
481+
482+
Arguments sent with this signal:
483+
484+
sender
485+
The database wrapper class -- i.e.
486+
:class: `django.db.backends.postgresql_psycopg2.DatabaseWrapper` or
487+
:class: `django.db.backends.mysql.DatabaseWrapper`, etc.
488+
489+
connection
490+
The database connection that was opened. This can be used in a
491+
multiple-database configuration to differentiate connection signals
492+
from different databases.

0 commit comments

Comments
 (0)