Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allauth support #16

Merged
merged 4 commits into from Dec 20, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -5,6 +5,9 @@ __pycache__/
# C extensions
*.so

# local settings
dev.py

# Distribution / packaging
.Python
env/
Expand Down
26 changes: 23 additions & 3 deletions junction/junction/settings.py
Expand Up @@ -4,6 +4,8 @@

BASE_DIR = os.path.dirname(os.path.dirname(__file__))

SITE_ID = 1

MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
Expand All @@ -21,17 +23,35 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
)

THIRD_PARTY_APPS = (
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.google',
'allauth.socialaccount.providers.github',
)

OUR_APPS = ('conferences',
'proposals',
)
'proposals',)

INSTALLED_APPS = CORE_APPS + THIRD_PARTY_APPS + OUR_APPS

TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.request",
"django.contrib.auth.context_processors.auth",
"allauth.account.context_processors.account",
"allauth.socialaccount.context_processors.socialaccount",
)

AUTHENTICATION_BACKENDS = (
# Needed to login by username in Django admin, regardless of `allauth`
"django.contrib.auth.backends.ModelBackend",
# `allauth` specific authentication methods, such as login by e-mail
"allauth.account.auth_backends.AuthenticationBackend"
)

ROOT_URLCONF = 'junction.urls'
WSGI_APPLICATION = 'junction.wsgi.application'
Expand Down Expand Up @@ -65,7 +85,7 @@

DEBUG = TEMPLATE_DEBUG = os.environ.get('DEBUG', 'on') == 'on'

ALLOWED_HOSTS = [] #TODO:
ALLOWED_HOSTS = [] # TODO:

# Dev Settings

Expand Down
1 change: 1 addition & 0 deletions junction/junction/urls.py
Expand Up @@ -7,4 +7,5 @@
# url(r'^blog/', include('blog.urls')),

url(r'^admin/', include(admin.site.urls)),
url(r'^accounts/', include('allauth.urls')),
)
1 change: 1 addition & 0 deletions requirements.txt
Expand Up @@ -4,3 +4,4 @@ ipython==2.3.1
psycopg2==2.5.1
pyreadline==2.0
six==1.8.0
django-allauth==0.18.0