diff options
author | Prabhu Ramachandran | 2011-11-08 02:25:07 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2011-11-08 02:25:07 +0530 |
commit | 27c048f58d60c9e03f39f271c8bbe4dd52038998 (patch) | |
tree | 21acc6b093a7961bc7b8fdaf40ff6a16d2fabc38 /settings.py | |
parent | d8c85c964bbb581fee492412aa30c4980af5c382 (diff) | |
download | online_test-27c048f58d60c9e03f39f271c8bbe4dd52038998.tar.gz online_test-27c048f58d60c9e03f39f271c8bbe4dd52038998.tar.bz2 online_test-27c048f58d60c9e03f39f271c8bbe4dd52038998.zip |
Making settings directory independent.
Diffstat (limited to 'settings.py')
-rw-r--r-- | settings.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/settings.py b/settings.py index a60554d..f540c1b 100644 --- a/settings.py +++ b/settings.py @@ -1,6 +1,6 @@ # Django settings for tester project. -from os.path import dirname, join, expanduser +from os.path import dirname, join, basename, abspath DEBUG = True TEMPLATE_DEBUG = DEBUG @@ -11,7 +11,8 @@ ADMINS = ( MANAGERS = ADMINS -DB_FILE = join(dirname(__file__), 'exam.db') +CURDIR = abspath(dirname(__file__)) +DB_FILE = join(CURDIR, 'exam.db') DATABASES = { 'default': { @@ -104,13 +105,13 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.messages.middleware.MessageMiddleware', ) -ROOT_URLCONF = 'tester.urls' +ROOT_URLCONF = '%s.urls'%(basename(CURDIR)) TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. - expanduser("~/stuff/django/tester/templates"), + join(CURDIR, "templates"), ) INSTALLED_APPS = ( |