From 300e1bd1cb12a0345ff44f2d4c58ad589f723a53 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Sat, 19 Mar 2011 20:46:24 +0200 Subject: updated settings --- demo/manage.py | 0 demo/settings.py | 27 ++++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) mode change 100644 => 100755 demo/manage.py diff --git a/demo/manage.py b/demo/manage.py old mode 100644 new mode 100755 diff --git a/demo/settings.py b/demo/settings.py index bfa8f90..9b1e848 100644 --- a/demo/settings.py +++ b/demo/settings.py @@ -1,4 +1,8 @@ -# Django settings for demo project. +import os +import django + +DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__)) +SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG @@ -11,8 +15,8 @@ MANAGERS = ADMINS DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': '', # Or path to database file if using sqlite3. + 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': 'demo.db', # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. @@ -45,17 +49,17 @@ USE_L10N = True # Absolute filesystem path to the directory that will hold user-uploaded files. # Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = '' +MEDIA_ROOT = os.path.join(SITE_ROOT, 'media') # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash if there is a path component (optional in other cases). # Examples: "http://media.lawrence.com", "http://example.com/media/" -MEDIA_URL = '' +MEDIA_URL = '/media/' # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. # Examples: "http://foo.com/media/", "/media/". -ADMIN_MEDIA_PREFIX = '/media/' +ADMIN_MEDIA_PREFIX = '/adminmedia/' # Make this unique, and don't share it with anybody. SECRET_KEY = ')@-37b$*&g9#hm5u3+fny9rqn9+-2cge$4gdg8)b)w8)gbu)q2' @@ -78,9 +82,7 @@ MIDDLEWARE_CLASSES = ( ROOT_URLCONF = 'demo.urls' 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. + os.path.join(SITE_ROOT, 'templates'), ) INSTALLED_APPS = ( @@ -89,8 +91,7 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', - # Uncomment the next line to enable the admin: - # 'django.contrib.admin', - # Uncomment the next line to enable admin documentation: - # 'django.contrib.admindocs', + 'django.contrib.admin', + 'django.contrib.admindocs', + ) -- cgit v1.3.1