From b6168ae8248dc4d35078bb24cf202fa8e98a5016 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Wed, 24 Feb 2010 16:05:00 +0000 Subject: [PATCH] Sync with local modifications --- settings.py | 9 +++++---- sso/models.py | 12 ++++-------- urls.py | 2 +- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/settings.py b/settings.py index b1286e7..45ddabf 100644 --- a/settings.py +++ b/settings.py @@ -9,10 +9,10 @@ ADMINS = ( MANAGERS = ADMINS -DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. -DATABASE_NAME = '/home/dreddit/www/login.dredd.it/login.db3' # Or path to database file if using sqlite3. -DATABASE_USER = '' # Not used with sqlite3. -DATABASE_PASSWORD = '' # Not used with sqlite3. +DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. +DATABASE_NAME = 'dreddit_sso' # Or path to database file if using sqlite3. +DATABASE_USER = 'dreddit_sso' # Not used with sqlite3. +DATABASE_PASSWORD = 'bf6431670c657b9b62f08353d61047c4552ed3d4' # Not used with sqlite3. DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. @@ -72,6 +72,7 @@ TEMPLATE_DIRS = ( ) INSTALLED_APPS = ( + 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', diff --git a/sso/models.py b/sso/models.py index 2c3ccdf..37046d7 100644 --- a/sso/models.py +++ b/sso/models.py @@ -1,18 +1,14 @@ from django.db import models from django.contrib.auth.models import User -from eve_api.models.api_player import EVEAccount -class UserProfile(User): - eveaccount = models.ForeignKey(EVEAccount) - -class Site(models.Model): +class Service(models.Model): url = models.CharField(max_length=200) active = models.BooleanField() api = models.CharField(max_length=200) -class SiteAccount(models.Model): - user = models.ForeignKey(UserProfile) - site = models.ForeignKey(Site) +class ServiceAccount(models.Model): + user = models.ForeignKey(User) + service = models.ForeignKey(Service) username = models.CharField(max_length=200) active = models.BooleanField() diff --git a/urls.py b/urls.py index a4780af..059dff2 100644 --- a/urls.py +++ b/urls.py @@ -5,7 +5,7 @@ from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', - (r'^login/', include('django.contrib.auth.views.login')), + #(r'^login/', include('django.contrib.auth.views.login')), (r'^admin/', include(admin.site.urls)), )