/examples/blogserver/settings.py

https://bitbucket.org/cklein/django-piston · Python · 95 lines · 46 code · 21 blank · 28 comment · 0 complexity · e3688aab66819288db38f118381c4ca8 MD5 · raw file

  1. import os, sys
  2. DEBUG = True
  3. TEMPLATE_DEBUG = DEBUG
  4. ADMINS = (
  5. # ('Your Name', 'your_email@domain.com'),
  6. )
  7. MANAGERS = ADMINS
  8. BASE_DIR = os.path.dirname(os.path.abspath(__file__))
  9. # Fix up piston imports here. We would normally place piston in
  10. # a directory accessible via the Django app, but this is an
  11. # example and we ship it a couple of directories up.
  12. sys.path.insert(0, os.path.join(BASE_DIR, '../../'))
  13. DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
  14. DATABASE_NAME = os.path.join(BASE_DIR, 'db') # Or path to database file if using sqlite3.
  15. #DATABASE_USER = '' # Not used with sqlite3.
  16. #DATABASE_PASSWORD = '' # Not used with sqlite3.
  17. #DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
  18. #DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
  19. # Local time zone for this installation. Choices can be found here:
  20. # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  21. # although not all choices may be available on all operating systems.
  22. # If running in a Windows environment this must be set to the same as your
  23. # system time zone.
  24. TIME_ZONE = 'America/Chicago'
  25. # Language code for this installation. All choices can be found here:
  26. # http://www.i18nguy.com/unicode/language-identifiers.html
  27. LANGUAGE_CODE = 'en-us'
  28. SITE_ID = 1
  29. # If you set this to False, Django will make some optimizations so as not
  30. # to load the internationalization machinery.
  31. USE_I18N = True
  32. # Absolute path to the directory that holds media.
  33. # Example: "/home/media/media.lawrence.com/"
  34. MEDIA_ROOT = ''
  35. # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  36. # trailing slash if there is a path component (optional in other cases).
  37. # Examples: "http://media.lawrence.com", "http://example.com/media/"
  38. MEDIA_URL = ''
  39. # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
  40. # trailing slash.
  41. # Examples: "http://foo.com/media/", "/media/".
  42. ADMIN_MEDIA_PREFIX = '/media/'
  43. # Make this unique, and don't share it with anybody.
  44. SECRET_KEY = 'f@vhy8vuq7w70v=cnynm(am1__*zt##i2--i2p-021@-qgws%g'
  45. # List of callables that know how to import templates from various sources.
  46. TEMPLATE_LOADERS = (
  47. 'django.template.loaders.filesystem.load_template_source',
  48. 'django.template.loaders.app_directories.load_template_source',
  49. # 'django.template.loaders.eggs.load_template_source',
  50. )
  51. MIDDLEWARE_CLASSES = (
  52. 'django.middleware.common.CommonMiddleware',
  53. 'django.contrib.sessions.middleware.SessionMiddleware',
  54. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  55. )
  56. ROOT_URLCONF = 'blogserver.urls'
  57. TEMPLATE_DIRS = (
  58. os.path.join(BASE_DIR, 'templates'),
  59. os.path.join(BASE_DIR, '../../piston/templates'),
  60. )
  61. INSTALLED_APPS = (
  62. 'django.contrib.auth',
  63. 'django.contrib.contenttypes',
  64. 'django.contrib.sessions',
  65. 'django.contrib.sites',
  66. 'django.contrib.admin',
  67. 'django.contrib.markup',
  68. 'blogserver.blog',
  69. 'blogserver.api',
  70. )
  71. FIXTURE_DIRS = (
  72. os.path.join(BASE_DIR, 'fixtures'),
  73. )
  74. APPEND_SLASH = False