aboutsummaryrefslogtreecommitdiffstats
path: root/examples/settings.py
diff options
context:
space:
mode:
authortom christie tom@tomchristie.com2011-02-19 10:26:27 +0000
committertom christie tom@tomchristie.com2011-02-19 10:26:27 +0000
commit805aa03ec1871f6a766d9052b348ddce9e9843c3 (patch)
tree8ab5b6a7396236aa45bbc61e8404cc77fc75a9c5 /examples/settings.py
parentb749b950a1b4bede76b7e3900a6385779904902d (diff)
downloaddjango-rest-framework-805aa03ec1871f6a766d9052b348ddce9e9843c3.tar.bz2
Yowzers. Final big bunch of refactoring for 0.1 release. Now support Django 1.3's views, admin style api is all polished off, loads of tests, new test project for running the test. All sorts of goodness. Getting ready to push this out now.
Diffstat (limited to 'examples/settings.py')
-rw-r--r--examples/settings.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/examples/settings.py b/examples/settings.py
index 865dc394..c4cdd992 100644
--- a/examples/settings.py
+++ b/examples/settings.py
@@ -1,7 +1,4 @@
-# Django settings for src project.
-import os
-
-BASE_DIR = os.path.dirname(__file__)
+# Settings for djangorestframework examples project
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@@ -48,17 +45,23 @@ USE_L10N = True
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/"
+# NOTE: Some of the djangorestframework examples use MEDIA_ROOT to store content.
MEDIA_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/"
+# NOTE: None of the djangorestframework examples serve media content via MEDIA_URL.
MEDIA_URL = ''
# 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/'
+# NOTE: djangorestframework does not require the admin app to be installed,
+# but it does require the admin media be served. Django's test server will do
+# this for you automatically, but in production you'll want to make sure you
+# serve the admin media from somewhere.
+ADMIN_MEDIA_PREFIX = '/admin-media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = 't&9mru2_k$t8e2-9uq-wu2a1)9v*us&j3i#lsqkt(lbx*vh1cu'
@@ -84,16 +87,16 @@ 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(BASE_DIR, 'templates')
)
+
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
- #'django.contrib.admin',
+
'djangorestframework',
'resourceexample',