Skip to content

Commit

Permalink
added registration templates
Browse files Browse the repository at this point in the history
  • Loading branch information
zecollokaris committed Mar 17, 2021
1 parent 61fdd43 commit 866d204
Show file tree
Hide file tree
Showing 29 changed files with 679 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Success/templates/registration/activate.html
@@ -0,0 +1,18 @@
{% extends "registration/registration_base.html" %}
{% load i18n %}

{% block title %}{% trans "Activation Failure" %}{% endblock %}

{% block content %}
<p>{% trans "Account activation failed." %}</p>
{% endblock %}


{% comment %}
**registration/activate.html**

Used if account activation fails. With the default setup, has the following context:

``activation_key``
The activation key used during the activation attempt.
{% endcomment %}
22 changes: 22 additions & 0 deletions Success/templates/registration/activation_complete.html
@@ -0,0 +1,22 @@
{% extends "registration/registration_base.html" %}
{% load i18n %}

{% block title %}{% trans "Account Activated" %}{% endblock %}

{% block content %}
<p>
{% trans "Your account is now activated." %}
{% if not user.is_authenticated %}
{% trans "You can log in." %}
{% endif %}
</p>
{% endblock %}


{% comment %}
**registration/activation_complete.html**

Used after successful account activation. This template has no context
variables of its own, and should simply inform the user that their
account is now active.
{% endcomment %}
@@ -0,0 +1,22 @@
{% extends "registration/registration_base.html" %}
{% load i18n %}

{% block title %}{% trans "Account Activated" %}{% endblock %}

{% block content %}
<p>
{% trans "Your account is now activated." %}
{% if not user.is_authenticated %}
{% trans "Once a site administrator activates your account you can login." %}
{% endif %}
</p>
{% endblock %}


{% comment %}
**registration/activation_complete.html**

Used after successful account activation. This template has no context
variables of its own, and should simply inform the user that their
account is now active.
{% endcomment %}
72 changes: 72 additions & 0 deletions Success/templates/registration/activation_email.html
@@ -0,0 +1,72 @@
{% load i18n %}
<!doctype html>
<html lang="en">

<head>
<title>{{ site.name }} {% trans "registration" %}</title>
</head>

<body>
<p>
{% blocktrans with site_name=site.name %}
You (or someone pretending to be you) have asked to register an account at
{{ site_name }}. If this wasn't you, please ignore this email
and your address will be removed from our records.
{% endblocktrans %}
</p>
<p>
{% blocktrans %}
To activate this account, please click the following link within the next
{{ expiration_days }} days:
{% endblocktrans %}
</p>

<p>
<a href="http://{{site.domain}}{% url 'registration_activate' activation_key %}">
{{site.domain}}{% url 'registration_activate' activation_key %}
</a>
</p>
<p>
{% blocktrans with site_name=site.name %}
Sincerely,
{{ site_name }} Management
{% endblocktrans %}
</p>
</body>

</html>


{% comment %}
**registration/activation_email.html**

Used to generate the html body of the activation email. Should display a
link the user can click to activate the account. This template has the
following context:

``activation_key``
The activation key for the new account.

``expiration_days``
The number of days remaining during which the account may be
activated.

``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 register URL:

{{ request.scheme }}://{{ request.get_host }}{% url 'registration_activate' activation_key %}
{% endcomment %}
52 changes: 52 additions & 0 deletions Success/templates/registration/activation_email.txt
@@ -0,0 +1,52 @@
{% load i18n %}
{% blocktrans with site_name=site.name %}
You (or someone pretending to be you) have asked to register an account at
{{ site_name }}. If this wasn't you, please ignore this email
and your address will be removed from our records.
{% endblocktrans %}
{% blocktrans %}
To activate this account, please click the following link within the next
{{ expiration_days }} days:
{% endblocktrans %}

http://{{site.domain}}{% url 'registration_activate' activation_key %}

{% blocktrans with site_name=site.name %}
Sincerely,
{{ site_name }} Management
{% endblocktrans %}


{% comment %}
**registration/activation_email.txt**

Used to generate the text body of the activation email. Should display a
link the user can click to activate the account. This template has the
following context:

``activation_key``
The activation key for the new account.

``expiration_days``
The number of days remaining during which the account may be
activated.

``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 register URL:

{{ request.scheme }}://{{ request.get_host }}{% url 'registration_activate' activation_key %}
{% endcomment %}
28 changes: 28 additions & 0 deletions Success/templates/registration/activation_email_subject.txt
@@ -0,0 +1,28 @@
{% load i18n %}{% trans "Account activation on" %} {{ site.name }}


{% comment %}
**registration/activation_email_subject.txt**

Used to generate the subject line of the activation email. Because the
subject line of an email must be a single line of text, any output
from this template will be forcibly condensed to a single line before
being used. This template has the following context:

``activation_key``
The activation key for the new account.

``expiration_days``
The number of days remaining during which the account may be
activated.

``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.
{% endcomment %}
18 changes: 18 additions & 0 deletions Success/templates/registration/admin_approve.html
@@ -0,0 +1,18 @@
{% extends "registration/registration_base.html" %}
{% load i18n %}

{% block title %}{% trans "Approval Failure" %}{% endblock %}

{% block content %}
<p>{% trans "Account Approval failed." %}</p>
{% endblock %}


{% comment %}
**registration/admin_approve.html**

Used if account activation fails. With the default setup, has the following context:

``activation_key``
The activation key used during the activation attempt.
{% endcomment %}
33 changes: 33 additions & 0 deletions Success/templates/registration/admin_approve_complete.html
@@ -0,0 +1,33 @@
{% extends "registration/registration_base.html" %}
{% load i18n %}

{% block title %}{% trans "Account Approved" %}{% endblock %}

{% block content %}
<p>
{% trans "The user's account is now approved." %}
</p>
{% endblock %}


{% comment %}
**registration/admin_approve_complete.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:

``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 %}
27 changes: 27 additions & 0 deletions Success/templates/registration/admin_approve_complete_email.html
@@ -0,0 +1,27 @@
{% load i18n %}
<!doctype html>
<html lang="en">

<head>
<title>{{ site.name }} {% trans "admin approval" %}</title>
</head>

<body>
<p>
{% blocktrans %}
Your account is now approved. You can
{% endblocktrans %}
<a href="http://{{site.domain}}{% url 'auth_login' %}">{% trans "log in." %}</a>
</p>
</body>

</html>


{% comment %}
**registration/admin_approve_complete_email.html**

Used after successful account activation. This template has no context
variables of its own, and should simply inform the user that their
account is now active.
{% endcomment %}
13 changes: 13 additions & 0 deletions Success/templates/registration/admin_approve_complete_email.txt
@@ -0,0 +1,13 @@
{% load i18n %}
{% blocktrans %}
Your account is now approved. You can log in using the following link
{% endblocktrans %}
http://{{site.domain}}{% url 'auth_login' %}

{% comment %}
**registration/admin_approve_complete_email.txt**

Used after successful account activation. This template has no context
variables of its own, and should simply inform the user that their
account is now active.
{% endcomment %}
@@ -0,0 +1,21 @@
{% load i18n %}{% trans "Account activation on" %} {{ site.name }}


{% comment %}
**registration/admin_approve_complete_email_subject.txt**

Used to generate the subject line of the admin approval complete email. Because
the subject line of an email must be a single line of text, any output
from this template will be forcibly condensed to a single line before
being used. 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.
{% endcomment %}
60 changes: 60 additions & 0 deletions Success/templates/registration/admin_approve_email.html
@@ -0,0 +1,60 @@
{% load i18n %}
<!doctype html>
<html lang="en">

<head>
<title>{{ site.name }} {% trans "registration" %}</title>
</head>

<body>
<p>
{% blocktrans with site_name=site.name %}
The following user ({{ user }}) has asked to register an account at
{{ site_name }}.
{% endblocktrans %}
</p>
<p>
{% blocktrans %}
To approve this, please
{% endblocktrans %}
<a href="http://{{site.domain}}{% url 'registration_admin_approve' profile_id %}"> {% trans "click here" %}</a>.
</p>
<p>
{% blocktrans with site_name=site.name %}
Sincerely,
{{ site_name }} Management
{% endblocktrans %}
</p>
</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 866d204

Please sign in to comment.