Skip to content

Commit

Permalink
Merge 2e41524 into 21195f5
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblum committed Nov 12, 2018
2 parents 21195f5 + 2e41524 commit 23c77a8
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 3 deletions.
20 changes: 17 additions & 3 deletions registration/templates/registration/admin_approve_complete.html
Expand Up @@ -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
<http://docs.djangoproject.com/en/dev/ref/contrib/sites/>`_ for
details regarding these objects' interfaces.

``user``
The new user account

{% endcomment %}
30 changes: 30 additions & 0 deletions registration/templates/registration/admin_approve_email.html
Expand Up @@ -28,3 +28,33 @@
</body>

</html>

{% 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
<http://docs.djangoproject.com/en/dev/ref/contrib/sites/>`_ 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 %}

0 comments on commit 23c77a8

Please sign in to comment.