From 38d3a02fd03d5302e277e377004bd2cbcf814e23 Mon Sep 17 00:00:00 2001
From: Dan Frankowski
Date: Thu, 28 Feb 2019 11:11:50 -0600
Subject: [PATCH 01/13] update location for django-registration 3.0
---
.../templates/{registration => django_registration}/activate.html | 0
.../activation_complete.html | 0
.../{registration => django_registration}/activation_email.html | 0
.../{registration => django_registration}/activation_email.txt | 0
.../activation_email_subject.txt | 0
.../templates/{registration => django_registration}/login.html | 0
.../templates/{registration => django_registration}/logout.html | 0
.../password_change_done.html | 0
.../password_change_form.html | 0
.../password_reset_complete.html | 0
.../password_reset_confirm.html | 0
.../password_reset_done.html | 0
.../password_reset_email.html | 0
.../password_reset_form.html | 0
.../{registration => django_registration}/registration_base.html | 0
.../registration_complete.html | 0
.../{registration => django_registration}/registration_form.html | 0
17 files changed, 0 insertions(+), 0 deletions(-)
rename registration_defaults/templates/{registration => django_registration}/activate.html (100%)
rename registration_defaults/templates/{registration => django_registration}/activation_complete.html (100%)
rename registration_defaults/templates/{registration => django_registration}/activation_email.html (100%)
rename registration_defaults/templates/{registration => django_registration}/activation_email.txt (100%)
rename registration_defaults/templates/{registration => django_registration}/activation_email_subject.txt (100%)
rename registration_defaults/templates/{registration => django_registration}/login.html (100%)
rename registration_defaults/templates/{registration => django_registration}/logout.html (100%)
rename registration_defaults/templates/{registration => django_registration}/password_change_done.html (100%)
rename registration_defaults/templates/{registration => django_registration}/password_change_form.html (100%)
rename registration_defaults/templates/{registration => django_registration}/password_reset_complete.html (100%)
rename registration_defaults/templates/{registration => django_registration}/password_reset_confirm.html (100%)
rename registration_defaults/templates/{registration => django_registration}/password_reset_done.html (100%)
rename registration_defaults/templates/{registration => django_registration}/password_reset_email.html (100%)
rename registration_defaults/templates/{registration => django_registration}/password_reset_form.html (100%)
rename registration_defaults/templates/{registration => django_registration}/registration_base.html (100%)
rename registration_defaults/templates/{registration => django_registration}/registration_complete.html (100%)
rename registration_defaults/templates/{registration => django_registration}/registration_form.html (100%)
diff --git a/registration_defaults/templates/registration/activate.html b/registration_defaults/templates/django_registration/activate.html
similarity index 100%
rename from registration_defaults/templates/registration/activate.html
rename to registration_defaults/templates/django_registration/activate.html
diff --git a/registration_defaults/templates/registration/activation_complete.html b/registration_defaults/templates/django_registration/activation_complete.html
similarity index 100%
rename from registration_defaults/templates/registration/activation_complete.html
rename to registration_defaults/templates/django_registration/activation_complete.html
diff --git a/registration_defaults/templates/registration/activation_email.html b/registration_defaults/templates/django_registration/activation_email.html
similarity index 100%
rename from registration_defaults/templates/registration/activation_email.html
rename to registration_defaults/templates/django_registration/activation_email.html
diff --git a/registration_defaults/templates/registration/activation_email.txt b/registration_defaults/templates/django_registration/activation_email.txt
similarity index 100%
rename from registration_defaults/templates/registration/activation_email.txt
rename to registration_defaults/templates/django_registration/activation_email.txt
diff --git a/registration_defaults/templates/registration/activation_email_subject.txt b/registration_defaults/templates/django_registration/activation_email_subject.txt
similarity index 100%
rename from registration_defaults/templates/registration/activation_email_subject.txt
rename to registration_defaults/templates/django_registration/activation_email_subject.txt
diff --git a/registration_defaults/templates/registration/login.html b/registration_defaults/templates/django_registration/login.html
similarity index 100%
rename from registration_defaults/templates/registration/login.html
rename to registration_defaults/templates/django_registration/login.html
diff --git a/registration_defaults/templates/registration/logout.html b/registration_defaults/templates/django_registration/logout.html
similarity index 100%
rename from registration_defaults/templates/registration/logout.html
rename to registration_defaults/templates/django_registration/logout.html
diff --git a/registration_defaults/templates/registration/password_change_done.html b/registration_defaults/templates/django_registration/password_change_done.html
similarity index 100%
rename from registration_defaults/templates/registration/password_change_done.html
rename to registration_defaults/templates/django_registration/password_change_done.html
diff --git a/registration_defaults/templates/registration/password_change_form.html b/registration_defaults/templates/django_registration/password_change_form.html
similarity index 100%
rename from registration_defaults/templates/registration/password_change_form.html
rename to registration_defaults/templates/django_registration/password_change_form.html
diff --git a/registration_defaults/templates/registration/password_reset_complete.html b/registration_defaults/templates/django_registration/password_reset_complete.html
similarity index 100%
rename from registration_defaults/templates/registration/password_reset_complete.html
rename to registration_defaults/templates/django_registration/password_reset_complete.html
diff --git a/registration_defaults/templates/registration/password_reset_confirm.html b/registration_defaults/templates/django_registration/password_reset_confirm.html
similarity index 100%
rename from registration_defaults/templates/registration/password_reset_confirm.html
rename to registration_defaults/templates/django_registration/password_reset_confirm.html
diff --git a/registration_defaults/templates/registration/password_reset_done.html b/registration_defaults/templates/django_registration/password_reset_done.html
similarity index 100%
rename from registration_defaults/templates/registration/password_reset_done.html
rename to registration_defaults/templates/django_registration/password_reset_done.html
diff --git a/registration_defaults/templates/registration/password_reset_email.html b/registration_defaults/templates/django_registration/password_reset_email.html
similarity index 100%
rename from registration_defaults/templates/registration/password_reset_email.html
rename to registration_defaults/templates/django_registration/password_reset_email.html
diff --git a/registration_defaults/templates/registration/password_reset_form.html b/registration_defaults/templates/django_registration/password_reset_form.html
similarity index 100%
rename from registration_defaults/templates/registration/password_reset_form.html
rename to registration_defaults/templates/django_registration/password_reset_form.html
diff --git a/registration_defaults/templates/registration/registration_base.html b/registration_defaults/templates/django_registration/registration_base.html
similarity index 100%
rename from registration_defaults/templates/registration/registration_base.html
rename to registration_defaults/templates/django_registration/registration_base.html
diff --git a/registration_defaults/templates/registration/registration_complete.html b/registration_defaults/templates/django_registration/registration_complete.html
similarity index 100%
rename from registration_defaults/templates/registration/registration_complete.html
rename to registration_defaults/templates/django_registration/registration_complete.html
diff --git a/registration_defaults/templates/registration/registration_form.html b/registration_defaults/templates/django_registration/registration_form.html
similarity index 100%
rename from registration_defaults/templates/registration/registration_form.html
rename to registration_defaults/templates/django_registration/registration_form.html
From 9f2efbe6c9e14e27493dd2d5bef6d2cbde5af4fc Mon Sep 17 00:00:00 2001
From: Dan Frankowski
Date: Thu, 28 Feb 2019 11:18:48 -0600
Subject: [PATCH 02/13] try more fixing
---
README.rst | 10 +++++-----
setup.py | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/README.rst b/README.rst
index 97dc2c4..6666289 100644
--- a/README.rst
+++ b/README.rst
@@ -1,7 +1,7 @@
django-registration-defaults
============================
-James Bennet's `django-registration `_
+James Bennet's `django-registration `_
is awesome. But it doesn't come with any of the 15 templates required to
implement the workflow of registration, login/logout, and password changing and
resetting. This application simply provides a set of default templates for
@@ -53,7 +53,7 @@ You can add the templates in one of two ways:
"registration_defaults",
"django.contrib.admin",
...
- "registration",
+ "django_registration",
)
2. Alternatively, if ``django.template.loaders.filesystem.Loader`` is
@@ -73,16 +73,16 @@ Base templates
~~~~~~~~~~~~~~
All ``registration_defaults`` templates inherit from
-``registration/registration_base.html``. The default template provided for
+``django_registration/registration_base.html``. The default template provided for
this is simply::
{% extends "base.html" %}
You must either provide a ``base.html`` for the registration templates to
-inherit from, or override ``registration/registration_base.html``. The base
+inherit from, or override ``django_registration/registration_base.html``. The base
template should provide a ``title`` block for the content of the HTML title,
and a ``content`` block for content (NOTE: this has changed from previously
-using ``body`` to be more in line with `reusable app standards
+using ``body`` to be more in line with `reusable app standards
`_ ). For example::
diff --git a/setup.py b/setup.py
index 018edc4..51390a0 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
from distutils.core import setup
-VERSION = '0.4.4'
+VERSION = '0.4.5'
setup(
name='django-registration-defaults',
@@ -13,7 +13,7 @@
" on ``django-registration``.",
author="Charlie DeTar",
author_email="cfd@media.mit.edu",
- url="http://github.com/yourcelf/django-registration-defaults",
+ url="http://github.com/dfrankow/django-registration-defaults",
license="MIT License",
platforms=["any"],
classifiers=[
@@ -26,8 +26,8 @@
"Framework :: Django",
],
install_requires=[
- 'Django>=1.5',
- 'django-registration>=1.0',
+ 'Django>=2.1',
+ 'django-registration>=3.0',
],
packages=['registration_defaults'],
package_dir={'registration_defaults': 'registration_defaults'},
From a050e4c2a7504fbc3a4840c9ba5328ea337c1cba Mon Sep 17 00:00:00 2001
From: Dan Frankowski
Date: Thu, 28 Feb 2019 11:25:57 -0600
Subject: [PATCH 03/13] rename registration
---
.../templates/django_registration/activate.html | 2 +-
.../templates/django_registration/activation_complete.html | 2 +-
registration_defaults/templates/django_registration/login.html | 2 +-
registration_defaults/templates/django_registration/logout.html | 2 +-
.../templates/django_registration/password_change_done.html | 2 +-
.../templates/django_registration/password_change_form.html | 2 +-
.../templates/django_registration/password_reset_complete.html | 2 +-
.../templates/django_registration/password_reset_confirm.html | 2 +-
.../templates/django_registration/password_reset_done.html | 2 +-
.../templates/django_registration/password_reset_form.html | 2 +-
.../templates/django_registration/registration_complete.html | 2 +-
.../templates/django_registration/registration_form.html | 2 +-
12 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/registration_defaults/templates/django_registration/activate.html b/registration_defaults/templates/django_registration/activate.html
index 4f3bdbe..7b02980 100644
--- a/registration_defaults/templates/django_registration/activate.html
+++ b/registration_defaults/templates/django_registration/activate.html
@@ -1,4 +1,4 @@
-{% extends "registration/registration_base.html" %}
+{% extends "django_registration/registration_base.html" %}
{% load i18n %}
{% block title %}{% if account %}{% trans "Activation complete" %}{% else %}{% trans "Activation problem" %}{% endif %}{% endblock %}
{% block content %}
diff --git a/registration_defaults/templates/django_registration/activation_complete.html b/registration_defaults/templates/django_registration/activation_complete.html
index c2ab8dd..34bb91f 100644
--- a/registration_defaults/templates/django_registration/activation_complete.html
+++ b/registration_defaults/templates/django_registration/activation_complete.html
@@ -1,4 +1,4 @@
-{% extends "registration/registration_base.html" %}
+{% extends "django_registration/registration_base.html" %}
{% load i18n %}
{% block title %}{% trans "Activation complete" %}{% endblock %}
{% block content %}
diff --git a/registration_defaults/templates/django_registration/login.html b/registration_defaults/templates/django_registration/login.html
index 2fd6edb..d60c5e7 100644
--- a/registration_defaults/templates/django_registration/login.html
+++ b/registration_defaults/templates/django_registration/login.html
@@ -1,4 +1,4 @@
-{% extends "registration/registration_base.html" %}
+{% extends "django_registration/registration_base.html" %}
{% load i18n %}
{% block title %}{% trans "Login" %}{% endblock %}
{% block content %}
diff --git a/registration_defaults/templates/django_registration/logout.html b/registration_defaults/templates/django_registration/logout.html
index 6759e11..1f1768f 100644
--- a/registration_defaults/templates/django_registration/logout.html
+++ b/registration_defaults/templates/django_registration/logout.html
@@ -1,4 +1,4 @@
-{% extends "registration/registration_base.html" %}
+{% extends "django_registration/registration_base.html" %}
{% load i18n %}
{% block title %}{% trans "Logged out" %}{% endblock %}
{% block content %}
diff --git a/registration_defaults/templates/django_registration/password_change_done.html b/registration_defaults/templates/django_registration/password_change_done.html
index d49d6cc..7ae2520 100644
--- a/registration_defaults/templates/django_registration/password_change_done.html
+++ b/registration_defaults/templates/django_registration/password_change_done.html
@@ -1,4 +1,4 @@
-{% extends "registration/registration_base.html" %}
+{% extends "django_registration/registration_base.html" %}
{% load i18n %}
{% block title %}{% trans "Password changed" %}{% endblock %}
{% block content %}
diff --git a/registration_defaults/templates/django_registration/password_change_form.html b/registration_defaults/templates/django_registration/password_change_form.html
index 9e04d04..8a1fd4b 100644
--- a/registration_defaults/templates/django_registration/password_change_form.html
+++ b/registration_defaults/templates/django_registration/password_change_form.html
@@ -1,4 +1,4 @@
-{% extends "registration/registration_base.html" %}
+{% extends "django_registration/registration_base.html" %}
{% load i18n %}
{% block title %}{% trans "Change password" %}{% endblock %}
{% block content %}
diff --git a/registration_defaults/templates/django_registration/password_reset_complete.html b/registration_defaults/templates/django_registration/password_reset_complete.html
index 064701e..cb591ca 100644
--- a/registration_defaults/templates/django_registration/password_reset_complete.html
+++ b/registration_defaults/templates/django_registration/password_reset_complete.html
@@ -1,4 +1,4 @@
-{% extends "registration/registration_base.html" %}
+{% extends "django_registration/registration_base.html" %}
{% load i18n %}
{% block title %}{% trans "Password reset complete" %}{% endblock %}
{% block content %}{% blocktrans %}
diff --git a/registration_defaults/templates/django_registration/password_reset_confirm.html b/registration_defaults/templates/django_registration/password_reset_confirm.html
index 5006abd..0c7a40c 100644
--- a/registration_defaults/templates/django_registration/password_reset_confirm.html
+++ b/registration_defaults/templates/django_registration/password_reset_confirm.html
@@ -1,4 +1,4 @@
-{% extends "registration/registration_base.html" %}
+{% extends "django_registration/registration_base.html" %}
{% load i18n %}
{% block title %}{% trans "Confirm password reset" %}{% endblock %}
{% block content %}
diff --git a/registration_defaults/templates/django_registration/password_reset_done.html b/registration_defaults/templates/django_registration/password_reset_done.html
index 9d283e3..6c9e780 100644
--- a/registration_defaults/templates/django_registration/password_reset_done.html
+++ b/registration_defaults/templates/django_registration/password_reset_done.html
@@ -1,4 +1,4 @@
-{% extends "registration/registration_base.html" %}
+{% extends "django_registration/registration_base.html" %}
{% load i18n %}
{% block title %}{% trans "Password reset" %}{% endblock %}
{% block content %}
diff --git a/registration_defaults/templates/django_registration/password_reset_form.html b/registration_defaults/templates/django_registration/password_reset_form.html
index 35811fe..b695da4 100644
--- a/registration_defaults/templates/django_registration/password_reset_form.html
+++ b/registration_defaults/templates/django_registration/password_reset_form.html
@@ -1,4 +1,4 @@
-{% extends "registration/registration_base.html" %}
+{% extends "django_registration/registration_base.html" %}
{% load i18n %}
{% block title %}{% trans "Reset password" %}{% endblock %}
{% block content %}{% blocktrans %}
diff --git a/registration_defaults/templates/django_registration/registration_complete.html b/registration_defaults/templates/django_registration/registration_complete.html
index 872292b..b0f8749 100644
--- a/registration_defaults/templates/django_registration/registration_complete.html
+++ b/registration_defaults/templates/django_registration/registration_complete.html
@@ -1,4 +1,4 @@
-{% extends "registration/registration_base.html" %}
+{% extends "django_registration/registration_base.html" %}
{% load i18n %}
{% block title %}{% trans "Activation email sent" %}{% endblock %}
{% block content %}
diff --git a/registration_defaults/templates/django_registration/registration_form.html b/registration_defaults/templates/django_registration/registration_form.html
index 6ca5759..2194b7e 100644
--- a/registration_defaults/templates/django_registration/registration_form.html
+++ b/registration_defaults/templates/django_registration/registration_form.html
@@ -1,4 +1,4 @@
-{% extends "registration/registration_base.html" %}
+{% extends "django_registration/registration_base.html" %}
{% load i18n %}
{% block title %}{% trans "Register for an account" %}{% endblock %}
{% block content %}
From 5f548ea735db212133d654d3e1759e467cc236a4 Mon Sep 17 00:00:00 2001
From: Dan Frankowski
Date: Thu, 28 Feb 2019 11:39:22 -0600
Subject: [PATCH 04/13] more changes for django-registration 3.0
---
.../django_registration/activate.html | 14 ----------
.../django_registration/activation_email.html | 26 -------------------
...on_email.txt => activation_email_body.txt} | 0
.../activation_failed.html | 8 ++++++
4 files changed, 8 insertions(+), 40 deletions(-)
delete mode 100644 registration_defaults/templates/django_registration/activate.html
delete mode 100644 registration_defaults/templates/django_registration/activation_email.html
rename registration_defaults/templates/django_registration/{activation_email.txt => activation_email_body.txt} (100%)
create mode 100644 registration_defaults/templates/django_registration/activation_failed.html
diff --git a/registration_defaults/templates/django_registration/activate.html b/registration_defaults/templates/django_registration/activate.html
deleted file mode 100644
index 7b02980..0000000
--- a/registration_defaults/templates/django_registration/activate.html
+++ /dev/null
@@ -1,14 +0,0 @@
-{% extends "django_registration/registration_base.html" %}
-{% load i18n %}
-{% block title %}{% if account %}{% trans "Activation complete" %}{% else %}{% trans "Activation problem" %}{% endif %}{% endblock %}
-{% block content %}
-{% url 'auth_login' as auth_login_url %}
-{% if account %}
-{% blocktrans %}
-Thanks {{ account }}, activation complete!
-You may now login using the username and password you set at registration.
-{% endblocktrans %}
-{% else %}
-{% blocktrans %}Oops – it seems that your activation key is invalid. Please check the url again.{% endblocktrans %}
-{% endif %}
-{% endblock %}
diff --git a/registration_defaults/templates/django_registration/activation_email.html b/registration_defaults/templates/django_registration/activation_email.html
deleted file mode 100644
index c6ebc26..0000000
--- a/registration_defaults/templates/django_registration/activation_email.html
+++ /dev/null
@@ -1,26 +0,0 @@
-{% load i18n %}
-{% comment %}
-This template is used for the html alternative of the activation email
-if you use a django-registration backend that looks for it. e.g.
-https://github.com/huseyinyilmaz/django-registration-extended-backend
-{% endcomment %}
-{% url 'registration_activate' activation_key as activation_key_url %}
-{% blocktrans with sitename=site.name sitedomain=site.domain%}
-
Account registration for {{ sitename }}
-
-You (or someone pretending to be you) have asked to register an account at
-{{ sitename }}.
-If this wasn't you, please ignore this email and your address will be removed
-from our records.
-
+{# NOTE: settings is not put into the template by default, you have to override the login view with extra_context #}
+{# See https://docs.djangoproject.com/en/2.2/topics/auth/default/#django.contrib.auth.views.LoginView #}
{% if settings.REGISTRATION_OPEN %}
- {% blocktrans %}Need an account?{% endblocktrans %}