Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #14712 - Add an example for the post_syncdb signal. Thanks Fran…

…k Wiles for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15104 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 12266059cd28db0fdc19cdd209dcf2a801817dd0 1 parent ec38c88
@timgraham timgraham authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 docs/ref/signals.txt
View
11 docs/ref/signals.txt
@@ -378,6 +378,17 @@ Arguments sent with this signal:
For example, the :mod:`django.contrib.auth` app only prompts to create a
superuser when ``interactive`` is ``True``.
+For example, yourapp/signals/__init__.py could be written like::
+
+ from django.db.models.signals import post_syncdb
+ import yourapp.models
+
+ def my_callback(sender, **kwargs):
+ # Your specific logic here
+ pass
+
+ post_syncdb.connect(my_callback, sender=yourapp.models)
+
Request/response signals
========================
Please sign in to comment.
Something went wrong with that request. Please try again.