Merge lp:~nataliabidart/locolander/allauth into lp:locolander

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 22
Merged at revision: 22
Proposed branch: lp:~nataliabidart/locolander/allauth
Merge into: lp:locolander
Diff against target: 205 lines (+53/-43)
7 files modified
locolander/locolander/settings.py (+34/-6)
locolander/locolander/urls.py (+1/-5)
locolander/locolanderweb/templates/base.html (+8/-3)
locolander/locolanderweb/templates/registration/logged_out.html (+0/-6)
locolander/locolanderweb/templates/registration/login.html (+0/-14)
locolander/locolanderweb/urls.py (+1/-6)
requirements.txt (+9/-3)
To merge this branch: bzr merge lp:~nataliabidart/locolander/allauth
Reviewer Review Type Date Requested Status
Matias Bordese Approve
Review via email: mp+176034@code.launchpad.net

Commit message

- Added integration with django-allauth. Currently supported backends are Twitter and Github.

To post a comment you must log in.
Revision history for this message
Matias Bordese (matiasb) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'locolander/locolander/settings.py'
--- locolander/locolander/settings.py 2013-07-13 21:24:32 +0000
+++ locolander/locolander/settings.py 2013-07-20 23:56:26 +0000
@@ -33,7 +33,7 @@
33# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name33# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
34# although not all choices may be available on all operating systems.34# although not all choices may be available on all operating systems.
35# In a Windows environment this must be set to your system time zone.35# In a Windows environment this must be set to your system time zone.
36TIME_ZONE = 'America/Chicago'36TIME_ZONE = 'UTC'
3737
38# Language code for this installation. All choices can be found here:38# Language code for this installation. All choices can be found here:
39# http://www.i18nguy.com/unicode/language-identifiers.html39# http://www.i18nguy.com/unicode/language-identifiers.html
@@ -125,13 +125,41 @@
125 'django.contrib.sites',125 'django.contrib.sites',
126 'django.contrib.messages',126 'django.contrib.messages',
127 'django.contrib.staticfiles',127 'django.contrib.staticfiles',
128 # Uncomment the next line to enable the admin:
129 'django.contrib.admin',128 'django.contrib.admin',
130 # Uncomment the next line to enable admin documentation:129 'djcelery',
131 # 'django.contrib.admindocs',
132 'locolanderweb',130 'locolanderweb',
133 'south',131 'south',
134 'djcelery',132 'allauth',
133 'allauth.account',
134 'allauth.socialaccount',
135 # ... include the providers you want to enable:
136 #'allauth.socialaccount.providers.bitly',
137 #'allauth.socialaccount.providers.facebook',
138 'allauth.socialaccount.providers.github',
139 #'allauth.socialaccount.providers.google',
140 #'allauth.socialaccount.providers.linkedin',
141 #'allauth.socialaccount.providers.openid',
142 'allauth.socialaccount.providers.twitter',
143)
144
145AUTHENTICATION_BACKENDS = (
146 # Needed to login by username in Django admin, regardless of `allauth`
147 "django.contrib.auth.backends.ModelBackend",
148 # `allauth` specific authentication methods, such as login by e-mail
149 "allauth.account.auth_backends.AuthenticationBackend",
150)
151
152TEMPLATE_CONTEXT_PROCESSORS = (
153 'django.contrib.auth.context_processors.auth',
154 'django.core.context_processors.debug',
155 'django.core.context_processors.i18n',
156 'django.core.context_processors.media',
157 'django.core.context_processors.request',
158 'django.core.context_processors.static',
159 'django.core.context_processors.tz',
160 'django.contrib.messages.context_processors.messages',
161 'allauth.account.context_processors.account',
162 'allauth.socialaccount.context_processors.socialaccount',
135)163)
136164
137# A sample logging configuration. The only tangible logging165# A sample logging configuration. The only tangible logging
@@ -169,7 +197,7 @@
169197
170BROKER_URL = 'redis://localhost:6379/0'198BROKER_URL = 'redis://localhost:6379/0'
171199
172LOGIN_URL = '/login/'200LOGIN_URL = '/accounts/login/'
173LOGIN_REDIRECT_URL = '/'201LOGIN_REDIRECT_URL = '/'
174202
175# local settings203# local settings
176204
=== modified file 'locolander/locolander/urls.py'
--- locolander/locolander/urls.py 2013-07-13 17:04:08 +0000
+++ locolander/locolander/urls.py 2013-07-20 23:56:26 +0000
@@ -8,12 +8,8 @@
8 '',8 '',
9 # Examples:9 # Examples:
10 url(r'', include('locolanderweb.urls')),10 url(r'', include('locolanderweb.urls')),
11
12 # Uncomment the admin/doc line below to enable admin documentation:
13 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
14
15 # Uncomment the next line to enable the admin:
16 url(r'^admin/', include(admin.site.urls)),11 url(r'^admin/', include(admin.site.urls)),
12 url(r'^accounts/', include('allauth.urls')),
17)13)
1814
19# enable staticfiles for gunicorn15# enable staticfiles for gunicorn
2016
=== modified file 'locolander/locolanderweb/templates/base.html'
--- locolander/locolanderweb/templates/base.html 2013-06-21 20:26:50 +0000
+++ locolander/locolanderweb/templates/base.html 2013-07-20 23:56:26 +0000
@@ -1,4 +1,5 @@
1{% load staticfiles %}1{% load staticfiles %}
2{% load i18n %}
23
3<html>4<html>
4 <head>5 <head>
@@ -17,10 +18,14 @@
17 </a>18 </a>
18 <ul id="nav">19 <ul id="nav">
19 {% if user.is_authenticated %}20 {% if user.is_authenticated %}
20 <li><a href="{% url 'project-list' %}">Your projects</a></li>21 <li>
21 <li><a href="{% url 'logout' %}">Logout</a></li>22 {% blocktrans %}Signed in as {{ user }}{% endblocktrans %}
23 </li>
24 <li><a href="{% url 'project-list' %}">{% trans "Your projects" %}</a></li>
25 <li><a href="{% url 'account_logout' %}">{% trans "Logout" %}</a></li>
22 {% else %}26 {% else %}
23 <li><a href="{% url 'login' %}">Login</a></li>27 <li><a href="{% url 'account_login' %}">{% trans "Sign In" %}</a></li>
28 <li><a href="{% url 'account_signup' %}">{% trans "Sign Up" %}</a></li>
24 {% endif %}29 {% endif %}
25 </div>30 </div>
26 </div>31 </div>
2732
=== removed directory 'locolander/locolanderweb/templates/registration'
=== removed file 'locolander/locolanderweb/templates/registration/logged_out.html'
--- locolander/locolanderweb/templates/registration/logged_out.html 2013-06-21 20:26:50 +0000
+++ locolander/locolanderweb/templates/registration/logged_out.html 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
1{% extends "base.html" %}
2
3{% block content %}
4<h1>You've been logged out.</h1>
5<p><a href="{% url 'login' %}">Login back again</a></p>
6{% endblock content %}
70
=== removed file 'locolander/locolanderweb/templates/registration/login.html'
--- locolander/locolanderweb/templates/registration/login.html 2013-06-21 20:26:50 +0000
+++ locolander/locolanderweb/templates/registration/login.html 1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
1{% extends "base.html" %}
2
3{% block content %}
4<form action="." method="POST">
5 {% csrf_token %}
6 <table id="login">
7 {{ form.as_table }}
8 </table>
9 <div class="actions">
10 <input type="submit" name="login" value="Login">
11 </div>
12 <input type="hidden" name="next" value="{{ next }}" />
13</form>
14{% endblock content %}
150
=== modified file 'locolander/locolanderweb/urls.py'
--- locolander/locolanderweb/urls.py 2013-07-06 23:19:29 +0000
+++ locolander/locolanderweb/urls.py 2013-07-20 23:56:26 +0000
@@ -1,12 +1,7 @@
1from django.conf.urls import patterns, url1from django.conf.urls import patterns, url
22
3
3urlpatterns = patterns(4urlpatterns = patterns(
4 'django.contrib.auth.views',
5 url(r'^login/$', 'login', name='login'),
6 url(r'^logout/$', 'logout_then_login', name='logout'),
7)
8
9urlpatterns += patterns(
10 'locolanderweb.views',5 'locolanderweb.views',
11 url(r'^$', 'home', name='home'),6 url(r'^$', 'home', name='home'),
12 url(r'^projects/$', 'project_list', name='project-list'),7 url(r'^projects/$', 'project_list', name='project-list'),
138
=== modified file 'requirements.txt'
--- requirements.txt 2013-07-13 21:31:32 +0000
+++ requirements.txt 2013-07-20 23:56:26 +0000
@@ -1,10 +1,15 @@
1Django==1.5.1
2PyYAML==3.10
3South==0.8.1
1amqp==1.0.124amqp==1.0.12
2anyjson==0.3.35anyjson==0.3.3
6argparse==1.2.1
3billiard==2.7.3.317billiard==2.7.3.31
4bzr==2.6b28bzr==2.6b2
5celery==3.0.219celery==3.0.21
6cssselect==0.810cssselect==0.8
7Django==1.5.111distribute==0.6.34
12django-allauth==0.12.0
8django-celery==3.0.1713django-celery==3.0.17
9flower==0.5.214flower==0.5.2
10github3.py==0.7.015github3.py==0.7.0
@@ -20,18 +25,19 @@
20meld3==0.6.1025meld3==0.6.10
21mock==1.0.126mock==1.0.1
22oauth==1.0.127oauth==1.0.1
28oauthlib==0.5.0
23pep8==1.4.629pep8==1.4.6
24psycopg2==2.5.130psycopg2==2.5.1
25pyflakes==0.7.331pyflakes==0.7.3
26pyquery==1.2.432pyquery==1.2.4
27python-dateutil==2.133python-dateutil==2.1
34python-openid==2.2.5
28pytz==2013b35pytz==2013b
29PyYAML==3.10
30redis==2.7.636redis==2.7.6
31requests==1.2.337requests==1.2.3
38requests-oauthlib==0.3.2
32simplejson==3.3.039simplejson==3.3.0
33six==1.3.040six==1.3.0
34South==0.8.1
35supervisor==3.0b241supervisor==3.0b2
36testresources==0.2.742testresources==0.2.7
37tornado==3.143tornado==3.1

Subscribers

People subscribed via source and target branches

to all changes: