From 466a911e54faae0be5f1411c92b36a18c8eb9b04 Mon Sep 17 00:00:00 2001 From: LB Johnston Date: Tue, 4 Oct 2022 13:59:57 +1000 Subject: [PATCH] update documentation examples got user hooks --- docs/reference/hooks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/hooks.md b/docs/reference/hooks.md index 5d06a3125d..86caea787a 100644 --- a/docs/reference/hooks.md +++ b/docs/reference/hooks.md @@ -835,7 +835,7 @@ from django.http import HttpResponse from wagtail import hooks @hooks.register('after_create_user') -def do_after_page_create(request, user): +def do_after_create_user(request, user): return HttpResponse("Congrats on creating a new user!", content_type="text/plain") ``` @@ -860,7 +860,7 @@ from .models import AwesomePage from .admin_views import edit_awesome_page @hooks.register('before_create_user') -def before_create_page(request): +def do_before_create_user(request): return HttpResponse("A user creation form", content_type="text/plain") ```