From b93391f1aa2a96ace94463fc883b9a1220d50f82 Mon Sep 17 00:00:00 2001 From: Aamir Khan Date: Mon, 25 Jun 2012 19:05:12 -0400 Subject: More login services --- settings.py | 16 ++++++++++------ templates/login.html | 33 +++++++++++++++------------------ 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/settings.py b/settings.py index eb89a14..11bcec4 100644 --- a/settings.py +++ b/settings.py @@ -18,10 +18,10 @@ MAILMAN_PASS='88ffd62d1094a6248415c59d7538793f3df5de2f04d244087952394e689e902a' DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': 'hyperkitty.dev.db', # Or path to database file if using sqlite3. - 'USER': '', # Not used with sqlite3. - 'PASSWORD': '', # Not used with sqlite3. + 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': 'hk', # Or path to database file if using sqlite3. + 'USER': 'root', # Not used with sqlite3. + 'PASSWORD': 'rootroot', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } @@ -119,9 +119,11 @@ TEMPLATE_DIRS = ( ) AUTHENTICATION_BACKENDS = ( - 'django.contrib.auth.backends.ModelBackend', + 'social_auth.backends.google.GoogleBackend', + 'social_auth.backends.yahoo.YahooBackend', + 'social_auth.backends.browserid.BrowserIDBackend', 'social_auth.backends.OpenIDBackend', - 'social_auth.backends.browserid.BrowserIDBackend' + 'django.contrib.auth.backends.ModelBackend', ) INSTALLED_APPS = ( @@ -148,6 +150,7 @@ SOCIAL_AUTH_ASSOCIATE_URL_NAME = 'socialauth_associate_complete' SOCIAL_AUTH_DEFAULT_USERNAME = 'new_social_auth_user' SOCIAL_AUTH_UUID_LENGTH = 16 +AUTH_PROFILE_MODULE = 'gsoc.UserProfile' # A sample logging configuration. The only tangible logging @@ -173,5 +176,6 @@ LOGGING = { } } +SOCIAL_AUTH_LAST_LOGIN = 'social_auth_last_login_backend' APP_NAME = 'Fedora Mailman App' KITTYSTORE_URL = 'postgres://mm3:mm3@localhost/mm3' diff --git a/templates/login.html b/templates/login.html index 1adace9..267068b 100644 --- a/templates/login.html +++ b/templates/login.html @@ -15,33 +15,30 @@ -
- +
  • +
    + {% csrf_token %} + + Login using BrowserID +
    +
  • -

    Login using BrowserID

    + -
    - {% csrf_token %} - - Login using BrowserID -
    {% endblock %} {% block additionaljs %} - +