From 2e41524b34c1f2e42d796309968af80ea27d4b5d Mon Sep 17 00:00:00 2001 From: Joshua Blum Date: Mon, 12 Nov 2018 13:41:30 -0500 Subject: [PATCH] document admin approval emails --- .../registration/admin_approve_complete.html | 20 +++++++++++-- .../registration/admin_approve_email.html | 30 +++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/registration/templates/registration/admin_approve_complete.html b/registration/templates/registration/admin_approve_complete.html index 17ab4345..f4ad8704 100644 --- a/registration/templates/registration/admin_approve_complete.html +++ b/registration/templates/registration/admin_approve_complete.html @@ -13,7 +13,21 @@ {% comment %} **registration/admin_approve_complete.html** -Used after admin successfully approves a user's account. This template has no context -variables of its own, and should simply inform the admin that the user's -account is now active. +Used to generate the html body of the admin activation email. Should display a +link for an admin to approve activation of the account. This template has the +following context: + +``site`` + An object representing the site on which the user registered; + depending on whether ``django.contrib.sites`` is installed, this + may be an instance of either ``django.contrib.sites.models.Site`` + (if the sites application is installed) or + ``django.contrib.sites.requests.RequestSite`` (if not). Consult `the + documentation for the Django sites framework + `_ for + details regarding these objects' interfaces. + +``user`` + The new user account + {% endcomment %} diff --git a/registration/templates/registration/admin_approve_email.html b/registration/templates/registration/admin_approve_email.html index a2f3caef..5a4e36b2 100644 --- a/registration/templates/registration/admin_approve_email.html +++ b/registration/templates/registration/admin_approve_email.html @@ -28,3 +28,33 @@ + +{% comment %} +**registration/admin_approve_email.html** + +Used to generate the html body of the admin activation email. Should display a +link for an admin to approve activation of the account. This template has the +following context: + +``profile_id`` + The id of the registration profile requesting approval + +``site`` + An object representing the site on which the user registered; + depending on whether ``django.contrib.sites`` is installed, this + may be an instance of either ``django.contrib.sites.models.Site`` + (if the sites application is installed) or + ``django.contrib.sites.requests.RequestSite`` (if not). Consult `the + documentation for the Django sites framework + `_ for + details regarding these objects' interfaces. + +``user`` + The new user account + +``request`` + ``HttpRequest`` instance for better flexibility. + For example it can be used to compute absolute approval URL: + + {{ request.scheme }}://{{ request.get_host }}{% url 'registration_admin_approve' profile_id %} +{% endcomment %}