Add basic functionality for self-registration. open
authorRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Fri, 9 Aug 2013 15:10:07 +0000 (17:10 +0200)
committerRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Fri, 9 Aug 2013 15:10:07 +0000 (17:10 +0200)
34 files changed:
requirements.txt
src/accounts/locale/pl_PL/LC_MESSAGES/django.mo
src/accounts/locale/pl_PL/LC_MESSAGES/django.po
src/accounts/templates/account/profile.html
src/accounts/templates/account/register.html [new file with mode: 0755]
src/accounts/templates/registration/password_reset_complete.html [new file with mode: 0755]
src/accounts/templates/registration/password_reset_confirm.html [new file with mode: 0755]
src/accounts/templates/registration/password_reset_done.html [new file with mode: 0755]
src/accounts/templates/registration/password_reset_email.html [new file with mode: 0755]
src/accounts/templates/registration/password_reset_form.html [new file with mode: 0755]
src/accounts/templates/registration/password_reset_subject.txt [new file with mode: 0755]
src/accounts/urls.py
src/accounts/views.py
src/cas/context_processors.py [new file with mode: 0644]
src/cas/locale-contrib/django.pot [new file with mode: 0644]
src/cas/locale-contrib/pl/LC_MESSAGES/django.mo [new file with mode: 0644]
src/cas/locale-contrib/pl/LC_MESSAGES/django.pl [new file with mode: 0644]
src/cas/locale-contrib/pl/LC_MESSAGES/django.po [new file with mode: 0644]
src/cas/locale/pl/LC_MESSAGES/django.mo
src/cas/locale/pl/LC_MESSAGES/django.po
src/cas/settings.py
src/cas/social.py [new file with mode: 0755]
src/cas/static/css/main.css
src/cas/static/img/auth/facebook.png [new file with mode: 0644]
src/cas/static/img/auth/google.png [new file with mode: 0644]
src/cas/static/img/auth/openid.png [new file with mode: 0644]
src/cas/static/img/auth/twitter.png [new file with mode: 0644]
src/cas/templates/base.html
src/cas/templates/cas/login.html
src/cas/templates/facebook/fbconnect.html [new file with mode: 0755]
src/cas/templates/socialaccount/connections.html [new file with mode: 0644]
src/cas/templates/socialaccount/login_cancelled.html [new file with mode: 0644]
src/cas/templates/socialaccount/snippets/provider_list.html [new file with mode: 0755]
src/cas/urls.py

index f51d854..0d1e675 100644 (file)
@@ -3,6 +3,8 @@
 Django>=1.5,<1.6
 South
 lxml>=2.2
-django-gravatar
+django-honeypot
+django-allauth>=0.12,<0.13
+django-libravatar
 
 -e git+https://github.com/rczajka/django-cas-provider.git@bb0f7662eb12a838cbd339dd8b60476a73ec161b#egg=django-cas-provider
index 63b2a7d..1ae2fe4 100644 (file)
Binary files a/src/accounts/locale/pl_PL/LC_MESSAGES/django.mo and b/src/accounts/locale/pl_PL/LC_MESSAGES/django.mo differ
index dbd98d8..1605566 100644 (file)
@@ -7,14 +7,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-04-15 11:11+0200\n"
-"PO-Revision-Date: 2013-04-15 11:11+0100\n"
+"POT-Creation-Date: 2013-08-01 11:06+0200\n"
+"PO-Revision-Date: 2013-08-01 11:11+0100\n"
 "Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\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"
+"X-Generator: Poedit 1.5.4\n"
 
 #: forms.py:15
 msgid "Your new password"
@@ -28,17 +28,17 @@ msgstr "Powtórzone hasło"
 msgid "Passwords do not match!"
 msgstr "Hasło i powtórzenie się nie zgadzają!"
 
-#: views.py:28
+#: views.py:32
 msgid "Profile has been changed."
 msgstr "Profil został zmieniony."
 
-#: views.py:42
+#: views.py:46
 msgid "Password has been changed."
 msgstr "Hasło zostało zmienione."
 
 #: templates/account/profile.html:8
-msgid "Change at Gravatar.com"
-msgstr "Zmień na Gravatar.com"
+msgid "Libravatar"
+msgstr "Libravatar"
 
 #: templates/account/profile.html:9
 msgid "Logout"
@@ -64,3 +64,128 @@ msgstr "Zmień hasło"
 msgid "Sign in to:"
 msgstr "Zaloguj do:"
 
+#: templates/account/register.html:5 templates/account/register.html.py:9
+msgid "Sign-up"
+msgstr "Zarejestruj"
+
+#: templates/registration/password_reset_complete.html:4
+#: templates/registration/password_reset_complete.html:9
+msgid "Password reset complete"
+msgstr "Hasło zostało zresetowane"
+
+#: templates/registration/password_reset_complete.html:11
+msgid "Your password has been set.  You may go ahead and log in now."
+msgstr "Twoje hasło zostało ustawione. Możesz się teraz zalogować."
+
+#: templates/registration/password_reset_complete.html:13
+msgid "Log in"
+msgstr "Zaloguj się"
+
+#: templates/registration/password_reset_confirm.html:4
+#: templates/registration/password_reset_done.html:7
+#: templates/registration/password_reset_form.html:4
+#: templates/registration/password_reset_form.html:8
+msgid "Password reset"
+msgstr "Zresetuj hasło"
+
+#: templates/registration/password_reset_confirm.html:10
+msgid "Enter new password"
+msgstr "Podaj nowe hasło"
+
+#: templates/registration/password_reset_confirm.html:12
+msgid ""
+"Please enter your new password twice so we can verify you typed it in "
+"correctly."
+msgstr ""
+"Podaj dwukrotnie nowe hasło, by można było zweryfikować, czy zostało wpisane "
+"poprawnie."
+
+#: templates/registration/password_reset_confirm.html:16
+msgid "New password:"
+msgstr "Nowe hasło:"
+
+#: templates/registration/password_reset_confirm.html:18
+msgid "Confirm password:"
+msgstr "Potwierdź hasło:"
+
+#: templates/registration/password_reset_confirm.html:19
+msgid "Change my password"
+msgstr "Zmień hasło"
+
+#: templates/registration/password_reset_confirm.html:24
+msgid "Password reset unsuccessful"
+msgstr "Zresetowanie hasła nie powiodło się"
+
+#: templates/registration/password_reset_confirm.html:26
+msgid ""
+"The password reset link was invalid, possibly because it has already been "
+"used.  Please request a new password reset."
+msgstr ""
+"Link do resetowania hasła był niepoprawny, być może dlatego, że został już "
+"raz użyty. Możesz ponownie zażądać zresetowania hasła."
+
+#: templates/registration/password_reset_done.html:6
+msgid "Home"
+msgstr "Początek"
+
+#: templates/registration/password_reset_done.html:11
+#: templates/registration/password_reset_done.html:15
+msgid "Password reset successful"
+msgstr "Hasło zmienione"
+
+#: templates/registration/password_reset_done.html:17
+msgid ""
+"We've emailed you instructions for setting your password to the email "
+"address you submitted. You should be receiving it shortly."
+msgstr ""
+"Wysłaliśmy Ci instrukcję odzyskiwania hasła na podany adres email. Wkrótce "
+"powinieneś/-naś ją otrzymać."
+
+#: templates/registration/password_reset_email.html:2
+msgid ""
+"You're receiving this email because you requested\n"
+"a password reset for your user account at Modern Poland Foundation."
+msgstr ""
+"Otrzymujesz tę wiadomość, ponieważ wybrałeś/-aś opcję\n"
+"odzyskiwania hasła w Fundacji Nowoczesna Polska."
+
+#: templates/registration/password_reset_email.html:5
+msgid "Please go to the following page and choose a new password:"
+msgstr ""
+"Aby wprowadzić nowe hasło, proszę przejść na stronę, której adres widnieje "
+"poniżej:"
+
+#: templates/registration/password_reset_email.html:9
+msgid "Your username, in case you've forgotten:"
+msgstr "Twoja nazwa użytkownika:"
+
+#: templates/registration/password_reset_email.html:11
+msgid "Thanks for using our services!"
+msgstr "Dziękujemy za korzystanie z naszych usług!"
+
+#: templates/registration/password_reset_email.html:13
+msgid "Modern Poland Foundation team"
+msgstr "Zespół Fundacji Nowoczesna Polska"
+
+#: templates/registration/password_reset_form.html:10
+msgid ""
+"Forgotten your password? Enter your email address below, and we'll email "
+"instructions for setting a new one."
+msgstr ""
+"Zapomniałeś/-aś hasła? Podaj swój adres e-mail,\n"
+"a wyślemy Ci instrukcję ustawienia nowego."
+
+#: templates/registration/password_reset_form.html:14
+msgid "Email address:"
+msgstr "Adres e-mail:"
+
+#: templates/registration/password_reset_form.html:14
+msgid "Reset my password"
+msgstr "Zresetuj moje hasło"
+
+#: templates/registration/password_reset_subject.txt:2
+msgid "Password reset at Modern Poland Foundation"
+msgstr "Odzyskiwanie hasła w Fundacji Nowoczesna Polska"
+
+#~ msgid "Change at Gravatar.com"
+#~ msgstr "Zmień na Gravatar.com"
index bc576d9..3845526 100644 (file)
@@ -1,12 +1,14 @@
 {% extends "base.html" %}
-{% load gravatar i18n %}
+{% load libravatar_tags i18n %}
 
 {% block content %}
        <aside class="user_avatar">
-               <img src="{% gravatar_for_email request.user.email 120 %}"
-            alt="Gravatar"
-            title="{% trans 'Change at Gravatar.com' %}">
+        <a href="https://avatars.nowoczesnapolska.org.pl/" title="{% trans 'How to change the avatar?' %}">
+               <img src="{% libravatar request.user.email 120 %}"
+            alt="Libravatar"></a>
                <p><a href="{% url 'cas_provider.views.logout' %}">{% trans "Logout" %}</a></p>
+
+    <p><small><a href="{% url 'socialaccount_connections' %}">{% trans "Manage external accounts" %}</a></small></p>
        </aside>
 
        <div id="details">
        </form>
 
        <h2>{% trans "Password change" %}</h2>
-       <form method="post" action="/accounts/change_password">
-    {% csrf_token %}
-       <table>
-               {{ pass_form.as_table }}
-               <tr><td colspan="2"><button type="submit">{% trans "Change password" %}</button></td></tr>
-               </table>
-       </form>
+    <a href="{% url 'account_change_password' %}">Zmień hasło</a>
+
        </div>
 
+
     {% if services %}
        <section id="services-list">
         <h1>{% trans "Sign in to:" %}</h1>
diff --git a/src/accounts/templates/account/register.html b/src/accounts/templates/account/register.html
new file mode 100755 (executable)
index 0000000..977135d
--- /dev/null
@@ -0,0 +1,11 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content_enclosed %}
+    <h1>{% trans "Sign-up" %}</h1>
+    <form id="register-form" method="post" action="{% url 'account_register' %}">
+    {% csrf_token %}
+        {{ form.as_p }}
+        <p><input type="submit" value="{% trans 'Sign-up' %}" /></p>
+    </form>
+{% endblock %}
diff --git a/src/accounts/templates/registration/password_reset_complete.html b/src/accounts/templates/registration/password_reset_complete.html
new file mode 100755 (executable)
index 0000000..5e0fda2
--- /dev/null
@@ -0,0 +1,16 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block title %}{% trans 'Password reset complete' %}{% endblock %}
+
+{% block content_enclosed %}
+
+
+<h1>{% trans 'Password reset complete' %}</h1>
+
+<p>{% trans "Your password has been set.  You may go ahead and log in now." %}</p>
+
+<p><a href="{{ login_url }}">{% trans 'Log in' %}</a></p>
+
+
+{% endblock %}
diff --git a/src/accounts/templates/registration/password_reset_confirm.html b/src/accounts/templates/registration/password_reset_confirm.html
new file mode 100755 (executable)
index 0000000..2d4147d
--- /dev/null
@@ -0,0 +1,30 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block title %}{% trans 'Password reset' %}{% endblock %}
+
+{% block content_enclosed %}
+
+{% if validlink %}
+
+<h1>{% trans 'Enter new password' %}</h1>
+
+<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
+
+<form action="" method="post">{% csrf_token %}
+{{ form.new_password1.errors }}
+<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>
+{{ form.new_password2.errors }}
+<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p>
+<p><input type="submit" value="{% trans 'Change my password' %}" /></p>
+</form>
+
+{% else %}
+
+<h1>{% trans 'Password reset unsuccessful' %}</h1>
+
+<p>{% trans "The password reset link was invalid, possibly because it has already been used.  Please request a new password reset." %}</p>
+
+{% endif %}
+
+{% endblock %}
diff --git a/src/accounts/templates/registration/password_reset_done.html b/src/accounts/templates/registration/password_reset_done.html
new file mode 100755 (executable)
index 0000000..81a46e8
--- /dev/null
@@ -0,0 +1,19 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block breadcrumbs %}
+<div class="breadcrumbs">
+<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
+&rsaquo; {% trans 'Password reset' %}
+</div>
+{% endblock %}
+
+{% block title %}{% trans 'Password reset successful' %}{% endblock %}
+
+{% block content_enclosed %}
+
+<h1>{% trans 'Password reset successful' %}</h1>
+
+<p>{% trans "We've emailed you instructions for setting your password to the email address you submitted. You should be receiving it shortly." %}</p>
+
+{% endblock %}
diff --git a/src/accounts/templates/registration/password_reset_email.html b/src/accounts/templates/registration/password_reset_email.html
new file mode 100755 (executable)
index 0000000..9b5ff52
--- /dev/null
@@ -0,0 +1,15 @@
+{% load i18n %}{% autoescape off %}
+{% blocktrans %}You're receiving this email because you requested
+a password reset for your user account at Modern Poland Foundation.{% endblocktrans %}
+
+{% trans "Please go to the following page and choose a new password:" %}
+{% block reset_link %}
+{{ protocol }}://{{ domain }}{% url 'django.contrib.auth.views.password_reset_confirm' uidb36=uid token=token %}
+{% endblock %}
+{% trans "Your username, in case you've forgotten:" %} {{ user.get_username }}
+
+{% trans "Thanks for using our services!" %}
+
+{% blocktrans %}Modern Poland Foundation team{% endblocktrans %}
+
+{% endautoescape %}
diff --git a/src/accounts/templates/registration/password_reset_form.html b/src/accounts/templates/registration/password_reset_form.html
new file mode 100755 (executable)
index 0000000..43441ea
--- /dev/null
@@ -0,0 +1,17 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block title %}{% trans "Password reset" %}{% endblock %}
+
+{% block content_enclosed %}
+
+<h1>{% trans "Password reset" %}</h1>
+
+<p>{% trans "Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one." %}</p>
+
+<form action="" method="post">{% csrf_token %}
+{{ form.email.errors }}
+<p><label for="id_email">{% trans 'Email address:' %}</label> {{ form.email }} <input type="submit" value="{% trans 'Reset my password' %}" /></p>
+</form>
+
+{% endblock %}
diff --git a/src/accounts/templates/registration/password_reset_subject.txt b/src/accounts/templates/registration/password_reset_subject.txt
new file mode 100755 (executable)
index 0000000..6e6186e
--- /dev/null
@@ -0,0 +1,3 @@
+{% load i18n %}{% autoescape off %}
+{% blocktrans %}Password reset at Modern Poland Foundation{% endblocktrans %}
+{% endautoescape %}
index 41752f8..ab557c7 100644 (file)
@@ -1,8 +1,22 @@
 # -*- coding: utf-8 -*-
+from django.conf import settings
 from django.conf.urls import patterns, url
+from .views import Register
 
 urlpatterns = patterns('accounts.views',
-    url(r'^$', 'account_profile'),
+    url(r'^$', 'account_profile', name='account_profile'),
     url(r'^change_profile$', 'account_change_basic_profile'),
     url(r'^change_password$', 'account_change_password'),
 )
+
+if settings.REGISTRATION_OPEN:
+    urlpatterns += patterns('accounts.views',
+        url(r'^register/$', Register.as_view(), name='account_register'),
+    )
+
+urlpatterns += patterns('django.contrib.auth.views',
+    url(r'^password_reset/$', 'password_reset', name='account_reset_password'),
+    url(r'^password_reset_done/$', 'password_reset_done'),
+    url(r'^password_reset_confirm/(?P<uidb36>[^/]+)/(?P<token>[^/]+)/$', 'password_reset_confirm'),
+    url(r'^password_reset_complete/$', 'password_reset_complete'),
+)
index 5f153c0..799b4fe 100644 (file)
@@ -2,11 +2,16 @@
 from django import http
 from django.contrib.auth.decorators import login_required
 from django.contrib import messages
-from django.shortcuts import render
+from django.shortcuts import render, redirect
 from django.utils.translation import ugettext as _
 from django.views.decorators.http import require_POST
 from accounts.forms import UserBasicForm, UserPasswordForm
 from .models import Service
+from django.views.generic.edit import FormView
+from django.contrib.auth import login
+from django.contrib.auth.models import User
+from django.contrib.auth.forms import UserCreationForm
+
 
 @login_required
 def account_profile(request, basic_form=None, pass_form=None):
@@ -42,3 +47,14 @@ def account_change_password(request):
         return http.HttpResponseRedirect('/accounts/')
 
     return account_profile(request, pass_form=form)
+
+
+class Register(FormView):
+    form_class = UserCreationForm
+    template_name = "account/register.html"
+
+    def form_valid(self, form):
+        user = form.save()
+        user.backend='django.contrib.auth.backends.ModelBackend'
+        login(self.request, user)
+        return redirect('account_profile')
diff --git a/src/cas/context_processors.py b/src/cas/context_processors.py
new file mode 100644 (file)
index 0000000..e302ac4
--- /dev/null
@@ -0,0 +1,7 @@
+from django.conf import settings as _settings
+
+view_settings = dict((k, getattr(_settings, k)) for k in
+    _settings.TEMPLATE_CONTEXT_SETTINGS)
+
+def settings(request):
+    return {'settings': view_settings}
diff --git a/src/cas/locale-contrib/django.pot b/src/cas/locale-contrib/django.pot
new file mode 100644 (file)
index 0000000..306bfb3
--- /dev/null
@@ -0,0 +1,621 @@
+# Translations template for PROJECT.
+# Copyright (C) 2013 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2013-08-05 13:14+0200\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"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.6\n"
+
+#: allauth/account/adapter.py:167
+msgid "Usernames can only contain letters, digits and @/./+/-/_."
+msgstr ""
+
+#: allauth/account/adapter.py:172
+msgid "Username can not be used. Please use other username."
+msgstr ""
+
+#: allauth/account/forms.py:33
+#: allauth/account/forms.py:51
+#: allauth/account/forms.py:237
+#: allauth/account/forms.py:343
+msgid "Password"
+msgstr ""
+
+#: allauth/account/forms.py:43
+msgid "Password must be a minimum of {0} characters."
+msgstr ""
+
+#: allauth/account/forms.py:53
+msgid "Remember Me"
+msgstr ""
+
+#: allauth/account/forms.py:64
+#: allauth/account/forms.py:178
+msgid "E-mail address"
+msgstr ""
+
+#: allauth/account/forms.py:65
+#: allauth/account/forms.py:189
+#: allauth/account/forms.py:292
+#: allauth/account/forms.py:360
+msgid "E-mail"
+msgstr ""
+
+#: allauth/account/forms.py:70
+#: allauth/account/forms.py:71
+#: allauth/account/forms.py:171
+#: allauth/account/forms.py:175
+msgid "Username"
+msgstr ""
+
+#: allauth/account/forms.py:78
+msgid "Username or e-mail"
+msgstr ""
+
+#: allauth/account/forms.py:111
+msgid "This account is currently inactive."
+msgstr ""
+
+#: allauth/account/forms.py:115
+msgid "The e-mail address and/or password you specified are not correct."
+msgstr ""
+
+#: allauth/account/forms.py:119
+msgid "The username and/or password you specified are not correct."
+msgstr ""
+
+#: allauth/account/forms.py:122
+msgid "The login and/or password you specified are not correct."
+msgstr ""
+
+#: allauth/account/forms.py:192
+msgid "E-mail (optional)"
+msgstr ""
+
+#: allauth/account/forms.py:207
+msgid "This username is already taken. Please choose another."
+msgstr ""
+
+#: allauth/account/forms.py:216
+msgid "A user is already registered with this e-mail address."
+msgstr ""
+
+#: allauth/account/forms.py:238
+#: allauth/account/forms.py:344
+msgid "Password (again)"
+msgstr ""
+
+#: allauth/account/forms.py:256
+#: allauth/account/forms.py:333
+#: allauth/account/forms.py:349
+#: allauth/account/forms.py:418
+msgid "You must type the same password each time."
+msgstr ""
+
+#: allauth/account/forms.py:301
+msgid "This e-mail address is already associated with this account."
+msgstr ""
+
+#: allauth/account/forms.py:302
+msgid "This e-mail address is already associated with another account."
+msgstr ""
+
+#: allauth/account/forms.py:321
+msgid "Current Password"
+msgstr ""
+
+#: allauth/account/forms.py:322
+#: allauth/account/forms.py:406
+msgid "New Password"
+msgstr ""
+
+#: allauth/account/forms.py:323
+#: allauth/account/forms.py:407
+msgid "New Password (again)"
+msgstr ""
+
+#: allauth/account/forms.py:327
+msgid "Please type your current password."
+msgstr ""
+
+#: allauth/account/forms.py:371
+msgid "The e-mail address is not assigned to any user account"
+msgstr ""
+
+#: allauth/account/models.py:31
+msgid "email address"
+msgstr ""
+
+#: allauth/account/models.py:32
+msgid "email addresses"
+msgstr ""
+
+#: allauth/account/models.py:82
+msgid "email confirmation"
+msgstr ""
+
+#: allauth/account/models.py:83
+msgid "email confirmations"
+msgstr ""
+
+#: allauth/account/utils.py:290
+#, python-format
+msgid "Confirmation e-mail sent to %(email)s"
+msgstr ""
+
+#: allauth/socialaccount/adapter.py:74
+msgid "Your account has no password set up."
+msgstr ""
+
+#: allauth/socialaccount/adapter.py:78
+msgid "Your account has no verified e-mail address."
+msgstr ""
+
+#: allauth/socialaccount/providers/oauth/client.py:78
+#, python-format
+msgid "Invalid response while obtaining request token from \"%s\"."
+msgstr ""
+
+#: allauth/socialaccount/providers/oauth/client.py:102
+#, python-format
+msgid "Invalid response while obtaining access token from \"%s\"."
+msgstr ""
+
+#: allauth/socialaccount/providers/oauth/client.py:115
+#, python-format
+msgid "No request token saved for \"%s\"."
+msgstr ""
+
+#: allauth/socialaccount/providers/oauth/client.py:159
+#, python-format
+msgid "No access token saved for \"%s\"."
+msgstr ""
+
+#: allauth/socialaccount/providers/oauth/client.py:177
+#, python-format
+msgid "No access to private resources at \"%s\"."
+msgstr ""
+
+#: allauth/templates/account/email.html:6
+msgid "Account"
+msgstr ""
+
+#: allauth/templates/account/email.html:9
+msgid "E-mail Addresses"
+msgstr ""
+
+#: allauth/templates/account/email.html:11
+msgid "The following e-mail addresses are associated with your account:"
+msgstr ""
+
+#: allauth/templates/account/email.html:25
+msgid "Verified"
+msgstr ""
+
+#: allauth/templates/account/email.html:27
+msgid "Unverified"
+msgstr ""
+
+#: allauth/templates/account/email.html:29
+msgid "Primary"
+msgstr ""
+
+#: allauth/templates/account/email.html:35
+msgid "Make Primary"
+msgstr ""
+
+#: allauth/templates/account/email.html:36
+msgid "Re-send Verification"
+msgstr ""
+
+#: allauth/templates/account/email.html:37
+#: allauth/templates/socialaccount/connections.html:35
+msgid "Remove"
+msgstr ""
+
+#: allauth/templates/account/email.html:44
+msgid "Warning:"
+msgstr ""
+
+#: allauth/templates/account/email.html:44
+msgid ""
+"You currently do not have any e-mail address set up. You should really "
+"add an e-mail address so you can receive notifications, reset your "
+"password, etc."
+msgstr ""
+
+#: allauth/templates/account/email.html:49
+msgid "Add E-mail Address"
+msgstr ""
+
+#: allauth/templates/account/email.html:54
+msgid "Add E-mail"
+msgstr ""
+
+#: allauth/templates/account/email.html:63
+msgid "Do you really want to remove the selected e-mail address?"
+msgstr ""
+
+#: allauth/templates/account/email_confirm.html:7
+#: allauth/templates/account/email_confirm.html:11
+#: allauth/templates/account/email_confirmed.html:6
+#: allauth/templates/account/email_confirmed.html:11
+#: allauth/templates/account/email/email_confirmation_subject.txt:3
+msgid "Confirm E-mail Address"
+msgstr ""
+
+#: allauth/templates/account/email_confirm.html:17
+#, python-format
+msgid ""
+"Please confirm that <a href=\"mailto:%(email)s\">%(email)s</a> is an "
+"e-mail address for user %(user_display)s."
+msgstr ""
+
+#: allauth/templates/account/email_confirm.html:21
+msgid "Confirm"
+msgstr ""
+
+#: allauth/templates/account/email_confirm.html:28
+#, python-format
+msgid ""
+"This e-mail confirmation link expired or is invalid. Please <a "
+"href=\"%(email_url)s\">issue a new e-mail confirmation request</a>."
+msgstr ""
+
+#: allauth/templates/account/email_confirmed.html:15
+#, python-format
+msgid ""
+"You have confirmed that <a href=\"mailto:%(email)s\">%(email)s</a> is an "
+"e-mail address for user %(user_display)s."
+msgstr ""
+
+#: allauth/templates/account/login.html:7
+#: allauth/templates/account/login.html:11
+#: allauth/templates/account/login.html:39
+msgid "Sign In"
+msgstr ""
+
+#: allauth/templates/account/login.html:16
+#, python-format
+msgid ""
+"Please sign in with one\n"
+"of your existing third party accounts. Or, <a "
+"href=\"%(signup_url)s\">sign up</a> \n"
+"for a %(site_name)s account and sign in below:"
+msgstr ""
+
+#: allauth/templates/account/login.html:24
+msgid "or"
+msgstr ""
+
+#: allauth/templates/account/login.html:38
+msgid "Forgot Password?"
+msgstr ""
+
+#: allauth/templates/account/logout.html:6
+#: allauth/templates/account/logout.html:9
+#: allauth/templates/account/logout.html:18
+msgid "Sign Out"
+msgstr ""
+
+#: allauth/templates/account/logout.html:11
+msgid "Are you sure you want to sign out?"
+msgstr ""
+
+#: allauth/templates/account/password_change.html:4
+#: allauth/templates/account/password_change.html:7
+#: allauth/templates/account/password_change.html:12
+#: allauth/templates/account/password_reset_from_key.html:5
+#: allauth/templates/account/password_reset_from_key.html:8
+msgid "Change Password"
+msgstr ""
+
+#: allauth/templates/account/password_delete.html:5
+#: allauth/templates/account/password_delete.html:8
+msgid "Delete Password"
+msgstr ""
+
+#: allauth/templates/account/password_delete.html:9
+msgid ""
+"You may delete your password since you are currently logged in using "
+"OpenID."
+msgstr ""
+
+#: allauth/templates/account/password_delete.html:12
+msgid "delete my password"
+msgstr ""
+
+#: allauth/templates/account/password_delete_done.html:5
+#: allauth/templates/account/password_delete_done.html:8
+msgid "Password Deleted"
+msgstr ""
+
+#: allauth/templates/account/password_delete_done.html:9
+msgid "Your password has been deleted."
+msgstr ""
+
+#: allauth/templates/account/password_reset.html:6
+#: allauth/templates/account/password_reset.html:10
+#: allauth/templates/account/password_reset_done.html:6
+#: allauth/templates/account/password_reset_done.html:9
+msgid "Password Reset"
+msgstr ""
+
+#: allauth/templates/account/password_reset.html:15
+msgid ""
+"Forgotten your password? Enter your e-mail address below, and we'll send "
+"you an e-mail allowing you to reset it."
+msgstr ""
+
+#: allauth/templates/account/password_reset.html:20
+msgid "Reset My Password"
+msgstr ""
+
+#: allauth/templates/account/password_reset.html:23
+msgid "Please contact us if you have any trouble resetting your password."
+msgstr ""
+
+#: allauth/templates/account/password_reset_done.html:15
+msgid ""
+"We have sent you an e-mail. Please contact us if you do not receive it "
+"within a few minutes."
+msgstr ""
+
+#: allauth/templates/account/password_reset_from_key.html:8
+msgid "Bad Token"
+msgstr ""
+
+#: allauth/templates/account/password_reset_from_key.html:12
+#, python-format
+msgid ""
+"The password reset link was invalid, possibly because it has already been"
+" used.  Please request a <a href=\"%(passwd_reset_url)s\">new password "
+"reset</a>."
+msgstr ""
+
+#: allauth/templates/account/password_reset_from_key.html:18
+msgid "change password"
+msgstr ""
+
+#: allauth/templates/account/password_reset_from_key.html:21
+msgid "Your password is now changed."
+msgstr ""
+
+#: allauth/templates/account/password_set.html:5
+#: allauth/templates/account/password_set.html:8
+#: allauth/templates/account/password_set.html:13
+msgid "Set Password"
+msgstr ""
+
+#: allauth/templates/account/signup.html:6
+#: allauth/templates/socialaccount/signup.html:5
+msgid "Signup"
+msgstr ""
+
+#: allauth/templates/account/signup.html:9
+#: allauth/templates/account/signup.html:19
+#: allauth/templates/socialaccount/signup.html:8
+#: allauth/templates/socialaccount/signup.html:19
+msgid "Sign Up"
+msgstr ""
+
+#: allauth/templates/account/signup.html:11
+#, python-format
+msgid ""
+"Already have an account? Then please <a href=\"%(login_url)s\">sign "
+"in</a>."
+msgstr ""
+
+#: allauth/templates/account/signup_closed.html:6
+#: allauth/templates/account/signup_closed.html:9
+msgid "Sign Up Closed"
+msgstr ""
+
+#: allauth/templates/account/signup_closed.html:11
+msgid "We are sorry, but the sign up is currently closed."
+msgstr ""
+
+#: allauth/templates/account/verification_sent.html:5
+#: allauth/templates/account/verification_sent.html:8
+#: allauth/templates/account/verified_email_required.html:6
+#: allauth/templates/account/verified_email_required.html:9
+msgid "Verify Your E-mail Address"
+msgstr ""
+
+#: allauth/templates/account/verification_sent.html:10
+#, python-format
+msgid ""
+"We have sent an e-mail to <a href=\"mailto:%(email)s\">%(email)s</a> for "
+"verification. Follow the link provided to finalize the signup process. "
+"Please contact us if you do not receive it within a few minutes."
+msgstr ""
+
+#: allauth/templates/account/verified_email_required.html:15
+msgid ""
+"This part of the site requires us to verify that\n"
+"you are who you claim to be. For this purpose, we require that you\n"
+"verify ownership of your e-mail address. "
+msgstr ""
+
+#: allauth/templates/account/verified_email_required.html:19
+msgid ""
+"We have sent an e-mail to you for\n"
+"verification. Please click on the link inside this e-mail. Please\n"
+"contact us if you do not receive it within a few minutes."
+msgstr ""
+
+#: allauth/templates/account/verified_email_required.html:21
+#, python-format
+msgid ""
+"<strong>Note:</strong> you can still <a href=\"%(email_url)s\">change "
+"your e-mail address</a>."
+msgstr ""
+
+#: allauth/templates/account/email/email_confirmation_message.txt:4
+#, python-format
+msgid ""
+"User %(user_display)s at %(site_name)s has given this as an email "
+"address.\n"
+"\n"
+"To confirm this is correct, go to %(activate_url)s\n"
+msgstr ""
+
+#: allauth/templates/account/email/password_reset_key_message.txt:9
+#, python-format
+msgid ""
+"You're receiving this e-mail because you or someone else has requested a "
+"password for your user account at %(site_domain)s.\n"
+"It can be safely ignored if you did not request a password reset. Click "
+"the link below to reset your password.\n"
+"\n"
+"%(password_reset_url)s\n"
+"\n"
+"In case you forgot, your username is %(username)s.\n"
+"\n"
+"Thanks for using our site!\n"
+msgstr ""
+
+#: allauth/templates/account/email/password_reset_key_subject.txt:3
+msgid "Password Reset E-mail"
+msgstr ""
+
+#: allauth/templates/account/messages/cannot_delete_primary_email.txt:2
+#, python-format
+msgid "You cannot remove your primary e-mail address (%(email)s)."
+msgstr ""
+
+#: allauth/templates/account/messages/email_confirmation_sent.txt:2
+#, python-format
+msgid "Confirmation e-mail sent to %(email)s."
+msgstr ""
+
+#: allauth/templates/account/messages/email_confirmed.txt:2
+#, python-format
+msgid "You have confirmed %(email)s."
+msgstr ""
+
+#: allauth/templates/account/messages/email_deleted.txt:2
+#, python-format
+msgid "Removed e-mail address %(email)s."
+msgstr ""
+
+#: allauth/templates/account/messages/logged_in.txt:4
+#, python-format
+msgid "Successfully signed in as %(name)s."
+msgstr ""
+
+#: allauth/templates/account/messages/logged_out.txt:2
+msgid "You have signed out."
+msgstr ""
+
+#: allauth/templates/account/messages/password_changed.txt:2
+msgid "Password successfully changed."
+msgstr ""
+
+#: allauth/templates/account/messages/password_set.txt:2
+msgid "Password successfully set."
+msgstr ""
+
+#: allauth/templates/account/messages/primary_email_set.txt:2
+msgid "Primary e-mail address set."
+msgstr ""
+
+#: allauth/templates/account/messages/unverified_primary_email.txt:2
+msgid "Your primary e-mail address must be verified."
+msgstr ""
+
+#: allauth/templates/account/snippets/already_logged_in.html:5
+msgid "Note"
+msgstr ""
+
+#: allauth/templates/account/snippets/already_logged_in.html:5
+#, python-format
+msgid "you are already logged in as %(user_display)s."
+msgstr ""
+
+#: allauth/templates/openid/login.html:10
+msgid "OpenID Sign In"
+msgstr ""
+
+#: allauth/templates/socialaccount/account_inactive.html:5
+#: allauth/templates/socialaccount/account_inactive.html:8
+msgid "Account Inactive"
+msgstr ""
+
+#: allauth/templates/socialaccount/account_inactive.html:10
+msgid "This account is inactive."
+msgstr ""
+
+#: allauth/templates/socialaccount/authentication_error.html:5
+#: allauth/templates/socialaccount/authentication_error.html:8
+msgid "Social Network Login Failure"
+msgstr ""
+
+#: allauth/templates/socialaccount/authentication_error.html:10
+msgid ""
+"An error occurred while attempting to login via your social network "
+"account."
+msgstr ""
+
+#: allauth/templates/socialaccount/connections.html:5
+#: allauth/templates/socialaccount/connections.html:8
+msgid "Account Connections"
+msgstr ""
+
+#: allauth/templates/socialaccount/connections.html:11
+msgid ""
+"You can sign in to your account using any of the following third party "
+"accounts:"
+msgstr ""
+
+#: allauth/templates/socialaccount/connections.html:43
+msgid "You currently have no social network accounts connected to this account."
+msgstr ""
+
+#: allauth/templates/socialaccount/connections.html:46
+msgid "Add a 3rd Party Account"
+msgstr ""
+
+#: allauth/templates/socialaccount/login_cancelled.html:6
+#: allauth/templates/socialaccount/login_cancelled.html:10
+msgid "Login Cancelled"
+msgstr ""
+
+#: allauth/templates/socialaccount/login_cancelled.html:14
+#, python-format
+msgid ""
+"You decided to cancel logging in to our site using one of your existing "
+"accounts. If this was a mistake, please proceed to <a "
+"href=\"%(login_url)s\">sign in</a>."
+msgstr ""
+
+#: allauth/templates/socialaccount/signup.html:11
+#, python-format
+msgid ""
+"You are about to use your %(provider_name)s account to login to \n"
+"%(site_name)s. As a final step, please complete the following form:"
+msgstr ""
+
+#: allauth/templates/socialaccount/messages/account_connected.txt:2
+msgid "The social account has been connected."
+msgstr ""
+
+#: allauth/templates/socialaccount/messages/account_connected_other.txt:2
+msgid "The social account is already connected to a different account."
+msgstr ""
+
+#: allauth/templates/socialaccount/messages/account_disconnected.txt:2
+msgid "The social account has been disconnected."
+msgstr ""
+
diff --git a/src/cas/locale-contrib/pl/LC_MESSAGES/django.mo b/src/cas/locale-contrib/pl/LC_MESSAGES/django.mo
new file mode 100644 (file)
index 0000000..8f3a9b0
Binary files /dev/null and b/src/cas/locale-contrib/pl/LC_MESSAGES/django.mo differ
diff --git a/src/cas/locale-contrib/pl/LC_MESSAGES/django.pl b/src/cas/locale-contrib/pl/LC_MESSAGES/django.pl
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/cas/locale-contrib/pl/LC_MESSAGES/django.po b/src/cas/locale-contrib/pl/LC_MESSAGES/django.po
new file mode 100644 (file)
index 0000000..d45751e
--- /dev/null
@@ -0,0 +1,660 @@
+# Polish translations for PROJECT.
+# Copyright (C) 2013 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2013-08-05 13:14+0200\n"
+"PO-Revision-Date: 2013-08-05 13:35+0100\n"
+"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
+"Language-Team: pl <LL@li.org>\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2);\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.6\n"
+"X-Generator: Poedit 1.5.4\n"
+
+#: allauth/account/adapter.py:167
+msgid "Usernames can only contain letters, digits and @/./+/-/_."
+msgstr "Login może zawierać tylko litery, cyfry i znaki @/./+/-/_."
+
+#: allauth/account/adapter.py:172
+msgid "Username can not be used. Please use other username."
+msgstr "Ta nazwa użytkownika nie może zostać użyta. Prosimy użyć innej."
+
+#: allauth/account/forms.py:33 allauth/account/forms.py:51
+#: allauth/account/forms.py:237 allauth/account/forms.py:343
+msgid "Password"
+msgstr "Hasło"
+
+#: allauth/account/forms.py:43
+msgid "Password must be a minimum of {0} characters."
+msgstr "Hasło musi składać się z co najmniej {0} znaków."
+
+#: allauth/account/forms.py:53
+msgid "Remember Me"
+msgstr "Zapamiętaj mnie"
+
+#: allauth/account/forms.py:64 allauth/account/forms.py:178
+msgid "E-mail address"
+msgstr "Adres e-mail"
+
+#: allauth/account/forms.py:65 allauth/account/forms.py:189
+#: allauth/account/forms.py:292 allauth/account/forms.py:360
+msgid "E-mail"
+msgstr "E-mail"
+
+#: allauth/account/forms.py:70 allauth/account/forms.py:71
+#: allauth/account/forms.py:171 allauth/account/forms.py:175
+msgid "Username"
+msgstr "Nazwa użytkownika"
+
+#: allauth/account/forms.py:78
+msgid "Username or e-mail"
+msgstr "Nazwa użytkownika lub e-mail."
+
+#: allauth/account/forms.py:111
+msgid "This account is currently inactive."
+msgstr "Konto jest nieaktywne."
+
+#: allauth/account/forms.py:115
+msgid "The e-mail address and/or password you specified are not correct."
+msgstr "Podany e-mail i/lub hasło są niepoprawne."
+
+#: allauth/account/forms.py:119
+msgid "The username and/or password you specified are not correct."
+msgstr "Nazwa użytkownika i/lub hasło są niepoprawne."
+
+#: allauth/account/forms.py:122
+msgid "The login and/or password you specified are not correct."
+msgstr "Podany login i/lub hasło są niepoprawne."
+
+#: allauth/account/forms.py:192
+msgid "E-mail (optional)"
+msgstr "E-mail (opcjonalnie)"
+
+#: allauth/account/forms.py:207
+msgid "This username is already taken. Please choose another."
+msgstr "Ta nazwa użytkownika jest zajęta. Proszę wybrać inną."
+
+#: allauth/account/forms.py:216
+msgid "A user is already registered with this e-mail address."
+msgstr "Istnieje już użytkownik o tym adresie e-mail."
+
+#: allauth/account/forms.py:238 allauth/account/forms.py:344
+msgid "Password (again)"
+msgstr "Hasło (ponownie)"
+
+#: allauth/account/forms.py:256 allauth/account/forms.py:333
+#: allauth/account/forms.py:349 allauth/account/forms.py:418
+msgid "You must type the same password each time."
+msgstr "Proszę wpisać dwa razy to samo hasło."
+
+#: allauth/account/forms.py:301
+msgid "This e-mail address is already associated with this account."
+msgstr "Ten adres e-mail jest już używany przez to konto."
+
+#: allauth/account/forms.py:302
+msgid "This e-mail address is already associated with another account."
+msgstr "Ten adres e-mail jest już używany przez inne konto."
+
+#: allauth/account/forms.py:321
+msgid "Current Password"
+msgstr "Aktualne hasło"
+
+#: allauth/account/forms.py:322 allauth/account/forms.py:406
+msgid "New Password"
+msgstr "Nowe hasło"
+
+#: allauth/account/forms.py:323 allauth/account/forms.py:407
+msgid "New Password (again)"
+msgstr "Nowe hasło (ponownie)"
+
+#: allauth/account/forms.py:327
+msgid "Please type your current password."
+msgstr "Proszę wpisać swoje aktualne hasło."
+
+#: allauth/account/forms.py:371
+msgid "The e-mail address is not assigned to any user account"
+msgstr "Ten adres e-mail nie jest używany przez żadne konto."
+
+#: allauth/account/models.py:31
+msgid "email address"
+msgstr "adres e-mail"
+
+#: allauth/account/models.py:32
+msgid "email addresses"
+msgstr "adresy e-mail"
+
+#: allauth/account/models.py:82
+msgid "email confirmation"
+msgstr "potwierdzenie adresu e-mail"
+
+#: allauth/account/models.py:83
+msgid "email confirmations"
+msgstr "potwierdzenia adresów e-mail"
+
+#: allauth/account/utils.py:290
+#, python-format
+msgid "Confirmation e-mail sent to %(email)s"
+msgstr "E-mail potwierdzający wysłany do %(email)s"
+
+#: allauth/socialaccount/adapter.py:74
+msgid "Your account has no password set up."
+msgstr "Twoje konto nie ma ustawionego hasła."
+
+#: allauth/socialaccount/adapter.py:78
+msgid "Your account has no verified e-mail address."
+msgstr "Twoje konto nie ma potwierdzonego adresu e-mail."
+
+#: allauth/socialaccount/providers/oauth/client.py:78
+#, python-format
+msgid "Invalid response while obtaining request token from \"%s\"."
+msgstr ""
+
+#: allauth/socialaccount/providers/oauth/client.py:102
+#, python-format
+msgid "Invalid response while obtaining access token from \"%s\"."
+msgstr ""
+
+#: allauth/socialaccount/providers/oauth/client.py:115
+#, python-format
+msgid "No request token saved for \"%s\"."
+msgstr ""
+
+#: allauth/socialaccount/providers/oauth/client.py:159
+#, python-format
+msgid "No access token saved for \"%s\"."
+msgstr ""
+
+#: allauth/socialaccount/providers/oauth/client.py:177
+#, python-format
+msgid "No access to private resources at \"%s\"."
+msgstr ""
+
+#: allauth/templates/account/email.html:6
+msgid "Account"
+msgstr "Konto"
+
+#: allauth/templates/account/email.html:9
+msgid "E-mail Addresses"
+msgstr "Adresy e-mail"
+
+#: allauth/templates/account/email.html:11
+msgid "The following e-mail addresses are associated with your account:"
+msgstr "Z Twoim kontem są związane następujące adresy e-mail:"
+
+#: allauth/templates/account/email.html:25
+msgid "Verified"
+msgstr "Potwierdzony"
+
+#: allauth/templates/account/email.html:27
+msgid "Unverified"
+msgstr "Nie potwierdzony"
+
+#: allauth/templates/account/email.html:29
+msgid "Primary"
+msgstr "Główny"
+
+#: allauth/templates/account/email.html:35
+msgid "Make Primary"
+msgstr "Ustaw jako główny"
+
+#: allauth/templates/account/email.html:36
+msgid "Re-send Verification"
+msgstr "Ponownie prześlij link potwierdzający"
+
+#: allauth/templates/account/email.html:37
+#: allauth/templates/socialaccount/connections.html:35
+msgid "Remove"
+msgstr "Usuń"
+
+#: allauth/templates/account/email.html:44
+msgid "Warning:"
+msgstr "Uwaga:"
+
+#: allauth/templates/account/email.html:44
+msgid ""
+"You currently do not have any e-mail address set up. You should really add "
+"an e-mail address so you can receive notifications, reset your password, etc."
+msgstr ""
+"Nie masz ustawionego żadnego adresu e-mail. Dodanie adresu e-mail umożliwi "
+"otrzymywanie powiadomień, odzyskanie konta w przypadku utraty hasła itp.."
+
+#: allauth/templates/account/email.html:49
+msgid "Add E-mail Address"
+msgstr "Dodaj adres e-mail"
+
+#: allauth/templates/account/email.html:54
+msgid "Add E-mail"
+msgstr "Dodaj e-mail"
+
+#: allauth/templates/account/email.html:63
+msgid "Do you really want to remove the selected e-mail address?"
+msgstr "Czy na pewno usunąć wybrany adres e-mail?"
+
+#: allauth/templates/account/email_confirm.html:7
+#: allauth/templates/account/email_confirm.html:11
+#: allauth/templates/account/email_confirmed.html:6
+#: allauth/templates/account/email_confirmed.html:11
+#: allauth/templates/account/email/email_confirmation_subject.txt:3
+msgid "Confirm E-mail Address"
+msgstr "Potwierdź adres e-mail"
+
+#: allauth/templates/account/email_confirm.html:17
+#, python-format
+msgid ""
+"Please confirm that <a href=\"mailto:%(email)s\">%(email)s</a> is an e-mail "
+"address for user %(user_display)s."
+msgstr ""
+"Proszę potwierdzić adres <a href=\"mailto:%(email)s\">%(email)s</a> jako e-"
+"mail użytkownika %(user_display)s."
+
+#: allauth/templates/account/email_confirm.html:21
+msgid "Confirm"
+msgstr "Potwierdź"
+
+#: allauth/templates/account/email_confirm.html:28
+#, python-format
+msgid ""
+"This e-mail confirmation link expired or is invalid. Please <a href="
+"\"%(email_url)s\">issue a new e-mail confirmation request</a>."
+msgstr ""
+"Ten link z wiadomości e-mail jest nieprawidłowy lub nieaktualny. Możesz <a "
+"href=\"%(email_url)s\">zamówić kolejny link weryfikacyjny</a>."
+
+#: allauth/templates/account/email_confirmed.html:15
+#, python-format
+msgid ""
+"You have confirmed that <a href=\"mailto:%(email)s\">%(email)s</a> is an e-"
+"mail address for user %(user_display)s."
+msgstr ""
+"Adres <a href=\"mailto:%(email)s\">%(email)s</a> został właśnie powierdzony "
+"jako e-mail dla użytkownika %(user_display)s."
+
+#: allauth/templates/account/login.html:7
+#: allauth/templates/account/login.html:11
+#: allauth/templates/account/login.html:39
+msgid "Sign In"
+msgstr "Zaloguj"
+
+#: allauth/templates/account/login.html:16
+#, python-format
+msgid ""
+"Please sign in with one\n"
+"of your existing third party accounts. Or, <a href=\"%(signup_url)s\">sign "
+"up</a> \n"
+"for a %(site_name)s account and sign in below:"
+msgstr ""
+"Zaloguj za pomocą konta zewnętrznego, albo <a \n"
+"href=\"%(signup_url)s\">zarejestruj się</a> w serwisie %(site_name)s i "
+"zaloguj poniżej:"
+
+#: allauth/templates/account/login.html:24
+msgid "or"
+msgstr "lub"
+
+#: allauth/templates/account/login.html:38
+msgid "Forgot Password?"
+msgstr "Nie pamiętasz hasła?"
+
+#: allauth/templates/account/logout.html:6
+#: allauth/templates/account/logout.html:9
+#: allauth/templates/account/logout.html:18
+msgid "Sign Out"
+msgstr "Wylogowano"
+
+#: allauth/templates/account/logout.html:11
+msgid "Are you sure you want to sign out?"
+msgstr "Czy na pewno chcesz się wylogować?"
+
+#: allauth/templates/account/password_change.html:4
+#: allauth/templates/account/password_change.html:7
+#: allauth/templates/account/password_change.html:12
+#: allauth/templates/account/password_reset_from_key.html:5
+#: allauth/templates/account/password_reset_from_key.html:8
+msgid "Change Password"
+msgstr "Zmień hasło"
+
+#: allauth/templates/account/password_delete.html:5
+#: allauth/templates/account/password_delete.html:8
+msgid "Delete Password"
+msgstr "Usuń hasło"
+
+#: allauth/templates/account/password_delete.html:9
+msgid ""
+"You may delete your password since you are currently logged in using OpenID."
+msgstr "Możesz usunąć hasło, ponieważ jesteś zalogowany/-a za pomocą OpenID."
+
+#: allauth/templates/account/password_delete.html:12
+msgid "delete my password"
+msgstr "usuń moje hasło"
+
+#: allauth/templates/account/password_delete_done.html:5
+#: allauth/templates/account/password_delete_done.html:8
+msgid "Password Deleted"
+msgstr "Hasło usunięte"
+
+#: allauth/templates/account/password_delete_done.html:9
+msgid "Your password has been deleted."
+msgstr "Twoje hasło zostało usunięte."
+
+#: allauth/templates/account/password_reset.html:6
+#: allauth/templates/account/password_reset.html:10
+#: allauth/templates/account/password_reset_done.html:6
+#: allauth/templates/account/password_reset_done.html:9
+msgid "Password Reset"
+msgstr "Odzyskiwanie hasła"
+
+#: allauth/templates/account/password_reset.html:15
+msgid ""
+"Forgotten your password? Enter your e-mail address below, and we'll send you "
+"an e-mail allowing you to reset it."
+msgstr ""
+"Nie pamiętasz swojego hasła? Wpisz adres e-mail, a wyślemy Ci e-mail "
+"umożliwiający zresetowanie go."
+
+#: allauth/templates/account/password_reset.html:20
+msgid "Reset My Password"
+msgstr "Odzyskaj hasło"
+
+#: allauth/templates/account/password_reset.html:23
+msgid "Please contact us if you have any trouble resetting your password."
+msgstr "Prosimy o kontakt w przypadku problemów z uzyskaniem nowego hasła."
+
+#: allauth/templates/account/password_reset_done.html:15
+msgid ""
+"We have sent you an e-mail. Please contact us if you do not receive it "
+"within a few minutes."
+msgstr ""
+"E-mail został wysłany. Prosimy o kontakt, jeśli wiadomość nie dotrze w ciągu "
+"kilku minut."
+
+#: allauth/templates/account/password_reset_from_key.html:8
+msgid "Bad Token"
+msgstr "Błędny klucz"
+
+#: allauth/templates/account/password_reset_from_key.html:12
+#, python-format
+msgid ""
+"The password reset link was invalid, possibly because it has already been "
+"used.  Please request a <a href=\"%(passwd_reset_url)s\">new password reset</"
+"a>."
+msgstr ""
+"Link resetujący hasło jest nieprawidłowy, być może ponieważ został już "
+"wcześniej użyty. Spróbuj <a href=\"%(passwd_reset_url)s\">zresetować hasło "
+"ponownie</a>."
+
+#: allauth/templates/account/password_reset_from_key.html:18
+msgid "change password"
+msgstr "zmień hasło"
+
+#: allauth/templates/account/password_reset_from_key.html:21
+msgid "Your password is now changed."
+msgstr "Hasło zostało zmienione."
+
+#: allauth/templates/account/password_set.html:5
+#: allauth/templates/account/password_set.html:8
+#: allauth/templates/account/password_set.html:13
+msgid "Set Password"
+msgstr "Ustaw hasło"
+
+#: allauth/templates/account/signup.html:6
+#: allauth/templates/socialaccount/signup.html:5
+msgid "Signup"
+msgstr "Rejestracja"
+
+#: allauth/templates/account/signup.html:9
+#: allauth/templates/account/signup.html:19
+#: allauth/templates/socialaccount/signup.html:8
+#: allauth/templates/socialaccount/signup.html:19
+msgid "Sign Up"
+msgstr "Zarejestruj się"
+
+#: allauth/templates/account/signup.html:11
+#, python-format
+msgid ""
+"Already have an account? Then please <a href=\"%(login_url)s\">sign in</a>."
+msgstr "Masz już konto? <a href=\"%(login_url)s\">Zaloguj się</a>."
+
+#: allauth/templates/account/signup_closed.html:6
+#: allauth/templates/account/signup_closed.html:9
+msgid "Sign Up Closed"
+msgstr "Rejestracja zamknięta"
+
+#: allauth/templates/account/signup_closed.html:11
+msgid "We are sorry, but the sign up is currently closed."
+msgstr "Przepraszamy, ale rejestracja jest obecnie zamknięta."
+
+#: allauth/templates/account/verification_sent.html:5
+#: allauth/templates/account/verification_sent.html:8
+#: allauth/templates/account/verified_email_required.html:6
+#: allauth/templates/account/verified_email_required.html:9
+msgid "Verify Your E-mail Address"
+msgstr "Potwierdź swój adres e-mail"
+
+#: allauth/templates/account/verification_sent.html:10
+#, python-format
+msgid ""
+"We have sent an e-mail to <a href=\"mailto:%(email)s\">%(email)s</a> for "
+"verification. Follow the link provided to finalize the signup process. "
+"Please contact us if you do not receive it within a few minutes."
+msgstr ""
+"Na podany adres e-mail <a href=\"mailto:%(email)s\">%(email)s</a> została "
+"wysłana wiadomość w celu weryfikacji. Proszę kliknąć w podany w tej "
+"wiadomości link w celu zakończenia procesu rejestracji. Prosimy o kontakt, "
+"jeśli wiadomość nie dotrze w ciągu kilku minut."
+
+#: allauth/templates/account/verified_email_required.html:15
+msgid ""
+"This part of the site requires us to verify that\n"
+"you are who you claim to be. For this purpose, we require that you\n"
+"verify ownership of your e-mail address. "
+msgstr ""
+"W celu korzystania z tej części strony wymagamy\n"
+"potwierdzenia tożsamości. W tym celu konieczne jest\n"
+"potwierdzenie adresu e-mail. "
+
+#: allauth/templates/account/verified_email_required.html:19
+msgid ""
+"We have sent an e-mail to you for\n"
+"verification. Please click on the link inside this e-mail. Please\n"
+"contact us if you do not receive it within a few minutes."
+msgstr ""
+"Na podany adres została wysłana wiadomość w celu\n"
+"weryfikacji. Proszę kliknąć na link wewnątrz tej wiadomości. Prosimy\n"
+"o kontakt, jeśli wiadomość nie dotrze w ciągu kilku minut."
+
+#: allauth/templates/account/verified_email_required.html:21
+#, python-format
+msgid ""
+"<strong>Note:</strong> you can still <a href=\"%(email_url)s\">change your e-"
+"mail address</a>."
+msgstr ""
+"<strong>Uwaga:</strong> nadal możesz <a href=\"%(email_url)s\">zmienić swój "
+"adres e-mail</a>."
+
+#: allauth/templates/account/email/email_confirmation_message.txt:4
+#, python-format
+msgid ""
+"User %(user_display)s at %(site_name)s has given this as an email address.\n"
+"\n"
+"To confirm this is correct, go to %(activate_url)s\n"
+msgstr ""
+"Użytkownik '%(user_display)s' podał ten adres e-mail na stronie  "
+"%(site_name)s.\n"
+"\n"
+"Aby go potwierdzić, przejdź do %(activate_url)s\n"
+
+#: allauth/templates/account/email/password_reset_key_message.txt:9
+#, python-format
+msgid ""
+"You're receiving this e-mail because you or someone else has requested a "
+"password for your user account at %(site_domain)s.\n"
+"It can be safely ignored if you did not request a password reset. Click the "
+"link below to reset your password.\n"
+"\n"
+"%(password_reset_url)s\n"
+"\n"
+"In case you forgot, your username is %(username)s.\n"
+"\n"
+"Thanks for using our site!\n"
+msgstr ""
+"Otrzymujesz tego e-maila, ponieważ zostaliśmy poproszeni o zresetowanie "
+"hasła dla konta w serwisie %(site_domain)s.\n"
+"Możesz go zignorować, jeśli prośba nie pochodzi od Ciebie. Wejdź pod "
+"poniższy link, aby zresetować swoje hasło.\n"
+"\n"
+"%(password_reset_url)s\n"
+"\n"
+"W razie czego, Twój login to: %(username)s.\n"
+"\n"
+"Dziękujemy za korzystanie z naszych serwisów!\n"
+
+#: allauth/templates/account/email/password_reset_key_subject.txt:3
+msgid "Password Reset E-mail"
+msgstr "E-mail resetujący hasło"
+
+#: allauth/templates/account/messages/cannot_delete_primary_email.txt:2
+#, python-format
+msgid "You cannot remove your primary e-mail address (%(email)s)."
+msgstr "Nie można usunąć głównego adresu e-mail (%(email)s)."
+
+#: allauth/templates/account/messages/email_confirmation_sent.txt:2
+#, python-format
+msgid "Confirmation e-mail sent to %(email)s."
+msgstr "E-mail potwierdzający wysłany do %(email)s."
+
+#: allauth/templates/account/messages/email_confirmed.txt:2
+#, python-format
+msgid "You have confirmed %(email)s."
+msgstr "Adres %(email)s został potwierdzony."
+
+#: allauth/templates/account/messages/email_deleted.txt:2
+#, python-format
+msgid "Removed e-mail address %(email)s."
+msgstr "Usunięto adres e-mail %(email)s."
+
+#: allauth/templates/account/messages/logged_in.txt:4
+#, python-format
+msgid "Successfully signed in as %(name)s."
+msgstr "Zalogowano jako  %(name)s."
+
+#: allauth/templates/account/messages/logged_out.txt:2
+msgid "You have signed out."
+msgstr "Wylogowano."
+
+#: allauth/templates/account/messages/password_changed.txt:2
+msgid "Password successfully changed."
+msgstr "Hasło zostało zmienione."
+
+#: allauth/templates/account/messages/password_set.txt:2
+msgid "Password successfully set."
+msgstr "Hasło zostało ustawione."
+
+#: allauth/templates/account/messages/primary_email_set.txt:2
+msgid "Primary e-mail address set."
+msgstr "Ustawiono główny adres e-mail."
+
+#: allauth/templates/account/messages/unverified_primary_email.txt:2
+msgid "Your primary e-mail address must be verified."
+msgstr "Główny adres e-mail musi zostać potwierdzony."
+
+#: allauth/templates/account/snippets/already_logged_in.html:5
+msgid "Note"
+msgstr "Zwróć uwagę"
+
+#: allauth/templates/account/snippets/already_logged_in.html:5
+#, python-format
+msgid "you are already logged in as %(user_display)s."
+msgstr "jesteś już zalogowany/-a jako %(user_display)s."
+
+#: allauth/templates/openid/login.html:10
+msgid "OpenID Sign In"
+msgstr "Logowanie przy użyciu OpenID"
+
+#: allauth/templates/socialaccount/account_inactive.html:5
+#: allauth/templates/socialaccount/account_inactive.html:8
+msgid "Account Inactive"
+msgstr "Konto nieaktywne"
+
+#: allauth/templates/socialaccount/account_inactive.html:10
+msgid "This account is inactive."
+msgstr "To konto jest nieaktywne."
+
+#: allauth/templates/socialaccount/authentication_error.html:5
+#: allauth/templates/socialaccount/authentication_error.html:8
+msgid "Social Network Login Failure"
+msgstr "Błąd podczas logowania przy użyciu sieci społecznościowej."
+
+#: allauth/templates/socialaccount/authentication_error.html:10
+msgid ""
+"An error occurred while attempting to login via your social network account."
+msgstr ""
+"Podczas próby zalogowania za pośrednictwej konta w sieci społecznościowej "
+"wystąpił błąd."
+
+#: allauth/templates/socialaccount/connections.html:5
+#: allauth/templates/socialaccount/connections.html:8
+msgid "Account Connections"
+msgstr "Powiązania konta"
+
+#: allauth/templates/socialaccount/connections.html:11
+msgid ""
+"You can sign in to your account using any of the following third party "
+"accounts:"
+msgstr ""
+"Możesz zalogować się na swoje konto używając następujących kont zewnętrznych:"
+
+#: allauth/templates/socialaccount/connections.html:43
+msgid ""
+"You currently have no social network accounts connected to this account."
+msgstr ""
+"Aktualnie do Twojego konta nie są podłączone żadne konta w sieciach "
+"społecznościowych."
+
+#: allauth/templates/socialaccount/connections.html:46
+msgid "Add a 3rd Party Account"
+msgstr "Dodaj konto zewnętrzne"
+
+#: allauth/templates/socialaccount/login_cancelled.html:6
+#: allauth/templates/socialaccount/login_cancelled.html:10
+msgid "Login Cancelled"
+msgstr "Logowanie anulowane"
+
+#: allauth/templates/socialaccount/login_cancelled.html:14
+#, python-format
+msgid ""
+"You decided to cancel logging in to our site using one of your existing "
+"accounts. If this was a mistake, please proceed to <a href=\"%(login_url)s"
+"\">sign in</a>."
+msgstr ""
+"Logowanie do serwisu za pomocą istniejącego konta zostało anulowane. Jeśli "
+"był to błąd, przejdź do <a href=\"%(login_url)s\">strony logowania</a>."
+
+#: allauth/templates/socialaccount/signup.html:11
+#, python-format
+msgid ""
+"You are about to use your %(provider_name)s account to login to \n"
+"%(site_name)s. As a final step, please complete the following form:"
+msgstr ""
+"Za chwilę użyjesz konta w serwisie %(provider_name)s aby zalogować się \n"
+"do serwisu %(site_name)s. Zanim to nastąpi, wypełnij proszę ten krótki "
+"formularz:"
+
+#: allauth/templates/socialaccount/messages/account_connected.txt:2
+msgid "The social account has been connected."
+msgstr "Konto społecznościowe zostało dołączone."
+
+#: allauth/templates/socialaccount/messages/account_connected_other.txt:2
+msgid "The social account is already connected to a different account."
+msgstr "To konto społecznościowe jest już dołączone do innego konta."
+
+#: allauth/templates/socialaccount/messages/account_disconnected.txt:2
+msgid "The social account has been disconnected."
+msgstr "Konto społecznościowe zostało odłączone."
index e155fa0..123afb7 100644 (file)
Binary files a/src/cas/locale/pl/LC_MESSAGES/django.mo and b/src/cas/locale/pl/LC_MESSAGES/django.mo differ
index 7a56631..24efb67 100644 (file)
@@ -7,25 +7,37 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-03-20 16:31+0100\n"
-"PO-Revision-Date: 2013-03-20 16:04+0100\n"
+"POT-Creation-Date: 2013-08-09 16:36+0200\n"
+"PO-Revision-Date: 2013-08-09 16:38+0100\n"
 "Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\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"
+"X-Generator: Poedit 1.5.4\n"
 
 #: templates/cas/login.html:9
 msgid "Login"
 msgstr "Zaloguj"
 
-#: templates/cas/login.html:16
+#: templates/cas/login.html:20
 msgid "Log me in"
 msgstr "Zaloguj mnie"
 
+#: templates/cas/login.html:25
+msgid "I forgot my password"
+msgstr "Nie pamiętam hasła"
+
+#: templates/cas/login.html:27
+msgid "Sign up"
+msgstr "Załóż konto"
+
+#: templates/cas/login.html:36
+msgid "Or login using:"
+msgstr "Albo zaloguj używając:"
+
 #: templates/cas/logout.html:5 templates/cas/logout.html.py:12
 msgid "Logged out"
 msgstr "Wylogowano"
@@ -48,3 +60,44 @@ msgstr "Możesz wrócić do serwisu: <a href=\"%(url)s\">%(url)s</a>."
 #, python-format
 msgid "You can also <a href=\"%(login_url)s\">login again</a>"
 msgstr "Możesz też <a href=\"%(login_url)s\">zalogować się ponownie</a>."
+
+#: templates/socialaccount/connections.html:6
+#: templates/socialaccount/connections.html:9
+msgid "Account Connections"
+msgstr "Połączenia konta"
+
+#: templates/socialaccount/connections.html:13
+msgid ""
+"You can sign in to your account using any of the following third party "
+"accounts:"
+msgstr ""
+"Możesz zalogować się na swoje konto używając dowolnego z poniższych kont "
+"zewnętrznych:"
+
+#: templates/socialaccount/connections.html:39
+msgid "Remove"
+msgstr "Usuń"
+
+#: templates/socialaccount/connections.html:47
+msgid ""
+"You currently have no social network accounts connected to this account."
+msgstr "Do Twojego konta nie są aktualnie podłączone żadne konta zewnętrzne."
+
+#: templates/socialaccount/connections.html:50
+msgid "Add a 3rd Party Account"
+msgstr "Dodaj konto zewnętrzne"
+
+#: templates/socialaccount/login_cancelled.html:5
+#: templates/socialaccount/login_cancelled.html:9
+msgid "Login Cancelled"
+msgstr "Logowanie anulowane"
+
+#: templates/socialaccount/login_cancelled.html:15
+#, python-format
+msgid ""
+"You decided to cancel logging in to our site using one of your exisiting "
+"accounts. If this was a mistake, please proceed to <a href=\"%(login_url)s"
+"\">sign in</a>."
+msgstr ""
+"Logowanie przy użyciu Twojego konta zewnętrznego zostało anulowane. Jeśli to "
+"pomyłka, przejdź do <a href=\"%(login_url)s\">strony logowania</a>."
index 9e0a0f4..3857503 100644 (file)
@@ -62,10 +62,26 @@ TEMPLATE_DIRS = (
 )
 
 LOCALE_PATHS = (
+    PROJECT_ROOT + '/locale-contrib',
     PROJECT_ROOT + '/locale',
 )
 
 INSTALLED_APPS = (
+    'accounts',
+
+    'cas_provider',
+    'fnpdjango',
+    'honeypot',
+    'south',
+    'django_libravatar',
+
+    'allauth',
+    'allauth.account',
+    'allauth.socialaccount',
+    'allauth.socialaccount.providers.facebook', 
+    'allauth.socialaccount.providers.openid',
+    #'allauth.socialaccount.providers.persona',
+
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
@@ -74,13 +90,18 @@ INSTALLED_APPS = (
     'django.contrib.admindocs',
     'django.contrib.staticfiles',
 
-    'cas_provider',
-    'gravatar',
-    'south',
+)
 
-    'accounts',
+MIDDLEWARE_CLASSES = (
+    'django.middleware.common.CommonMiddleware',
+    'django.contrib.sessions.middleware.SessionMiddleware',
+    'django.middleware.csrf.CsrfViewMiddleware',
+    'honeypot.middleware.HoneypotMiddleware',
+    'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'django.contrib.messages.middleware.MessageMiddleware'
 )
 
+
 TEMPLATE_CONTEXT_PROCESSORS = (
     "django.contrib.auth.context_processors.auth",
     "django.core.context_processors.debug",
@@ -90,6 +111,14 @@ TEMPLATE_CONTEXT_PROCESSORS = (
     "django.core.context_processors.tz",
     "django.contrib.messages.context_processors.messages",
     "django.core.context_processors.request",
+    "allauth.account.context_processors.account",
+    "allauth.socialaccount.context_processors.socialaccount",
+    "cas.context_processors.settings",
+)
+
+AUTHENTICATION_BACKENDS = (
+    "django.contrib.auth.backends.ModelBackend",
+    "allauth.account.auth_backends.AuthenticationBackend",
 )
 
 # django-cas-provider settings
@@ -99,8 +128,32 @@ LOGIN_REDIRECT_URL = '/accounts/'
 CAS_CUSTOM_ATTRIBUTES_CALLBACK = 'cas.utils.custom_attributes_callback'
 SESSION_COOKIE_NAME = 'fnpcas'
 
-GRAVATAR_DEFAULT_IMAGE = 'mm'
-GRAVATAR_URL_PREFIX = 'https://www.gravatar.com/'
+REGISTRATION_OPEN = True
+TEMPLATE_CONTEXT_SETTINGS = ('REGISTRATION_OPEN',)
+
+ACCOUNT_EMAIL_VERIFICATION = None
+SOCIALACCOUNT_AUTO_SIGNUP = False
+SOCIALACCOUNT_AVATAR_SUPPORT = False
+SOCIALACCOUNT_ADAPTER = 'cas.social.LooseSocialAccountAdapter'
+
+SOCIALACCOUNT_PROVIDERS = {
+    'openid': {
+        'SERVERS': [
+            dict(id='google',
+                  name='Google',
+                  openid_url='https://www.google.com/accounts/o8/id')
+        ]
+    }
+}
+
+
+CONTRIB_LOCALE_APPS = [
+    'allauth',
+    'allauth.account',
+    'allauth.socialaccount',
+    'allauth.socialaccount.providers.facebook',
+    'allauth.socialaccount.providers.openid',
+]
 
 # Import localsettings file, which may override settings defined here
 try:
diff --git a/src/cas/social.py b/src/cas/social.py
new file mode 100755 (executable)
index 0000000..bce55aa
--- /dev/null
@@ -0,0 +1,18 @@
+from django.core.exceptions import ValidationError
+from django.utils.translation import ugettext as _
+from allauth.socialaccount.adapter import DefaultSocialAccountAdapter
+
+
+class LooseSocialAccountAdapter(DefaultSocialAccountAdapter):
+    def validate_disconnect(self, account, accounts):
+        """
+        Validate whether or not the socialaccount account can be
+        safely disconnected.
+        """
+        if len(accounts) == 1:
+            # No usable password would render the local account unusable
+            if not account.user.has_usable_password():
+                raise ValidationError(_("Your account has no password set up."))
+            # No email address, no password reset
+            if not account.user.email:
+                raise ValidationError(_("Your account has no e-mail address."))
index 4d62c01..1e6e823 100644 (file)
@@ -7,13 +7,16 @@
 }
 
 .enclosed {
-    margin-top: 70px;
+    margin-top: 75px;
     display: inline-block;
     text-align: left;
     max-width: 300px;
     background-color: rgb(247, 247, 247);
     background-color: rgba(247, 247, 247, .5);
 }
+.enclosed h1 {
+    margin-top: 0;
+}
 
 a {
     text-decoration: none;
@@ -39,10 +42,20 @@ form label, form input {
 }
 #login-form input {
     font-size: 1.75em;
-    margin-bottom: .4em;
+}
+#login-form p {
+    margin-bottom: .7em;
+}
+#tools {
+    text-align: right;
 }
 
-
+#register-form .helptext {
+    font-size: .8em;
+}
+#register-form p {
+    #margin-bottom: .5em;
+}
 
 
 html, body {
@@ -134,3 +147,30 @@ footer, #content_push {
     height: 50px;
        margin: 10px 10px 0 0;
 }
+
+
+.content-extra {
+    text-align: center;
+}
+.socialaccount_provider {
+       display: inline-block;
+       background-repeat: no-repeat;
+       color: transparent;
+       height: 40px;
+       width: 40px;
+       vertical-align: middle;
+}
+.socialaccount_provider.google {
+       background-image: url(/static/img/auth/google.png);
+}
+
+
+.socialaccount_providers {
+       margin: 1em 0;
+       padding: 0;
+}
+.socialaccount_providers li {
+       display: inline;
+       list-style: none;
+       margin-right: 1em;
+}
diff --git a/src/cas/static/img/auth/facebook.png b/src/cas/static/img/auth/facebook.png
new file mode 100644 (file)
index 0000000..f9b6e71
Binary files /dev/null and b/src/cas/static/img/auth/facebook.png differ
diff --git a/src/cas/static/img/auth/google.png b/src/cas/static/img/auth/google.png
new file mode 100644 (file)
index 0000000..bf7d112
Binary files /dev/null and b/src/cas/static/img/auth/google.png differ
diff --git a/src/cas/static/img/auth/openid.png b/src/cas/static/img/auth/openid.png
new file mode 100644 (file)
index 0000000..83e9769
Binary files /dev/null and b/src/cas/static/img/auth/openid.png differ
diff --git a/src/cas/static/img/auth/twitter.png b/src/cas/static/img/auth/twitter.png
new file mode 100644 (file)
index 0000000..d2a5502
Binary files /dev/null and b/src/cas/static/img/auth/twitter.png differ
index 11f9ce8..10c1eca 100644 (file)
 
     <div id="content-wrap">
     <div id="content">
-        {% block content %} {% endblock %}
+        {% block content %}
+
+        <div class="enclose">
+        <div class="enclosed">
+            {% block content_enclosed %}
+            {% endblock %}
+        </div></div>
+
+        <div class="content-extra">
+            {% block content_extra %}
+            {% endblock %}
+        </div>
+        {% endblock %}
     </div>
     </div>
 
index b1b9025..962451c 100644 (file)
@@ -1,10 +1,10 @@
 {% extends "base.html" %}
 {% load i18n %}
+{% load account %}
 
-{% block content %}
+{% block content_enclosed %}
 
-<div class="enclose">
-  <form class="enclosed" id="login-form" action='{% url "cas_login" %}' method='post'>
+  <form id="login-form" action='{% url "cas_login" %}' method='post'>
     {% csrf_token %}
     <h1>{% trans "Login" %}</h1>
 
     {% endif %}
 
     {{ form.as_p }}
-    <input type="submit" value="{% trans 'Log me in' %}" tabindex="10" />
+    <p><input type="submit" value="{% trans 'Log me in' %}" tabindex="10" /></p>
 
   </form>
+
+  <div id="tools">
+    <a href="{% url 'account_reset_password' %}">{% trans "I forgot my password" %}</a>
+    {% if settings.REGISTRATION_OPEN %}
+        <br/><a href="{% url 'account_register' %}">{% trans "Sign up" %}</a>
+    {% endif %}
+  </div>
+{% endblock %}
+
+
+{% block content_extra %}
+
+{% if socialaccount.providers  %}
+<p>{% trans "Or login using:" %}</p>
+<div class="socialaccount_ballot">
+
+  <ul class="socialaccount_providers">
+    {% include "socialaccount/snippets/provider_list.html" with process="login" %}
+  </ul>
+
+  <div></div>
+
 </div>
+{% include "socialaccount/snippets/login_extra.html" %}
 
+{% endif %}
 {% endblock %}
diff --git a/src/cas/templates/facebook/fbconnect.html b/src/cas/templates/facebook/fbconnect.html
new file mode 100755 (executable)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/src/cas/templates/socialaccount/connections.html b/src/cas/templates/socialaccount/connections.html
new file mode 100644 (file)
index 0000000..85d163b
--- /dev/null
@@ -0,0 +1,58 @@
+{% extends "base.html" %}
+
+{% load i18n %}
+{% load static from staticfiles %}
+
+{% block title %}{% trans "Account Connections" %}{% endblock %}
+
+{% block content %}
+<h1>{% trans "Account Connections" %}</h1>
+
+{% if form.accounts %}
+<p>{% blocktrans %}You can sign in to your account using any of the following third party accounts:{% endblocktrans %}</p>
+
+
+<form class="uniForm" method="post">
+{% csrf_token %}
+
+<fieldset class="blockLabels">
+{% if form.non_field_errors %}
+<div id="errorMsg">{{form.non_field_errors}}</div>
+{% endif %}
+
+{% for base_account in form.accounts %}
+{% with base_account.get_provider_account as account %}
+<div class="ctrlHolder">
+<label for="id_account_{{base_account.id}}">
+<input id="id_account_{{base_account.id}}" style="display: inline; ;" type="radio" name="account" value="{{base_account.id}}"/>
+<!--span class="socialaccount_provider {{base_account.provider}} {{account.get_brand.id}}">{{account.get_brand.name}}</span-->
+<img alt="{{ base_account.provider.name }}" style="vertical-align:middle"
+                src="{% static 'img/auth/'|add:account.get_brand.id|add:'.png' %}" />
+<small>{{account}}</small>
+</label>
+</div>
+{% endwith %}
+{% endfor %}
+
+<div class="buttonHolder">
+<button type="submit">{% trans "Remove" %}</button>
+</div>
+
+</fieldset>
+
+</form>
+
+{% else %}
+<p>{% trans "You currently have no social network accounts connected to this account." %}</p>
+{% endif %}
+
+<h2>{% trans 'Add a 3rd Party Account' %}</h2>
+
+<ul class="socialaccount_providers">
+{% include "socialaccount/snippets/provider_list.html" %}
+</ul>
+
+{% include "socialaccount/snippets/login_extra.html" %}
+{% endblock %}
+
+
diff --git a/src/cas/templates/socialaccount/login_cancelled.html b/src/cas/templates/socialaccount/login_cancelled.html
new file mode 100644 (file)
index 0000000..e051b5d
--- /dev/null
@@ -0,0 +1,17 @@
+{% extends "base.html" %}
+
+{% load i18n %}
+
+{% block title %}{% trans "Login Cancelled" %}{% endblock %}
+
+{% block content %}
+    
+<h1>{% trans "Login Cancelled" %}</h1>
+
+{% url 'socialaccount_login' as login_url %}
+{{ login_url }}
+
+<p>{% blocktrans %}You decided to cancel logging in to our site using one of your exisiting accounts. If this was a mistake, please proceed to <a href="{{login_url}}">sign in</a>.{% endblocktrans %}</p>
+
+{% endblock %}
+
diff --git a/src/cas/templates/socialaccount/snippets/provider_list.html b/src/cas/templates/socialaccount/snippets/provider_list.html
new file mode 100755 (executable)
index 0000000..80f9c2f
--- /dev/null
@@ -0,0 +1,22 @@
+{% load socialaccount %}
+{% load static from staticfiles %}
+
+{% for provider in socialaccount.providers %}
+    {% if provider.id == "openid" %}
+        {% for brand in provider.get_brands %}
+            <li>
+                <a title="{{brand.name}}" 
+                    class="socialaccount_provider {{provider.id}} {{brand.id}}" 
+                    href="{% provider_login_url provider.id openid=brand.openid_url %}"
+                    ><img alt="{{ brand.name }}"
+                        src="{% static 'img/auth/'|add:brand.id|add:'.png' %}" /></a>
+            </li>
+        {% endfor %}
+    {% endif %}
+    <li>
+        <a title="{{provider.name}}" class="socialaccount_provider {{provider.id}}" 
+            href="{% provider_login_url provider.id %}"
+            ><img alt="{{ provider.name }}"
+                src="{% static 'img/auth/'|add:provider.id|add:'.png' %}" /></a>
+    </li>
+{% endfor %}
index 5b67eb1..29c63e3 100644 (file)
@@ -3,9 +3,11 @@ from django.conf.urls import include, patterns, url
 from django.views.generic import RedirectView
 from django.contrib import admin
 from django.conf import settings
+from django.views.defaults import page_not_found
 
 admin.autodiscover()
 
+
 urlpatterns = patterns('',
     url(r'^$', RedirectView.as_view(url='/accounts/')),
 
@@ -17,6 +19,10 @@ urlpatterns = patterns('',
     url(r'^admin/', include(admin.site.urls)),
 
     url(r'^accounts/', include('accounts.urls')),
+
+    url(r'^accounts/', include('accounts.urls')),
+    url(r'^auth/(email|signup|login|logout|confirm_email)', page_not_found),
+    url(r'^auth/', include('allauth.urls')),
 )