Fixed URLconf issues, added seperate live/test db setting

This commit is contained in:
2010-02-25 18:17:29 +00:00
parent 12a7af2541
commit 131bc18d0e
4 changed files with 23 additions and 9 deletions

View File

@@ -1,4 +1,7 @@
import os
# Django settings for login project. # Django settings for login project.
LIVE = False
DEBUG = True DEBUG = True
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
@@ -9,12 +12,20 @@ ADMINS = (
MANAGERS = ADMINS MANAGERS = ADMINS
DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. if LIVE:
DATABASE_NAME = 'dreddit_sso' # Or path to database file if using sqlite3. DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_USER = 'dreddit_sso' # Not used with sqlite3. DATABASE_NAME = 'dreddit_sso' # Or path to database file if using sqlite3.
DATABASE_PASSWORD = 'bf6431670c657b9b62f08353d61047c4552ed3d4' # Not used with sqlite3. DATABASE_USER = 'dreddit_sso' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. DATABASE_PASSWORD = 'bf6431670c657b9b62f08353d61047c4552ed3d4' # Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. 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.
else:
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = 'dreddit_sso.db' # Or path to database file if using sqlite3.
DATABASE_USER = '' # Not used with sqlite3.
DATABASE_PASSWORD = '' # 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.
# Local time zone for this installation. Choices can be found here: # Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
@@ -63,7 +74,7 @@ MIDDLEWARE_CLASSES = (
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
) )
ROOT_URLCONF = 'login.urls' ROOT_URLCONF = 'urls'
TEMPLATE_DIRS = ( TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), "templates"), os.path.join(os.path.dirname(__file__), "templates"),

View File

@@ -1,5 +1,7 @@
from django.conf.urls.defaults import * from django.conf.urls.defaults import *
from sso import views
urlpatterns = patterns('', urlpatterns = patterns('',
(r'^profile/' 'views.profile'), (r'^profile/', views.profile),
) )

View File

@@ -1,7 +1,7 @@
from django.shortcuts import render_to_response from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from sso.models import ServiceAccounts from sso.models import ServiceAccount
def index(request): def index(request):
pass pass

View File

@@ -6,5 +6,6 @@ admin.autodiscover()
urlpatterns = patterns('', urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)), (r'^admin/', include(admin.site.urls)),
(r'^accounts/', include('registration.backends.default.urls')),
(r'^sso/', include('sso.urls')), (r'^sso/', include('sso.urls')),
) )