diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 7437cc8..0000000 --- a/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ - Copyright (c) [2018-2020] - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Login/__init__.py b/Login/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Login/__pycache__/__init__.cpython-36.pyc b/Login/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..f12bd0c Binary files /dev/null and b/Login/__pycache__/__init__.cpython-36.pyc differ diff --git a/Login/__pycache__/__init__.cpython-38.pyc b/Login/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..cf68e12 Binary files /dev/null and b/Login/__pycache__/__init__.cpython-38.pyc differ diff --git a/Login/__pycache__/settings.cpython-36.pyc b/Login/__pycache__/settings.cpython-36.pyc new file mode 100644 index 0000000..d35fbdf Binary files /dev/null and b/Login/__pycache__/settings.cpython-36.pyc differ diff --git a/Login/__pycache__/settings.cpython-38.pyc b/Login/__pycache__/settings.cpython-38.pyc new file mode 100644 index 0000000..b14092f Binary files /dev/null and b/Login/__pycache__/settings.cpython-38.pyc differ diff --git a/Login/__pycache__/urls.cpython-38.pyc b/Login/__pycache__/urls.cpython-38.pyc new file mode 100644 index 0000000..df167dc Binary files /dev/null and b/Login/__pycache__/urls.cpython-38.pyc differ diff --git a/Login/__pycache__/wsgi.cpython-38.pyc b/Login/__pycache__/wsgi.cpython-38.pyc new file mode 100644 index 0000000..100e4af Binary files /dev/null and b/Login/__pycache__/wsgi.cpython-38.pyc differ diff --git a/Login/asgi.py b/Login/asgi.py new file mode 100644 index 0000000..3ff2fb7 --- /dev/null +++ b/Login/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for Login project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Login.settings') + +application = get_asgi_application() diff --git a/Login/settings.py b/Login/settings.py new file mode 100644 index 0000000..cee56f8 --- /dev/null +++ b/Login/settings.py @@ -0,0 +1,123 @@ + +import os +from pathlib import Path + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '&z9yaki6^*-kmxxw)q@%&5s8(b=&=e04%-pb7vs8ne&bwh9#m0' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.sites', + 'django.contrib.admin', + 'registration', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'bootstrap4', + 'Login', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'Login.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [os.path.join(BASE_DIR, 'templates')], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'Login.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/3.1/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'djangologin', + 'USER': 'karis', + 'PASSWORD': 'K@r!s##!', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/3.1/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'Africa/Nairobi' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/3.1/howto/static-files/ + +STATIC_URL = '/static/' + + + +ACCOUNT_ACTIVATION_DAYS = 7 # One-Week Activation Expiry +REGISTRATION_AUTO_LOGIN = True # Automatically Log the User In. +SITE_ID = 1 +LOGIN_REDIRECT_URL = '/' \ No newline at end of file diff --git a/Login/urls.py b/Login/urls.py new file mode 100644 index 0000000..cdeec9b --- /dev/null +++ b/Login/urls.py @@ -0,0 +1,14 @@ +"""Login URL Configuration""" + +# Imports Views For Success to Render Content. +from Success import views +from django.urls import include + +from django.contrib import admin +from django.urls import path + +urlpatterns = [ + path('admin/', admin.site.urls), + # Includes Success url patterns + path('', include('Success.urls')), +] diff --git a/Login/wsgi.py b/Login/wsgi.py new file mode 100644 index 0000000..6922179 --- /dev/null +++ b/Login/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for Login project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Login.settings') + +application = get_wsgi_application() diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..f5c3286 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: gunicorn Login.wsgi diff --git a/README.md b/README.md index d46469d..3f88483 100644 --- a/README.md +++ b/README.md @@ -1,151 +1,27 @@ -# DESCRIPTION +# Login -This is a **shell script** that that allows **execution of Django** a python based framework. +# Description -A shell script is a **computer program** designed to be run by the Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts ***include file manipulation, program execution, and printing text.*** A script which sets up the environment, runs the program, and does any necessary cleanup, logging, etc. is called a wrapper. - -Django is a **high-level Python Web framework** that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. - -# **WHAT THIS DJANGO-SHELL-SCRIPT DOES FOR YOU.** - -**{Please go through what this shell-script does for you. It will help you avoid bugs in your code. In case you use a technology that might cause failure of your code to run}** - -1. Creates a **folder** for you. - -2. Initializes Empty **Git Repository**. - -3. Installs **Django 2.0.7** (Can be updated to latest version). - -4. Installs **Django-bootstrap4.** - -5. Installs **pillow** for Image Integration. - -6. Installs **dj-database-url.** - -7. Installs **gunicorn.** - -8. Installs **psycopg2.** - -9. Installs **whitenoise.** - -10. Installs **python-decouple.** - -11. Installs **wheel** - - -**CREATED FILES** -The script also **helps in creating some files** and this making it easy for you to code as you no longer hav to create them on your own. - -It simply creates files and adds the preset standard code thats will not change in any given file structure. - - -1. Creates **static** file together with **css files.** - -2. Creates **templates** - -3. Creates **base.html** and **adds it to** the templates folder. - -4. Creates **index.html**, **links it to base.html using {% extends ' '%}** then **adds it to** templates folder. - -5. Creates **virtual environment**. - -6. Creates **.env** file and **sets DEBUG = True** - -7. Creates **.gitignore** and adds **(virtual/ | *.pyc | .env | migrations/ )** to .gitignore. - -8. Creates **Procfile** - -9. Creates **README.md** - -10. Creates **requirements.txt** - -* You are now ready to code. - - - -# Prerequisites. - -* You need to have nano text editor installed. you can find out whether you have it installed by typing nano --version in your terminal. For most linux distributions, it is installed by default. - -* To work with the script you have to clone Django-shell-script on my github repo. - -Link:-> ```https://github.com/zecollokaris/Django-shell-script``` - -**Installing Nano Text Editor.** - --However, if you don't have it installed, you can quicky do that by typing: - - -``` - sudo apt-get install nano -``` - -* You need to have (python3.6) installed in your machine. - --To check if you already have python3.6 before installing type: - - - -``` -python3.6 -V -``` - -**Installing Python3.6** - -To install python3.6 you can quicky do that by typing: - - - -``` -sudo apt-get install python3.6 -``` +# Prerequisites # Setup/Installation Reqiurements. - **{follow the below instructions for set up.}** -1. You will need **Internet connection.** - -2. You will also need a Webpage URL to load in URL's: - -3. To **get to use Django-shell-script** fist you need to get to the **Django-shell-script repository.** - -Link:-> ```https://github.com/zecollokaris/Django-shell-script``` - -4. From there you can access Django-shell-script. - -5. **Clone** the project. - -6. **Once you done with cloning** and project is on your device. +# Technologies Used -7. **get into project folder** (cd into project). +# Support and Contact +-Mobile number: (+254) 798731203 +-Email Address: collo.kariss@gmail.com -# **HOW TO USE.** - -**To work With this Django-shell-script** - -1. **Make sure your inside folder containing script.** - -2. Create **Django folder structure** - - ``` - source newDjango.sh (PROJECTNAME) (APPNAME) - ``` - -3. From there the it will **prompt you to create a PostgreSQL Database** an object-relational database management system. - -4. You Django is ready **HAPPY CODING :-)** - ---- +-github-username: zecollokaris ## License The app is licensed by MIT. -MIT (c) 2018 - 2020 +Collins Kariuki - MIT (c)2018 LICENSE + -Feel FREE to contribute to make the **script** better for others. ---- diff --git a/Success/__init__.py b/Success/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Success/__pycache__/__init__.cpython-38.pyc b/Success/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..09e3185 Binary files /dev/null and b/Success/__pycache__/__init__.cpython-38.pyc differ diff --git a/Success/__pycache__/urls.cpython-38.pyc b/Success/__pycache__/urls.cpython-38.pyc new file mode 100644 index 0000000..8e4a24b Binary files /dev/null and b/Success/__pycache__/urls.cpython-38.pyc differ diff --git a/Success/__pycache__/views.cpython-38.pyc b/Success/__pycache__/views.cpython-38.pyc new file mode 100644 index 0000000..ce94f63 Binary files /dev/null and b/Success/__pycache__/views.cpython-38.pyc differ diff --git a/Success/admin.py b/Success/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/Success/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/Success/apps.py b/Success/apps.py new file mode 100644 index 0000000..b3dd825 --- /dev/null +++ b/Success/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class SuccessConfig(AppConfig): + name = 'Success' diff --git a/Success/migrations/__init__.py b/Success/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Success/models.py b/Success/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/Success/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/Success/templates/Success/base.html b/Success/templates/Success/base.html new file mode 100644 index 0000000..54e1c3e --- /dev/null +++ b/Success/templates/Success/base.html @@ -0,0 +1,22 @@ +{%load bootstrap4 %} +{% load static %} + +
+ +{% trans "Account activation failed." %}
+{% 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 %} diff --git a/Success/templates/registration/activation_complete.html b/Success/templates/registration/activation_complete.html new file mode 100755 index 0000000..b66e0d6 --- /dev/null +++ b/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 %} ++ {% trans "Your account is now activated." %} + {% if not user.is_authenticated %} + {% trans "You can log in." %} + {% endif %} +
+{% 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 %} diff --git a/Success/templates/registration/activation_complete_admin_pending.html b/Success/templates/registration/activation_complete_admin_pending.html new file mode 100644 index 0000000..25357ca --- /dev/null +++ b/Success/templates/registration/activation_complete_admin_pending.html @@ -0,0 +1,22 @@ +{% extends "registration/registration_base.html" %} +{% load i18n %} + +{% block title %}{% trans "Account Activated" %}{% endblock %} + +{% block content %} ++ {% trans "Your account is now activated." %} + {% if not user.is_authenticated %} + {% trans "Once a site administrator activates your account you can login." %} + {% endif %} +
+{% 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 %} diff --git a/Success/templates/registration/activation_email.html b/Success/templates/registration/activation_email.html new file mode 100644 index 0000000..cee8f9d --- /dev/null +++ b/Success/templates/registration/activation_email.html @@ -0,0 +1,72 @@ +{% 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 %} +
+ ++ + {{site.domain}}{% url 'registration_activate' activation_key %} + +
++ {% blocktrans with site_name=site.name %} + Sincerely, + {{ site_name }} Management + {% endblocktrans %} +
+ + + + + +{% 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 +{% trans "Account Approval failed." %}
+{% 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 %} diff --git a/Success/templates/registration/admin_approve_complete.html b/Success/templates/registration/admin_approve_complete.html new file mode 100644 index 0000000..f4ad870 --- /dev/null +++ b/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 %} ++ {% trans "The user's account is now approved." %} +
+{% 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 ++ {% blocktrans %} + Your account is now approved. You can + {% endblocktrans %} + {% trans "log in." %} +
+ + + + + +{% 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 %} diff --git a/Success/templates/registration/admin_approve_complete_email.txt b/Success/templates/registration/admin_approve_complete_email.txt new file mode 100644 index 0000000..f0fada3 --- /dev/null +++ b/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 %} diff --git a/Success/templates/registration/admin_approve_complete_email_subject.txt b/Success/templates/registration/admin_approve_complete_email_subject.txt new file mode 100644 index 0000000..6dac1db --- /dev/null +++ b/Success/templates/registration/admin_approve_complete_email_subject.txt @@ -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 ++ {% blocktrans with site_name=site.name %} + The following user ({{ user }}) has asked to register an account at + {{ site_name }}. + {% endblocktrans %} +
++ {% blocktrans %} + To approve this, please + {% endblocktrans %} + {% trans "click here" %}. +
++ {% blocktrans with site_name=site.name %} + Sincerely, + {{ site_name }} Management + {% endblocktrans %} +
+ + + + +{% 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 +{% trans "Forgot your password?" %} {% trans "Reset it" %}.
+{% trans "Not a member?" %} {% trans "Register" %}.
+{% endblock %} + + +{% comment %} +**registration/login.html** + +It's your responsibility to provide the login form in a template called +registration/login.html by default. This template gets passed four +template context variables: + +``form`` + A Form object representing the login form. See the forms + documentation for more on Form objects. + +``next`` + The URL to redirect to after successful login. This may contain a + query string, too. + +``site`` + The current Site, according to the SITE_ID setting. If you don't + have the site framework installed, this will be set to an instance + of RequestSite, which derives the site name and domain from the + current HttpRequest. + +``site_name`` + An alias for site.name. If you don't have the site framework + installed, this will be set to the value of + request.META['SERVER_NAME']. For more on sites, see The + "sites" framework. +{% endcomment %} diff --git a/Success/templates/registration/logout.html b/Success/templates/registration/logout.html new file mode 100755 index 0000000..e93d840 --- /dev/null +++ b/Success/templates/registration/logout.html @@ -0,0 +1,8 @@ +{% extends "registration/registration_base.html" %} +{% load i18n %} + +{% block title %}{% trans "Logged out" %}{% endblock %} + +{% block content %} +{% trans "Successfully logged out" %}.
+{% endblock %} diff --git a/Success/templates/registration/password_change_done.html b/Success/templates/registration/password_change_done.html new file mode 100755 index 0000000..f886aa4 --- /dev/null +++ b/Success/templates/registration/password_change_done.html @@ -0,0 +1,11 @@ +{% extends "registration/registration_base.html" %} +{% load i18n %} + +{% block title %}{% trans "Password changed" %}{% endblock %} + +{% block content %} +{% trans "Password successfully changed!" %}
+{% endblock %} + + +{# This is used by django.contrib.auth #} diff --git a/Success/templates/registration/password_change_form.html b/Success/templates/registration/password_change_form.html new file mode 100755 index 0000000..6be761f --- /dev/null +++ b/Success/templates/registration/password_change_form.html @@ -0,0 +1,15 @@ +{% extends "registration/registration_base.html" %} +{% load i18n %} + +{% block title %}{% trans "Change password" %}{% endblock %} + +{% block content %} + +{% endblock %} + + +{# This is used by django.contrib.auth #} diff --git a/Success/templates/registration/password_reset_complete.html b/Success/templates/registration/password_reset_complete.html new file mode 100755 index 0000000..00b755a --- /dev/null +++ b/Success/templates/registration/password_reset_complete.html @@ -0,0 +1,15 @@ +{% extends "registration/registration_base.html" %} +{% load i18n %} + +{% block title %}{% trans "Password reset complete" %}{% endblock %} + +{% block content %} ++ {% trans "Your password has been reset!" %} + {% blocktrans %}You may now log in{% endblocktrans %}. + +
+{% endblock %} + + +{# This is used by django.contrib.auth #} diff --git a/Success/templates/registration/password_reset_confirm.html b/Success/templates/registration/password_reset_confirm.html new file mode 100755 index 0000000..aeafc50 --- /dev/null +++ b/Success/templates/registration/password_reset_confirm.html @@ -0,0 +1,26 @@ +{% extends "registration/registration_base.html" %} +{% load i18n %} + +{% block meta %} + + +{% endblock %} + +{% block title %}{% trans "Confirm password reset" %}{% endblock %} + +{% block content %} +{% if validlink %} +{% trans "Enter your new password below to reset your password:" %}
+ +{% else %} + Password reset unsuccessful. Please try again. +{% endif %} +{% endblock %} + + +{# This is used by django.contrib.auth #} diff --git a/Success/templates/registration/password_reset_done.html b/Success/templates/registration/password_reset_done.html new file mode 100755 index 0000000..8624a51 --- /dev/null +++ b/Success/templates/registration/password_reset_done.html @@ -0,0 +1,16 @@ +{% extends "registration/registration_base.html" %} +{% load i18n %} + +{% block title %}{% trans "Password reset" %}{% endblock %} + +{% block content %} ++ {% blocktrans %} + We have sent you an email with a link to reset your password. Please check + your email and click the link to continue. + {% endblocktrans %} +
+{% endblock %} + + +{# This is used by django.contrib.auth #} diff --git a/Success/templates/registration/password_reset_email.html b/Success/templates/registration/password_reset_email.html new file mode 100755 index 0000000..8653551 --- /dev/null +++ b/Success/templates/registration/password_reset_email.html @@ -0,0 +1,27 @@ +{% load i18n %} + +{% blocktrans %}Greetings{% endblocktrans %} {% if user.get_full_name %}{{ user.get_full_name }}{% else %}{{ user }}{% endif %}, + +{% blocktrans %} +You are receiving this email because you (or someone pretending to be you) +requested that your password be reset on the {{ domain }} site. If you do not +wish to reset your password, please ignore this message. +{% endblocktrans %} + +{% blocktrans %} +To reset your password, please click the following link, or copy and paste it +into your web browser: +{% endblocktrans %} + + + {{ protocol }}://{{ domain }}{% url 'auth_password_reset_confirm' uid token %} + + +{% blocktrans %}Your username, in case you've forgotten:{% endblocktrans %} {{ user.get_username }} + + +{% blocktrans %}Best regards{% endblocktrans %}, +{{ site_name }} {% blocktrans %}Management{% endblocktrans %} + + +{# This is used by django.contrib.auth #} diff --git a/Success/templates/registration/password_reset_form.html b/Success/templates/registration/password_reset_form.html new file mode 100755 index 0000000..27ed5c4 --- /dev/null +++ b/Success/templates/registration/password_reset_form.html @@ -0,0 +1,20 @@ +{% extends "registration/registration_base.html" %} +{% load i18n %} + +{% block title %}{% trans "Reset password" %}{% endblock %} + +{% block content %} ++ {% blocktrans %} + Forgot your password? Enter your email in the form below and we'll send you instructions for creating a new one. + {% endblocktrans %} +
+ +{% endblock %} + + +{# This is used by django.contrib.auth #} diff --git a/Success/templates/registration/registration_base.html b/Success/templates/registration/registration_base.html new file mode 100755 index 0000000..94d9808 --- /dev/null +++ b/Success/templates/registration/registration_base.html @@ -0,0 +1 @@ +{% extends "base.html" %} diff --git a/Success/templates/registration/registration_closed.html b/Success/templates/registration/registration_closed.html new file mode 100755 index 0000000..94daff1 --- /dev/null +++ b/Success/templates/registration/registration_closed.html @@ -0,0 +1,8 @@ +{% extends "registration/registration_base.html" %} +{% load i18n %} + +{% block title %}{% trans "Registration is closed" %}{% endblock %} + +{% block content %} +{% trans "Sorry, but registration is closed at this moment. Come back later." %}
+{% endblock %} diff --git a/Success/templates/registration/registration_complete.html b/Success/templates/registration/registration_complete.html new file mode 100755 index 0000000..f0d0596 --- /dev/null +++ b/Success/templates/registration/registration_complete.html @@ -0,0 +1,18 @@ +{% extends "registration/registration_base.html" %} +{% load i18n %} + +{% block title %}{% trans "Activation email sent" %}{% endblock %} + +{% block content %} +{% trans "Please check your email to complete the registration process." %}
+{% endblock %} + + +{% comment %} +**registration/registration_complete.html** + +Used after successful completion of the registration form. This +template has no context variables of its own, and should simply inform +the user that an email containing account-activation information has +been sent. +{% endcomment %} diff --git a/Success/templates/registration/registration_form.html b/Success/templates/registration/registration_form.html new file mode 100755 index 0000000..42b4051 --- /dev/null +++ b/Success/templates/registration/registration_form.html @@ -0,0 +1,25 @@ +{% extends "registration/registration_base.html" %} +{% load i18n %} + +{% block title %}{% trans "Register for an account" %}{% endblock %} + +{% block content %} + +{% endblock %} + + +{% comment %} +**registration/registration_form.html** +Used to show the form users will fill out to register. By default, has +the following context: + +``form`` + The registration form. This will be an instance of some subclass + of ``django.forms.Form``; consult `Django's forms documentation ++ {% blocktrans %} + We have sent an email to {{ email }} with further instructions. + {% endblocktrans %} +
+{% endblock %} + + +{% comment %} +**registration/resend_activation_complete.html** +Used after form for resending account activation is submitted. By default has +the following context: + +``email`` + The email address submitted in the resend activation form. +{% endcomment %} diff --git a/Success/templates/registration/resend_activation_form.html b/Success/templates/registration/resend_activation_form.html new file mode 100644 index 0000000..400384d --- /dev/null +++ b/Success/templates/registration/resend_activation_form.html @@ -0,0 +1,25 @@ +{% extends "registration/registration_base.html" %} +{% load i18n %} + +{% block title %}{% trans "Resend Activation Email" %}{% endblock %} + +{% block content %} + +{% endblock %} + + +{% comment %} +**registration/resend_activation_form.html** +Used to show the form users will fill out to resend the activation email. By +default, has the following context: + +``form`` + The registration form. This will be an instance of some subclass + of ``django.forms.Form``; consult `Django's forms documentation +