`_
103 |
104 | Thanks!
105 |
106 | Copying
107 | =======
108 |
109 | Copyright (c) 2010 Charlie DeTar
110 |
111 | Permission is hereby granted, free of charge, to any person obtaining a copy
112 | of this software and associated documentation files (the "Software"), to deal
113 | in the Software without restriction, including without limitation the rights
114 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
115 | copies of the Software, and to permit persons to whom the Software is
116 | furnished to do so, subject to the following conditions:
117 |
118 | The above copyright notice and this permission notice shall be included in
119 | all copies or substantial portions of the Software.
120 |
121 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
122 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
123 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
124 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
125 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
126 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
127 | THE SOFTWARE.
128 |
--------------------------------------------------------------------------------
/registration_defaults/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yourcelf/django-registration-defaults/0a101c9eeb0f0beabfb5e7d5adc82d19ffa2a305/registration_defaults/__init__.py
--------------------------------------------------------------------------------
/registration_defaults/settings.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 | ACCOUNT_ACTIVATION_DAYS = 2
4 | REGISTRATION_TEMPLATE_DIR = os.path.join(os.path.dirname(__file__), "templates")
5 |
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/activate.html:
--------------------------------------------------------------------------------
1 | {% extends "registration/registration_base.html" %}
2 | {% load i18n %}
3 | {% block title %}{% if account %}{% trans "Activation complete" %}{% else %}{% trans "Activation problem" %}{% endif %}{% endblock %}
4 | {% block content %}
5 | {% url 'auth_login' as auth_login_url %}
6 | {% if account %}
7 | {% blocktrans %}
8 | Thanks {{ account }}, activation complete!
9 | You may now login using the username and password you set at registration.
10 | {% endblocktrans %}
11 | {% else %}
12 | {% blocktrans %}Oops – it seems that your activation key is invalid. Please check the url again.{% endblocktrans %}
13 | {% endif %}
14 | {% endblock %}
15 |
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/activation_complete.html:
--------------------------------------------------------------------------------
1 | {% extends "registration/registration_base.html" %}
2 | {% load i18n %}
3 | {% block title %}{% trans "Activation complete" %}{% endblock %}
4 | {% block content %}
5 | {% url 'auth_login' as auth_login_url %}
6 | {% blocktrans %}
7 | Thanks, activation complete! You may now login using the username and password you set at registration.
8 | {% endblocktrans %}
9 | {% endblock %}
10 |
11 |
12 |
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/activation_email.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 | {% comment %}
3 | This template is used for the html alternative of the activation email
4 | if you use a django-registration backend that looks for it. e.g.
5 | https://github.com/huseyinyilmaz/django-registration-extended-backend
6 | {% endcomment %}
7 | {% url 'registration_activate' activation_key as activation_key_url %}
8 | {% blocktrans with sitename=site.name sitedomain=site.domain%}
9 | Account registration for {{ sitename }}
10 |
11 | You (or someone pretending to be you) have asked to register an account at
12 | {{ sitename }}.
13 | If this wasn't you, please ignore this email and your address will be removed
14 | from our records.
15 |
16 |
17 | To activate this account, please click the following link within the next
18 | {{ expiration_days }} days:
19 | http://{{ sitedomain }}{{ activation_key_url }}
20 |
21 |
22 | Sincerely,
23 | {{ sitename }} Management
24 |
25 |
26 | {% endblocktrans %}
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/activation_email.txt:
--------------------------------------------------------------------------------
1 | {% load i18n %}
2 | {% url 'registration_activate' activation_key as activation_key_url%}
3 | {% blocktrans with sitename=site.name siteurl=site.domain %}
4 | You (or someone pretending to be you) have asked to register an account at
5 | {{ sitename }}. If this wasn't you, please ignore this email
6 | and your address will be removed from our records.
7 |
8 | To activate this account, please click the following link within the next
9 | {{ expiration_days }} days:
10 |
11 | http://{{ siteurl }}{{ activation_key_url }}
12 |
13 | Sincerely,
14 | {{ sitename }} Management
15 | {% endblocktrans %}
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/activation_email_subject.txt:
--------------------------------------------------------------------------------
1 | {% load i18n %}{% blocktrans with sitename=site.name %}Account registration for {{ sitename }}{% endblocktrans %}
2 |
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/login.html:
--------------------------------------------------------------------------------
1 | {% extends "registration/registration_base.html" %}
2 | {% load i18n %}
3 | {% block title %}{% trans "Login" %}{% endblock %}
4 | {% block content %}
5 | {% url 'auth_password_reset' as auth_pwd_reset_url %}
6 | {% url 'registration_register' as register_url%}
7 |
8 | {% if form.errors %}
9 | {% blocktrans %}Your username and password didn't match. Please try again.{% endblocktrans %}
10 | {% endif %}
11 |
12 |
29 |
30 | {% endblock %}
31 |
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/logout.html:
--------------------------------------------------------------------------------
1 | {% extends "registration/registration_base.html" %}
2 | {% load i18n %}
3 | {% block title %}{% trans "Logged out" %}{% endblock %}
4 | {% block content %}
5 | {% trans "Successfully logged out!" %}
6 | {% endblock %}
7 |
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/password_change_done.html:
--------------------------------------------------------------------------------
1 | {% extends "registration/registration_base.html" %}
2 | {% load i18n %}
3 | {% block title %}{% trans "Password changed" %}{% endblock %}
4 | {% block content %}
5 | {% trans "Password successfully changed!" %}
6 | {% endblock %}
7 |
8 |
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/password_change_form.html:
--------------------------------------------------------------------------------
1 | {% extends "registration/registration_base.html" %}
2 | {% load i18n %}
3 | {% block title %}{% trans "Change password" %}{% endblock %}
4 | {% block content %}
5 |
11 | {% endblock %}
12 |
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/password_reset_complete.html:
--------------------------------------------------------------------------------
1 | {% extends "registration/registration_base.html" %}
2 | {% load i18n %}
3 | {% block title %}{% trans "Password reset complete" %}{% endblock %}
4 | {% block content %}{% blocktrans %}
5 | Your password has been reset! You may now log in.
6 | {% endblocktrans %}{% endblock %}
7 |
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/password_reset_confirm.html:
--------------------------------------------------------------------------------
1 | {% extends "registration/registration_base.html" %}
2 | {% load i18n %}
3 | {% block title %}{% trans "Confirm password reset" %}{% endblock %}
4 | {% block content %}
5 | {% trans "Enter your new password below to reset your password:" %}
6 |
12 | {% endblock %}
13 |
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/password_reset_done.html:
--------------------------------------------------------------------------------
1 | {% extends "registration/registration_base.html" %}
2 | {% load i18n %}
3 | {% block title %}{% trans "Password reset" %}{% endblock %}
4 | {% block content %}
5 |
6 | {% blocktrans %}We have sent you an email with a link to reset your password.
7 | Please check your email and click the link to continue.{% endblocktrans %}
8 |
9 | {% endblock %}
10 |
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/password_reset_email.html:
--------------------------------------------------------------------------------
1 | {% load i18n %}{% trans "Greetings" %} {% if user.get_full_name %}{{ user.get_full_name }}{% else %}{{ user }}{% endif %},
2 |
3 | {% blocktrans %}You are receiving this email because you (or someone pretending to be you)
4 | requested that your password be reset on the {{ domain }} site. If you do not
5 | wish to reset your password, please ignore this message.
6 |
7 | To reset your password, please click the following link, or copy and paste it
8 | into your web browser:{% endblocktrans %}
9 |
10 | {{ protocol }}://{{ domain }}{% url 'auth_password_reset_confirm' uid token %}
11 |
12 | {% blocktrans with username=user.username %}
13 | Your username, in case you've forgotten: {{ username }}
14 |
15 | Best regards,
16 | {{ site_name }} Management
17 | {% endblocktrans %}
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/password_reset_form.html:
--------------------------------------------------------------------------------
1 | {% extends "registration/registration_base.html" %}
2 | {% load i18n %}
3 | {% block title %}{% trans "Reset password" %}{% endblock %}
4 | {% block content %}{% blocktrans %}
5 | Forgot your password? Enter your email in the form below and we'll send you
6 | instructions for creating a new one.{% endblocktrans %}
7 |
13 | {% endblock %}
14 |
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/registration_base.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 | {% load i18n %}
3 |
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/registration_complete.html:
--------------------------------------------------------------------------------
1 | {% extends "registration/registration_base.html" %}
2 | {% load i18n %}
3 | {% block title %}{% trans "Activation email sent" %}{% endblock %}
4 | {% block content %}
5 | {% blocktrans %}An activation email has been sent.
6 | Please check your email and click on the link to activate your account.{% endblocktrans %}
7 | {% endblock %}
8 |
9 |
--------------------------------------------------------------------------------
/registration_defaults/templates/registration/registration_form.html:
--------------------------------------------------------------------------------
1 | {% extends "registration/registration_base.html" %}
2 | {% load i18n %}
3 | {% block title %}{% trans "Register for an account" %}{% endblock %}
4 | {% block content %}
5 |
11 | {% endblock %}
12 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | from distutils.core import setup
2 |
3 | VERSION = '0.4.4'
4 |
5 | setup(
6 | name='django-registration-defaults',
7 | version=VERSION,
8 | description="Default templates and settings for James Bennett's"
9 | "django-registration application.",
10 | long_description="This module provides a full set of default templates"
11 | " and settings for ``django-registration`` to ease the process of"
12 | " creating Django apps that require user registration. It depends"
13 | " on ``django-registration``.",
14 | author="Charlie DeTar",
15 | author_email="cfd@media.mit.edu",
16 | url="http://github.com/yourcelf/django-registration-defaults",
17 | license="MIT License",
18 | platforms=["any"],
19 | classifiers=[
20 | "Development Status :: 3 - Alpha",
21 | "Environment :: Web Environment",
22 | "Intended Audience :: Developers",
23 | "License :: OSI Approved :: MIT License",
24 | "Operating System :: OS Independent",
25 | "Programming Language :: Python",
26 | "Framework :: Django",
27 | ],
28 | install_requires=[
29 | 'Django>=1.5',
30 | 'django-registration>=1.0',
31 | ],
32 | packages=['registration_defaults'],
33 | package_dir={'registration_defaults': 'registration_defaults'},
34 | package_data={'registration_defaults': ['templates/*/*.html', 'templates/*/*.txt']},
35 | include_package_data=True,
36 | zip_safe=False,
37 | )
38 |
--------------------------------------------------------------------------------