From 23025f539214ffbd82a597d4a1d70808d6e59f31 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 9 Mar 2012 14:46:22 +0100 Subject: [PATCH] minimal allauth support --- requirements.txt | 1 + wolnelektury/settings.py | 18 +++++++++++++++ wolnelektury/static/css/dialogs.css | 11 +++++++++ wolnelektury/static/img/auth/google-icon.png | Bin 0 -> 15517 bytes wolnelektury/static/img/auth/google.png | Bin 0 -> 2490 bytes .../img/auth/openid-large.png?1237615666 | Bin 0 -> 4871 bytes wolnelektury/static/img/auth/openid.png | Bin 0 -> 1366 bytes wolnelektury/templates/auth/login.html | 14 ++++++++++++ .../templates/auth/login_register.html | 6 +++++ .../socialaccount/snippets/provider_list.html | 21 ++++++++++++++++++ wolnelektury/urls.py | 1 + wolnelektury/views.py | 1 + 12 files changed, 73 insertions(+) create mode 100644 wolnelektury/static/img/auth/google-icon.png create mode 100644 wolnelektury/static/img/auth/google.png create mode 100644 wolnelektury/static/img/auth/openid-large.png?1237615666 create mode 100644 wolnelektury/static/img/auth/openid.png create mode 100644 wolnelektury/templates/auth/login.html create mode 100644 wolnelektury/templates/socialaccount/snippets/provider_list.html diff --git a/requirements.txt b/requirements.txt index a961c4d32..ecb07cca2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,7 @@ django-rosetta>=0.5.3 django-maintenancemode>=0.9 django-piston django-jsonfield +django-allauth python-memcached piwik diff --git a/wolnelektury/settings.py b/wolnelektury/settings.py index 07b1ef004..7f22b0ce6 100644 --- a/wolnelektury/settings.py +++ b/wolnelektury/settings.py @@ -92,6 +92,8 @@ TEMPLATE_CONTEXT_PROCESSORS = ( '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 = [ @@ -114,6 +116,12 @@ TEMPLATE_DIRS = [ 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 = '/' @@ -136,6 +144,16 @@ INSTALLED_APPS = [ 'djkombu', # 'django_nose', + #allauth stuff + 'emailconfirmation', + 'uni_form', + 'allauth', + 'allauth.account', + 'allauth.socialaccount', + 'allauth.openid', + #'allauth.facebook', + #'allauth.twitter', + # included 'compress', 'modeltranslation', diff --git a/wolnelektury/static/css/dialogs.css b/wolnelektury/static/css/dialogs.css index d83116ba6..803c14d39 100755 --- a/wolnelektury/static/css/dialogs.css +++ b/wolnelektury/static/css/dialogs.css @@ -115,3 +115,14 @@ #custom-pdf-window label { display: inline; } + + +.socialauth { + margin: 1em 0; + padding: 0; +} +.socialauth li { + display: inline; + list-style: none; + margin-right: 1em; +} diff --git a/wolnelektury/static/img/auth/google-icon.png b/wolnelektury/static/img/auth/google-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..d16d5313ec400a1896aebd972e3dc68da0ef5a75 GIT binary patch literal 15517 zcmX9_1yoy2(@t=AD8=1^7I!HWElvm?+`V{lD^@6O#We&7T8dj*iWVqRT#7@nLV+TG z-tRv-_axcu-8(xo`^+=5n*?2LRYE)(JOBVdsII204*&pp|GRLoP%S~B@BL73Kwo`T zB|yU@-2v(gmW`&WGT`aIS4mHG2C4BD=QiXE}eV~$fZzud|F@4nB5(3{)I`ERucil9Ed5~I(V+D(<4k59AMQ_ zEk7k(eJLY(I(}|Qp~8+^##Qr+OLFLUv*hHlc2Vs*BLdOowqJB$D0>yeP>jT#o13#} z4C|9Oh>XTK|B(~&%8uiw$G6vQg;@tL_8hBoGxU#Nl@Hnc(!$atrZ za(yR;A(}kgM?Z&NHK?WGG*z1OFCb<5&s2EX`R}gOCwb?;#)k`A+%G4C4|dx4*YJT( zEDC%P=m38*XbSMgnn#!PG;|nwhvbx7moG7HKdIFVP3NbX8QM(Ss;0CEB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)RTDUA^ppfE^`5#{`AOyvj$g)YpH-S;!H@85$drWydRKIan*_pZlO z{#1yjsijGBr;-N?r$(52_a2<=ajHAiYC&i`n&ojL(Yi$L$P=XZ-i;~xe}yC>?OfJ3 zRNkaEtt8FiFd&UCv2<`dPUaW}g)!w{Gi7UeEavIDItFFy0)-EsA$RBzF#d`&(An3- z-|z=e6JL~W_89q@k&2W-Rx|!HxsQrsdNQfPJ@*P3xT(EP|;PW zNH0R#q>DM8dhaEE|K<)3&mBY6?Ox6_AZoj4Z5C}uKiQRYe)WH=)ehm`VGA7q001R) zMObuXVRU6WV{&C-bY%cCFflSMFf%PMIaDz;Ix{pnFgPnPF*-0XZ0LHS0000bbVXQn zWMOn=I&E)cX=ZrpF07*qoM6N<$ Ef+dxZ*Z=?k literal 0 HcmV?d00001 diff --git a/wolnelektury/static/img/auth/openid-large.png?1237615666 b/wolnelektury/static/img/auth/openid-large.png?1237615666 new file mode 100644 index 0000000000000000000000000000000000000000..6094fffec182fb86aa15b22e3cda055df2bb5861 GIT binary patch literal 4871 zcmc(ji9gia|HmygmPXmKFIkeyP%)My#8{?m*|IO$BMl~dGGxylt}WNNa&Zlp1~a$@ ziJH)mhLDkDWEpFtY~R!U{Sm);yyx?IoHOU~nfK?M_xtsJo|A5EY0ASb#?8XQ!h5~T9qG)4BwC#OAbfj09FH2-(q-tPDP`I}j z%2)M%n19*2t{4joe+d$C-7czpZT4oc9P=T^1_O%B`|ORl@!n>%&|&LiMivX?n-TYy zT(;f1z>9$ikcesdhpg9LTxko;y-5+G*Ol2011LtN-U+hC1xAtGuW$~s z#+!!{dM~y7W2|4BbvAGe%pdrt%$+gtR3VqoIUjt}->y79*2>4N=%ft^w$RzqzH+gf z`p81E-7!mgF`LS}>Ui2Y#NgZ-lcS|dCeQ>HbruzhQd-h;TURxHvHy)~Ybz&I9t z7np|g3Av2g{=4^tY)BUY#mwxQ~_C#~FYm~C!fY2$T{@ohsY zXw!uC+4O$O(f)=J`H8IT{{F5Ufmf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th/openid.png b/wolnelektury/static/img/auth/openid.png new file mode 100644 index 0000000000000000000000000000000000000000..83e97691f6f35ba00646a3c7e54bab51bb28fda6 GIT binary patch literal 1366 zcmV-c1*!UpP)g5w7{`BO$1iE)q-|c@6+OUe#f6Ws2PA~J@-5&9UjW1zi7$XSapMFx zBu>BqB(7YLxS+0-q>h_-)A%JGdxk?~Z?kF3w#{z#z;pE2|M|`HJf8X6LTjygSrPsN ztuDCUoh6Ky0#@Yk$9M4UNAPrfFR8}X;i4h@_$B=M4Y=)l%WV%(EBNbY_~A47`*+Y9 z_ByW-;4fdp_n*Ujvem}fj#OE|pFhFV?ZRyjaJx#cLiT^a*C$?kz&md+n@yT_1Gm}S&@oMue!tJcJ0eR~Em4-`v&;*DQi|DZ#$vI+aU7B)K`Di0Syz|1 zEKA1YF+mWliB({xY2tYv2L}hVS}knb#?T5}7oJO`VHo(n&%l3^LQ0Y(A&MgA^Lbs7 z3bZH+q?8*KS_4!{F&qvFf?y+S0G&>U!CcWzp$$Xt&#BSw)jiynkSB9Y};lq7~FWT zX__<|jTPWxu^^7)jTfTbZqx7gw*ps9dRsjMR^=_ra(%!s=yto9rnxo1yM&>Xs`t9f zVObXY`};eEs{xCmSi7jTUe*7eZ|qh8cMb5LfQDggWJ(BuloBcBuK8AgdwY8u15!#B zi^Z<_RwZt?+Z$QbS`&uh&a-F$?CCbZm&;cUxYl^RUXQXY8I4A38Pi&Getu4pB=mYc4i67& zL-|Spg%J3@k7=3=hr`-HR*@tLPo6v>48z*nxvon?XarX{lPz?`#!(@Jpx^J~x-O&9 zh>MGh+TvHR)yGc|1lYEXW0|~>rZlUyXuvSx?Z>M>tlI>v!t*?u%_h_7lrRiQ({uw= zDMgxPER%wME@@U-J2-|9K81HbhP{KA0|?M)G#Cs993CDLMG;XH5yvrQS=L*U5CVii zR26>bJ^1hoc=Q;={ZCSHo1f@PDbh5p{bQD8NGZ`p&colnqJ8oR-v0!=?Rm&s0bUNR zHAPX7=Q(njv6qF|{##($cagg`{sqnNAD*u*wH^Qf03~!qSaf7zbY(hYa%Ew3WdJfT zF)}SMGc7PVR53I{% trans "or join accounts:" %} + +
    +{% include "socialaccount/snippets/provider_list.html" %} +
+ +{% endblock %} + + diff --git a/wolnelektury/templates/auth/login_register.html b/wolnelektury/templates/auth/login_register.html index ecaeaf4a1..394902a2b 100755 --- a/wolnelektury/templates/auth/login_register.html +++ b/wolnelektury/templates/auth/login_register.html @@ -3,6 +3,12 @@ {% block extra %} +

{% trans "or join accounts:" %}

+ +
    +{% include "socialaccount/snippets/provider_list.html" %} +
+

{% trans "or register" %}:

diff --git a/wolnelektury/templates/socialaccount/snippets/provider_list.html b/wolnelektury/templates/socialaccount/snippets/provider_list.html new file mode 100644 index 000000000..99e30a5c1 --- /dev/null +++ b/wolnelektury/templates/socialaccount/snippets/provider_list.html @@ -0,0 +1,21 @@ +{% load allauth_tags %} + +{% if allauth.openid_enabled %} +
  • + Google
  • +{% endif %} +{% if allauth.twitter_enabled %} +
  • +{% endif %} +{% if allauth.facebook_enabled %} +
  • +{% endif %} +{% if allauth.openid_enabled %} + + + +{% endif %} diff --git a/wolnelektury/urls.py b/wolnelektury/urls.py index f6cd8d927..36959904c 100644 --- a/wolnelektury/urls.py +++ b/wolnelektury/urls.py @@ -32,6 +32,7 @@ urlpatterns += patterns('', 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'), diff --git a/wolnelektury/views.py b/wolnelektury/views.py index c2624793b..bcead0317 100755 --- a/wolnelektury/views.py +++ b/wolnelektury/views.py @@ -27,6 +27,7 @@ def main_page(request): class LoginFormView(AjaxableFormView): form_class = AuthenticationForm + template = "auth/login.html" placeholdize = True title = _('Sign in') submit = _('Sign in') -- 2.20.1