diff examples/project/settings.py @ 9:35178e70f1cd

urls support in testcase objects
author Victor Ng <victor@monkeybean.ca>
date Thu, 28 Aug 2008 13:33:58 -0400
parents a82369f2574e
children
line wrap: on
line diff
--- a/examples/project/settings.py	Thu Aug 28 12:42:31 2008 -0400
+++ b/examples/project/settings.py	Thu Aug 28 13:33:58 2008 -0400
@@ -1,5 +1,8 @@
 # Django settings for 'project' project.
 
+import os
+PROJECT_PATH = os.path.abspath(os.path.split(__file__)[0])
+
 DEBUG = True
 TEMPLATE_DEBUG = DEBUG
 
@@ -10,7 +13,7 @@
 MANAGERS = ADMINS
 
 DATABASE_ENGINE = 'sqlite3'           # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
-DATABASE_NAME = 'zoo.db'             # Or path to database file if using sqlite3.
+DATABASE_NAME = os.path.join(PROJECT_PATH, 'zoo.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.
@@ -67,6 +70,7 @@
 ROOT_URLCONF = 'project.urls'
 
 TEMPLATE_DIRS = (
+    os.path.join(PROJECT_PATH, 'templates'),
     # 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.
@@ -80,3 +84,5 @@
     'django.contrib.sites',
     'project.zoo'
 )
+handler500 = 'django.views.defaults.server_error'
+