summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2011-03-19 20:46:24 +0200
committerYuval Adam <yuv.adm@gmail.com>2011-03-19 20:46:24 +0200
commit300e1bd1cb12a0345ff44f2d4c58ad589f723a53 (patch)
tree7e6d6bc9b041b0951a9bea65715845a920100476 /demo
parent9d5631031eeada149a923cd93b8eb8d2149c9c55 (diff)
updated settings
Diffstat (limited to 'demo')
-rwxr-xr-x[-rw-r--r--]demo/manage.py0
-rw-r--r--demo/settings.py27
2 files changed, 14 insertions, 13 deletions
diff --git a/demo/manage.py b/demo/manage.py
index 5e78ea9..5e78ea9 100644..100755
--- a/demo/manage.py
+++ b/demo/manage.py
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',
+
)