django-maintenancemode>=0.9
django-piston
django-jsonfield
+django-allauth
python-memcached
piwik
'django.core.context_processors.request',
'wolnelektury.context_processors.extra_settings',
'search.context_processors.search_form',
+ "allauth.context_processors.allauth",
+ "allauth.account.context_processors.account",
)
MIDDLEWARE_CLASSES = [
path.join(PROJECT_DIR, 'templates'),
]
+
+AUTHENTICATION_BACKENDS = [
+ 'django.contrib.auth.backends.ModelBackend',
+ 'allauth.account.auth_backends.AuthenticationBackend',
+]
+EMAIL_CONFIRMATION_DAYS = 2
LOGIN_URL = '/uzytkownicy/zaloguj/'
LOGIN_REDIRECT_URL = '/'
'djkombu',
# 'django_nose',
+ #allauth stuff
+ 'emailconfirmation',
+ 'uni_form',
+ 'allauth',
+ 'allauth.account',
+ 'allauth.socialaccount',
+ 'allauth.openid',
+ #'allauth.facebook',
+ #'allauth.twitter',
+
# included
'compress',
'modeltranslation',
#custom-pdf-window label {
display: inline;
}
+
+
+.socialauth {
+ margin: 1em 0;
+ padding: 0;
+}
+.socialauth li {
+ display: inline;
+ list-style: none;
+ margin-right: 1em;
+}
--- /dev/null
+{% extends "ajaxable/form.html" %}
+{% load i18n %}
+
+{% block extra %}
+
+<h2>{% trans "or join accounts:" %}</h2>
+
+<ul class="socialauth">
+{% include "socialaccount/snippets/provider_list.html" %}
+</ul>
+
+{% endblock %}
+
+
{% block extra %}
+<h2>{% trans "or join accounts:" %}</h2>
+
+<ul class="socialauth">
+{% include "socialaccount/snippets/provider_list.html" %}
+</ul>
+
<h1>{% trans "or register" %}:</h1>
--- /dev/null
+{% load allauth_tags %}
+
+{% if allauth.openid_enabled %}
+<li><a title="Google" class="socialaccount_provider google" href="{% openid_login_url openid="https://www.google.com/accounts/o8/id" %}">
+ <img alt="Google" src="{{ STATIC_URL }}img/auth/google.png" /></a></li>
+{% endif %}
+{% if allauth.twitter_enabled %}
+<li><a title="Twitter" class="socialaccount_provider twitter" href="{% twitter_login_url %}">
+ <img alt="Twitter" src="{{ STATIC_URL }}img/auth/twitter.png" /></a></li>
+{% endif %}
+{% if allauth.facebook_enabled %}
+<li><a title="Facebook" class="socialaccount_provider facebook" href="{% facebook_login_url %}">
+ <img alt="Facebook" src="{{ STATIC_URL }}img/auth/facebook.png" /></a></li>
+{% endif %}
+{% if allauth.openid_enabled %}
+<!--li><a title="Yahoo" class="socialaccount_provider yahoo" href="{% openid_login_url openid="http://me.yahoo.com" %}">
+ <img alt="Yahoo" src="{{ STATIC_URL }}img/auth/yahoo.png" /></a></li-->
+<!--li><a title="OpenID" class="socialaccount_provider openid" href="{% openid_login_url %}">
+ <img alt="OpenID" src="{{ STATIC_URL }}img/auth/openid.png" /></a></li-->
+<!--li><a title="Hyves" class="socialaccount_provider hyves" href="{% openid_login_url openid="http://hyves.nl" %}">Hyves</a></li-->
+{% endif %}
url(r'^raporty/', include('reporting.urls')),
url(r'^info/', include('infopages.urls')),
url(r'^ludzie/', include('social.urls')),
+ url(r'^uzytkownicy/', include('allauth.urls')),
# Admin panel
url(r'^admin/catalogue/book/import$', 'catalogue.views.import_book', name='import_book'),
class LoginFormView(AjaxableFormView):
form_class = AuthenticationForm
+ template = "auth/login.html"
placeholdize = True
title = _('Sign in')
submit = _('Sign in')