Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
roomlist
Commits
7e5a321b
Commit
7e5a321b
authored
Jan 09, 2015
by
Jason D Yeomans
Browse files
Set up allauth
parent
cccf011d
Changes
2
Hide whitespace changes
Inline
Side-by-side
roomlist/accounts/urls.py
View file @
7e5a321b
...
...
@@ -6,6 +6,9 @@ from django.contrib import admin
admin
.
autodiscover
()
urlpatterns
=
patterns
(
''
,
url
(
r
'^'
,
include
(
'allauth.urls'
)),
# login and logout
url
(
r
'^login/$'
,
'django.contrib.auth.views.login'
,
{
'template_name'
:
'login.html'
},
name
=
'login'
),
url
(
r
'^logout/$'
,
'django.contrib.auth.views.logout'
,
{
'template_name'
:
'index.html'
},
name
=
'logout'
),
...
...
roomlist/settings/settings.py
View file @
7e5a321b
...
...
@@ -39,6 +39,8 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.static'
,
'django.contrib.messages.context_processors.messages'
,
'django.core.context_processors.request'
,
'allauth.account.context_processors.account'
,
'allauth.socialaccount.context_processors.socialaccount'
,
)
# Quick-start development settings - unsuitable for production
...
...
@@ -64,11 +66,18 @@ INSTALLED_APPS = (
'django.contrib.sessions'
,
'django.contrib.messages'
,
'django.contrib.staticfiles'
,
'django.contrib.sites'
,
'api'
,
'housing'
,
'accounts'
,
'crispy_forms'
,
'django_gravatar'
,
'allauth'
,
'allauth.account'
,
'allauth.socialaccount'
,
'allauth.socialaccount.providers.facebook'
,
'allauth.socialaccount.providers.google'
,
'allauth.socialaccount.providers.twitter'
,
)
CRISPY_TEMPLATE_PACK
=
'bootstrap'
...
...
@@ -114,6 +123,12 @@ USE_L10N = True
USE_TZ
=
True
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"
,
)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment