/django_portal/settings.py

https://github.com/CivicDB/CivicDB · Python · 116 lines · 72 code · 24 blank · 20 comment · 3 complexity · 650e591d6f94a2324cf326d56d9f8a58 MD5 · raw file

  1. import os
  2. DATA_UPLOAD_PATH='/tmp'
  3. DEBUG = True
  4. TEMPLATE_DEBUG = DEBUG
  5. GRAPHVIZ_DOT_CMD = "C:/Program Files/Graphviz2.22/bin"
  6. STATIC_DATA = os.path.join(os.path.dirname(__file__), 'static/')
  7. ADMINS = (
  8. ('Admin1', 'josh@umbrellaconsulting.com'),
  9. )
  10. AUTH_PROFILE_MODULE = 'profiles.UserProfile'
  11. MANAGERS = ADMINS
  12. ACCOUNT_ACTIVATION_DAYS = 5
  13. DEFAULT_FROM_EMAIL= 'civicdb@umbrellaconsulting.com'
  14. EMAIL_MANAGERS = False
  15. EMAIL_HOST='smtp.gmail.com'
  16. EMAIL_HOST_USER='django_emails@umbrellaconsulting.com'
  17. EMAIL_HOST_PASSWORD='2S7538'
  18. EMAIL_PORT= 587
  19. EMAIL_USE_TLS = True
  20. EMAIL_DEBUG = True
  21. if EMAIL_DEBUG:
  22. DEBUG_EMAIL_ADDR = 'josh@umbrellaconsulting.com'
  23. DEFAULT_FROM_EMAIL = DEBUG_EMAIL_ADDR
  24. MANAGERS = ('Debug Manager','%s' % DEBUG_EMAIL_ADDR)
  25. CACHE_BACKEND = 'file:///tmp/civicdb_cache'
  26. DATABASE_ENGINE = 'postgresql_psycopg2' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
  27. DATABASE_NAME = 'civicdb' # Or path to database file if using sqlite3.
  28. DATABASE_USER = 'civi' # Not used with sqlite3.
  29. DATABASE_PASSWORD = 'tk3' # Not used with sqlite3.
  30. DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
  31. DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
  32. # Local time zone for this installation. Choices can be found here:
  33. # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  34. # although not all choices may be available on all operating systems.
  35. # If running in a Windows environment this must be set to the same as your
  36. # system time zone.
  37. TIME_ZONE = 'America/Los_Angeles'
  38. # Language code for this installation. All choices can be found here:
  39. # http://www.i18nguy.com/unicode/language-identifiers.html
  40. LANGUAGE_CODE = 'en-us'
  41. SITE_ID = 1
  42. # If you set this to False, Django will make some optimizations so as not
  43. # to load the internationalization machinery.
  44. USE_I18N = True
  45. # Absolute path to the directory that holds media.
  46. # Example: "/home/media/media.lawrence.com/"
  47. MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media/')
  48. # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  49. # trailing slash if there is a path component (optional in other cases).
  50. # Examples: "http://media.lawrence.com", "http://example.com/media/"
  51. MEDIA_URL = ''
  52. # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
  53. # trailing slash.
  54. # Examples: "http://foo.com/media/", "/media/".
  55. ADMIN_MEDIA_PREFIX = '/media/'
  56. # Make this unique, and don't share it with anybody.
  57. SECRET_KEY = '2l!b-w*l869krj2r4xte#-st^&8uh!k=bdvq5t!j5djr63-xug'
  58. # List of callables that know how to import templates from various sources.
  59. TEMPLATE_LOADERS = (
  60. 'django.template.loaders.filesystem.load_template_source',
  61. 'django.template.loaders.app_directories.load_template_source',
  62. # 'django.template.loaders.eggs.load_template_source',
  63. )
  64. MIDDLEWARE_CLASSES = (
  65. 'django.middleware.common.CommonMiddleware',
  66. 'django.contrib.csrf.middleware.CsrfViewMiddleware',
  67. 'django.contrib.csrf.middleware.CsrfResponseMiddleware',
  68. 'django.contrib.sessions.middleware.SessionMiddleware',
  69. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  70. )
  71. ROOT_URLCONF = 'civicdb.urls'
  72. TEMPLATE_DIRS = (
  73. os.path.join(os.path.dirname(__file__), 'templates'),
  74. )
  75. INSTALLED_APPS = (
  76. 'django.contrib.auth',
  77. 'django.contrib.contenttypes',
  78. 'django.contrib.sessions',
  79. 'django.contrib.sites',
  80. 'django.contrib.admin',
  81. 'django.contrib.databrowse',
  82. 'django.contrib.gis',
  83. 'django.contrib.humanize',
  84. 'django.contrib.webdesign',
  85. 'registration',
  86. 'profiles',
  87. 'metadata',
  88. )
  89. try:
  90. from local_settings import *
  91. except ImportError, exp:
  92. pass