Skip to content

Commit 5295d67

Browse files
committed
[1.2.X] Fixed #14054 -- Added documentation for the connection_created event. Thanks to Rob Hudson for the report and patch.
Backport of r13673 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13675 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 62355d8 commit 5295d67

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
@@ -436,3 +436,39 @@ Arguments sent with this signal:
436436
context
437437
The :class:`~django.template.Context` with which the template was
438438
rendered.
439+
440+
Database Wrappers
441+
=================
442+
443+
.. module:: django.db.backends
444+
:synopsis: Core signals sent by the database wrapper.
445+
446+
Signals sent by the database wrapper when a database connection is
447+
initiated.
448+
449+
connection_created
450+
------------------
451+
452+
.. data:: django.db.backends.signals.connection_created
453+
:module:
454+
455+
.. versionadded:: 1.1
456+
457+
.. versionchanged:: 1.2
458+
The connection argument was added
459+
460+
Sent when the database wrapper makes the initial connection to the
461+
database. This is particularly useful if you'd like to send any post
462+
connection commands to the SQL backend.
463+
464+
Arguments sent with this signal:
465+
466+
sender
467+
The database wrapper class -- i.e.
468+
:class: `django.db.backends.postgresql_psycopg2.DatabaseWrapper` or
469+
:class: `django.db.backends.mysql.DatabaseWrapper`, etc.
470+
471+
connection
472+
The database connection that was opened. This can be used in a
473+
multiple-database configuration to differentiate connection signals
474+
from different databases.

0 commit comments

Comments
 (0)