Merge main and common apps, extract authentication functionality to new authentication app. Closes issues #179 and #180

This commit is contained in:
Roberto Rosario
2015-04-06 16:09:54 -04:00
parent 5367bee1b2
commit 23fc9f1e36
165 changed files with 5320 additions and 13244 deletions
+33
View File
@@ -0,0 +1,33 @@
from __future__ import absolute_import, unicode_literals
import logging
import tempfile
from django import apps
from django.conf import settings
from django.contrib.auth import models as auth_models
from django.contrib.auth.models import User
from django.contrib.auth.signals import user_logged_in
from django.db.models.signals import post_migrate, post_save
from django.utils.translation import ugettext_lazy as _
from common.menus import (
menu_facet, menu_main, menu_secondary, menu_setup, menu_tools
)
from .links import link_logout, link_password_change
logger = logging.getLogger(__name__)
class AuthenticationApp(apps.AppConfig):
name = 'authentication'
verbose_name = _('Authentication')
def ready(self):
menu_secondary.bind_links(
links=[
link_password_change, link_logout
],
sources=['common:current_user_details', 'common:current_user_edit', 'common:current_user_locale_profile_details', 'common:current_user_locale_profile_edit', 'authentication:password_change_view', 'common:setup_list', 'common:tools_list']
)
@@ -0,0 +1,22 @@
from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
class EmailAuthBackend(ModelBackend):
"""
Email Authentication Backend
Allows a user to sign in using an email/password pair rather than
a username/password pair.
"""
def authenticate(self, email=None, password=None):
UserModel = get_user_model()
try:
user = UserModel.objects.get(email=email)
if user.check_password(password):
return user
except UserModel.DoesNotExist:
# Run the default password hasher once to reduce the timing
# difference between an existing and a non-existing user (#20760).
UserModel().set_password(password)
+69
View File
@@ -0,0 +1,69 @@
from __future__ import unicode_literals
import warnings
import os
from django import forms
from django.conf import settings
from django.contrib.auth import authenticate
from django.contrib.auth.models import User
from django.db import models
from django.utils.html import escape
from django.utils.translation import ugettext_lazy as _
from common.widgets import EmailInput
class EmailAuthenticationForm(forms.Form):
"""
A form to use email address authentication
"""
email = forms.CharField(label=_('Email'), max_length=254,
widget=EmailInput()
)
password = forms.CharField(label=_('Password'), widget=forms.PasswordInput)
error_messages = {
'invalid_login': _('Please enter a correct email and password. '
'Note that the password field is case-sensitive.'),
'inactive': _('This account is inactive.'),
}
def __init__(self, request=None, *args, **kwargs):
"""
The 'request' parameter is set for custom auth use by subclasses.
The form data comes in via the standard 'data' kwarg.
"""
self.request = request
self.user_cache = None
super(EmailAuthenticationForm, self).__init__(*args, **kwargs)
def clean(self):
email = self.cleaned_data.get('email')
password = self.cleaned_data.get('password')
if email and password:
self.user_cache = authenticate(email=email, password=password)
if self.user_cache is None:
raise forms.ValidationError(
self.error_messages['invalid_login'],
code='invalid_login',
)
elif not self.user_cache.is_active:
raise forms.ValidationError(
self.error_messages['inactive'],
code='inactive',
)
return self.cleaned_data
def check_for_test_cookie(self):
warnings.warn('check_for_test_cookie is deprecated; ensure your login '
'view is CSRF-protected.', DeprecationWarning)
def get_user_id(self):
if self.user_cache:
return self.user_cache.id
return None
def get_user(self):
return self.user_cache
+13
View File
@@ -0,0 +1,13 @@
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from navigation import Link
def has_usable_password(context):
return context['request'].user.has_usable_password
link_logout = Link(icon='fa fa-sign-out', text=_('Logout'), view='authentication:logout_view')
link_password_change = Link(condition=has_usable_password, icon='fa fa-key', text=_('Change password'), view='authentication:password_change_view')
@@ -0,0 +1,68 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,67 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,66 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,67 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,66 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,66 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,66 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,67 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,67 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,67 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,66 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,67 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,67 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,67 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,68 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : "
"2);\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,67 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,66 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,68 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,67 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,67 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,66 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,68 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:05-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,66 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:06-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,67 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:06-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,66 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:06-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,66 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:06-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,67 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:06-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,67 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-04-06 16:06-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: apps.py:25
msgid "Authentication"
msgstr ""
#: forms.py:21
msgid "Email"
msgstr ""
#: forms.py:24
msgid "Password"
msgstr ""
#: forms.py:27
msgid ""
"Please enter a correct email and password. Note that the password field is "
"case-sensitive."
msgstr ""
#: forms.py:29
msgid "This account is inactive."
msgstr ""
#: links.py:12
msgid "Logout"
msgstr ""
#: links.py:13
msgid "Change password"
msgstr ""
#: settings.py:14
msgid ""
"Controls the mechanism used to authenticated user. Options are: username, "
"email"
msgstr ""
#: settings.py:23
msgid "Allow non authenticated users, access to all views"
msgstr ""
#: views.py:49
msgid "Current user password change"
msgstr ""
#: views.py:64
msgid "Your password has been successfully changed."
msgstr ""
@@ -0,0 +1,38 @@
from __future__ import unicode_literals
import re
from django.http import HttpResponseRedirect
from django.conf import settings
from django.core.urlresolvers import reverse
from ..settings import ALLOW_ANONYMOUS_ACCESS
EXEMPT_URLS = [re.compile(reverse(settings.LOGIN_URL).lstrip('/'))]
if hasattr(settings, 'LOGIN_EXEMPT_URLS'):
EXEMPT_URLS += [re.compile(expr) for expr in settings.LOGIN_EXEMPT_URLS]
class LoginRequiredMiddleware:
"""
Middleware that requires a user to be authenticated to view any page other
than LOGIN_URL. Exemptions to this requirement can optionally be specified
in settings via a list of regular expressions in LOGIN_EXEMPT_URLS (which
you can copy from your urls.py).
Requires authentication middleware and template context processors to be
loaded. You'll get an error if they aren't.
"""
def process_request(self, request):
if not ALLOW_ANONYMOUS_ACCESS:
assert hasattr(request, 'user'), "The Login Required middleware\
requires authentication middleware to be installed. Edit your\
MIDDLEWARE_CLASSES setting to insert\
'django.contrib.auth.middlware.AuthenticationMiddleware'. If that doesn't\
work, ensure your TEMPLATE_CONTEXT_PROCESSORS setting includes\
'django.core.context_processors.auth'."
if not request.user.is_authenticated():
path = request.path_info.lstrip('/')
if not any(m.match(path) for m in EXEMPT_URLS):
return HttpResponseRedirect(reverse(settings.LOGIN_URL))
+24
View File
@@ -0,0 +1,24 @@
from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
from smart_settings.api import register_setting
register_setting(
namespace='authentication',
module='authentication.settings',
name='LOGIN_METHOD',
global_name='COMMON_LOGIN_METHOD',
default='username',
description=_('Controls the mechanism used to authenticated user. Options are: username, email'),
)
register_setting(
namespace='authentication',
module='authentication.settings',
name='ALLOW_ANONYMOUS_ACCESS',
global_name='COMMON_ALLOW_ANONYMOUS_ACCESS',
default=False,
description=_('Allow non authenticated users, access to all views'),
)
+70
View File
@@ -0,0 +1,70 @@
from __future__ import absolute_import, unicode_literals
from django.conf import settings
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test.client import Client
from authentication import settings as auth_authentication
import authentication
TEST_ADMIN_EMAIL = 'admin@admin.com'
TEST_ADMIN_PASSWORD = 'test_admin_password'
TEST_ADMIN_USERNAME = 'test_admin'
class UserLoginTestCase(TestCase):
"""
Test that users can login via the supported authentication methods
"""
def setUp(self):
self.admin_user = User.objects.create_superuser(username=TEST_ADMIN_USERNAME, email=TEST_ADMIN_EMAIL, password=TEST_ADMIN_PASSWORD)
self.client = Client()
def test_normal_behaviour(self):
setattr(authentication.settings, 'LOGIN_METHOD', 'username')
response = self.client.get(reverse('documents:document_list'))
self.assertRedirects(response, 'http://testserver/authentication/login/')
def test_username_login(self):
setattr(authentication.settings, 'LOGIN_METHOD', 'username')
logged_in = self.client.login(username=TEST_ADMIN_USERNAME, password=TEST_ADMIN_PASSWORD)
self.assertTrue(logged_in)
response = self.client.get(reverse('documents:document_list'))
# We didn't get redirected to the login URL
self.assertEqual(response.status_code, 200)
def test_email_login(self):
with self.settings(COMMON_LOGIN_METHOD='email', AUTHENTICATION_BACKENDS=('authentication.auth.email_auth_backend.EmailAuthBackend',)):
setattr(authentication.settings, 'LOGIN_METHOD', 'email')
logged_in = self.client.login(username=TEST_ADMIN_USERNAME, password=TEST_ADMIN_PASSWORD)
self.assertFalse(logged_in)
logged_in = self.client.login(email=TEST_ADMIN_EMAIL, password=TEST_ADMIN_PASSWORD)
self.assertTrue(logged_in)
response = self.client.get(reverse('documents:document_list'))
# We didn't get redirected to the login URL
self.assertEqual(response.status_code, 200)
def test_username_login_via_views(self):
setattr(authentication.settings, 'LOGIN_METHOD', 'username')
response = self.client.get(reverse('documents:document_list'))
self.assertRedirects(response, 'http://testserver/authentication/login/')
response = self.client.post(settings.LOGIN_URL, {'username': TEST_ADMIN_USERNAME, 'password': TEST_ADMIN_PASSWORD}, follow=True)
response = self.client.get(reverse('documents:document_list'))
# We didn't get redirected to the login URL
self.assertEqual(response.status_code, 200)
def test_email_login_via_views(self):
with self.settings(COMMON_LOGIN_METHOD='email', AUTHENTICATION_BACKENDS=('authentication.auth.email_auth_backend.EmailAuthBackend',)):
setattr(authentication.settings, 'LOGIN_METHOD', 'email')
response = self.client.get(reverse('documents:document_list'))
self.assertRedirects(response, 'http://testserver/authentication/login/')
response = self.client.post(settings.LOGIN_URL, {'email': TEST_ADMIN_EMAIL, 'password': TEST_ADMIN_PASSWORD}, follow=True)
response = self.client.get(reverse('documents:document_list'))
self.assertEqual(response.status_code, 200)
+20
View File
@@ -0,0 +1,20 @@
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, url
urlpatterns = patterns('authentication.views',
url(r'^login/$', 'login_view', (), name='login_view'),
url(r'^password/change/done/$', 'password_change_done', (), name='password_change_done'),
url(r'^password/change/$', 'password_change_view', (), name='password_change_view'),
)
urlpatterns += patterns('',
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': settings.LOGIN_REDIRECT_URL}, name='logout_view'),
url(r'^password/reset/$', 'django.contrib.auth.views.password_reset', {'email_template_name': 'appearance/password_reset_email.html', 'template_name': 'appearance/password_reset_form.html', 'post_reset_redirect': '/password/reset/done'}, name='password_reset_view'),
url(r'^password/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm', {'template_name': 'appearance/password_reset_confirm.html', 'post_reset_redirect': '/password/reset/complete/'}, name='password_reset_confirm_view'),
url(r'^password/reset/complete/$', 'django.contrib.auth.views.password_reset_complete', {'template_name': 'appearance/password_reset_complete.html'}, name='password_reset_complete_view'),
url(r'^password/reset/done/$', 'django.contrib.auth.views.password_reset_done', {'template_name': 'appearance/password_reset_done.html'}, name='password_reset_done_view'),
)
+65
View File
@@ -0,0 +1,65 @@
from __future__ import absolute_import, unicode_literals
from json import dumps, loads
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.models import User
from django.contrib.auth.views import login, password_change
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import redirect, render_to_response
from django.template import RequestContext
from django.utils.http import urlencode
from django.utils.translation import ugettext_lazy as _
from django.views.generic import FormView, TemplateView
from django.views.generic.edit import CreateView, DeleteView, UpdateView
from django.views.generic.list import ListView
from dynamic_search.classes import SearchModel
from permissions.models import Permission
from .forms import EmailAuthenticationForm
from .settings import LOGIN_METHOD
def login_view(request):
"""
Control how the use is to be authenticated, options are 'email' and
'username'
"""
kwargs = {'template_name': 'appearance/login.html'}
if LOGIN_METHOD == 'email':
kwargs['authentication_form'] = EmailAuthenticationForm
if not request.user.is_authenticated():
context = {'appearance_type': 'plain'}
return login(request, extra_context=context, **kwargs)
else:
return HttpResponseRedirect(reverse(settings.LOGIN_REDIRECT_URL))
def password_change_view(request):
"""
Password change wrapper for better control
"""
context = {'title': _('Current user password change')}
return password_change(
request,
extra_context=context,
template_name='appearance/generic_form.html',
post_change_redirect=reverse('authentication:password_change_done'),
)
def password_change_done(request):
"""
View called when the new user password has been accepted
"""
messages.success(request, _('Your password has been successfully changed.'))
return redirect('common:current_user_details')