app_settings.py 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. """Copyright 2008 Orbitz WorldWide
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License."""
  11. # Django settings for graphite project.
  12. # DO NOT MODIFY THIS FILE DIRECTLY - use local_settings.py instead
  13. from os.path import dirname, join, abspath
  14. #Django settings below, do not touch!
  15. APPEND_SLASH = False
  16. TEMPLATE_DEBUG = False
  17. TEMPLATES = [
  18. {
  19. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  20. 'DIRS': [
  21. join(dirname( abspath(__file__) ), 'templates')
  22. ],
  23. 'APP_DIRS': True,
  24. 'OPTIONS': {
  25. 'context_processors': [
  26. # Insert your TEMPLATE_CONTEXT_PROCESSORS here or use this
  27. # list if you haven't customized them:
  28. 'django.contrib.auth.context_processors.auth',
  29. 'django.template.context_processors.debug',
  30. 'django.template.context_processors.i18n',
  31. 'django.template.context_processors.media',
  32. 'django.template.context_processors.static',
  33. 'django.template.context_processors.tz',
  34. 'django.contrib.messages.context_processors.messages',
  35. ],
  36. },
  37. },
  38. ]
  39. # Language code for this installation. All choices can be found here:
  40. # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
  41. # http://blogs.law.harvard.edu/tech/stories/storyReader$15
  42. LANGUAGE_CODE = 'en-us'
  43. # Absolute path to the directory that holds media.
  44. MEDIA_ROOT = ''
  45. # URL that handles the media served from MEDIA_ROOT.
  46. # Example: "http://media.lawrence.com"
  47. MEDIA_URL = ''
  48. MIDDLEWARE_CLASSES = (
  49. 'graphite.middleware.LogExceptionsMiddleware',
  50. 'django.middleware.common.CommonMiddleware',
  51. 'django.middleware.gzip.GZipMiddleware',
  52. 'django.contrib.sessions.middleware.SessionMiddleware',
  53. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  54. 'django.contrib.messages.middleware.MessageMiddleware',
  55. )
  56. ROOT_URLCONF = 'graphite.urls'
  57. INSTALLED_APPS = (
  58. 'graphite.metrics',
  59. 'graphite.render',
  60. 'graphite.browser',
  61. 'graphite.composer',
  62. 'graphite.account',
  63. 'graphite.dashboard',
  64. 'graphite.whitelist',
  65. 'graphite.events',
  66. 'graphite.url_shortener',
  67. 'django.contrib.auth',
  68. 'django.contrib.sessions',
  69. 'django.contrib.admin',
  70. 'django.contrib.contenttypes',
  71. 'django.contrib.staticfiles',
  72. 'tagging',
  73. )
  74. AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
  75. GRAPHITE_WEB_APP_SETTINGS_LOADED = True
  76. STATIC_URL = '/static/'
  77. STATIC_ROOT = '/opt/graphite/static/'