settings.py 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. import os.path
  2. import sys
  3. # Django settings for example_project project.
  4. DEBUG = True
  5. TEMPLATE_DEBUG = True
  6. ADMINS = (
  7. # ('Your Name', 'your_email@domain.com'),
  8. )
  9. INTERNAL_IPS = ('127.0.0.1',)
  10. MANAGERS = ADMINS
  11. PROJECT_ROOT = os.path.dirname(__file__)
  12. sys.path.insert(0, os.path.abspath(os.path.join(PROJECT_ROOT, '..')))
  13. DATABASES = {
  14. 'default': {
  15. 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
  16. 'NAME': 'sentry', # Or path to database file if using sqlite3.
  17. 'USER': 'postgres', # Not used with sqlite3.
  18. 'PASSWORD': '', # Not used with sqlite3.
  19. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
  20. 'PORT': '', # Set to empty string for default. Not used with sqlite3.
  21. }
  22. }
  23. # Local time zone for this installation. Choices can be found here:
  24. # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  25. # although not all choices may be available on all operating systems.
  26. # On Unix systems, a value of None will cause Django to use the same
  27. # timezone as the operating system.
  28. # If running in a Windows environment this must be set to the same as your
  29. # system time zone.
  30. TIME_ZONE = 'America/Los_Angeles'
  31. # Language code for this installation. All choices can be found here:
  32. # http://www.i18nguy.com/unicode/language-identifiers.html
  33. LANGUAGE_CODE = 'en-us'
  34. SITE_ID = 1
  35. # If you set this to False, Django will make some optimizations so as not
  36. # to load the internationalization machinery.
  37. USE_I18N = True
  38. # If you set this to False, Django will not format dates, numbers and
  39. # calendars according to the current locale
  40. USE_L10N = True
  41. # Absolute path to the directory that holds media.
  42. # Example: "/home/media/media.lawrence.com/"
  43. MEDIA_ROOT = ''
  44. # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  45. # trailing slash if there is a path component (optional in other cases).
  46. # Examples: "http://media.lawrence.com", "http://example.com/media/"
  47. MEDIA_URL = ''
  48. # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
  49. # trailing slash.
  50. # Examples: "http://foo.com/media/", "/media/".
  51. ADMIN_MEDIA_PREFIX = '/media/'
  52. # Make this unique, and don't share it with anybody.
  53. SECRET_KEY = ')*)&8a36)6%74e@-ne5(-!8a(vv#tkv)(eyg&@0=zd^pl!7=y@'
  54. # List of callables that know how to import templates from various sources.
  55. TEMPLATE_LOADERS = (
  56. 'django.template.loaders.filesystem.Loader',
  57. 'django.template.loaders.app_directories.Loader',
  58. # 'django.template.loaders.eggs.Loader',
  59. )
  60. MIDDLEWARE_CLASSES = (
  61. 'django.middleware.common.CommonMiddleware',
  62. 'django.contrib.sessions.middleware.SessionMiddleware',
  63. 'django.middleware.csrf.CsrfViewMiddleware',
  64. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  65. 'django.contrib.messages.middleware.MessageMiddleware',
  66. )
  67. ROOT_URLCONF = 'example_project.urls'
  68. TEMPLATE_DIRS = (
  69. # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
  70. # Always use forward slashes, even on Windows.
  71. # Don't forget to use absolute paths, not relative paths.
  72. os.path.join(PROJECT_ROOT, 'templates'),
  73. )
  74. INSTALLED_APPS = (
  75. 'django.contrib.auth',
  76. 'django.contrib.admin',
  77. 'django.contrib.contenttypes',
  78. 'django.contrib.sessions',
  79. 'django.contrib.sites',
  80. 'django.contrib.messages',
  81. 'sentry',
  82. 'sentry.client',
  83. 'sentry.plugins.sentry_redmine',
  84. 'sentry.plugins.sentry_servers',
  85. 'sentry.plugins.sentry_sites',
  86. 'sentry.plugins.sentry_urls',
  87. 'haystack',
  88. 'paging',
  89. 'south',
  90. 'indexer',
  91. # Uncomment the next line to enable the admin:
  92. # 'django.contrib.admin',
  93. )
  94. import logging
  95. logging.basicConfig(level=logging.DEBUG)
  96. SENTRY_THRASHING_TIMEOUT = 0
  97. SENTRY_TESTING = True
  98. SENTRY_SITE = 'example'
  99. SENTRY_PUBLIC = False
  100. # just to test
  101. HAYSTACK_SEARCH_ENGINE = 'whoosh'
  102. SENTRY_SEARCH_ENGINE = 'whoosh'
  103. SENTRY_SEARCH_OPTIONS = {
  104. 'path': os.path.join(PROJECT_ROOT, 'sentry_index'),
  105. }
  106. # This shouldn't be needed, but bleh
  107. HAYSTACK_SITECONF = 'sentry.search_indexes'
  108. try:
  109. import debug_toolbar
  110. except ImportError, exc:
  111. pass
  112. else:
  113. INSTALLED_APPS = INSTALLED_APPS + (
  114. 'debug_toolbar',
  115. )
  116. MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + (
  117. 'debug_toolbar.middleware.DebugToolbarMiddleware',
  118. )
  119. try:
  120. from local_settings import *
  121. except ImportError, e:
  122. print e
  123. pass