mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Fixed URLconf issues, added seperate live/test db setting
This commit is contained in:
25
settings.py
25
settings.py
@@ -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"),
|
||||||
|
|||||||
@@ -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),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
1
urls.py
1
urls.py
@@ -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')),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user