Author: timo
Date: 2010-12-29 09:47:46 -0600 (Wed, 29 Dec 2010)
New Revision: 15104

Modified:
   django/trunk/docs/ref/signals.txt
Log:
Fixed #14712 - Add an example for the post_syncdb signal. Thanks Frank Wiles 
for the patch.

Modified: django/trunk/docs/ref/signals.txt
===================================================================
--- django/trunk/docs/ref/signals.txt   2010-12-29 15:39:44 UTC (rev 15103)
+++ django/trunk/docs/ref/signals.txt   2010-12-29 15:47:46 UTC (rev 15104)
@@ -378,6 +378,17 @@
         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
 ========================
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to