From b0f4d50aac982444ba9f08e12a7e44c7b0b85ec7 Mon Sep 17 00:00:00 2001 From: Liam Brenner Date: Tue, 5 Jan 2016 10:17:48 +1100 Subject: [PATCH] Minor documentation fixes for signal handlers --- docs/reference/signals.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/reference/signals.rst b/docs/reference/signals.rst index a3b68e62be..7ad0434589 100644 --- a/docs/reference/signals.rst +++ b/docs/reference/signals.rst @@ -29,13 +29,13 @@ example showing how you might notify your team when something is published: .. code-block:: python - from wagtailcore.signals import page_published + from wagtail.wagtailcore.signals import page_published import urllib import urllib2 # Let everyone know when a new page is published - def send_to_slack(sender, **kwargs) + def send_to_slack(sender, **kwargs): instance = kwargs['instance'] url = 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX' values = { @@ -62,7 +62,7 @@ wish to do something when a new blog post is published: .. code-block:: python - from wagtailcore.signals import page_published + from wagtail.wagtailcore.signals import page_published from mysite.models import BlogPostPage # Do something clever for each model type @@ -85,4 +85,4 @@ This signal is emitted from a ``Page`` when the page is unpublished. :sender: The page ``class`` :instance: The specific ``Page`` instance. -:kwargs: Any other arguments passed to ``page_unpublished.send()`` \ No newline at end of file +:kwargs: Any other arguments passed to ``page_unpublished.send()``