You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

131 lines
3.1 KiB

12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
  1. """
  2. Django settings for pydash project.
  3. For more information on this file, see
  4. https://docs.djangoproject.com/en/1.6/topics/settings/
  5. For the full list of settings and their values, see
  6. https://docs.djangoproject.com/en/1.6/ref/settings/
  7. """
  8. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  9. import os
  10. BASE_DIR = os.path.dirname(os.path.dirname(__file__))
  11. #SITE_ID = 1
  12. # Quick-start development settings - unsuitable for production
  13. # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
  14. # SECURITY WARNING: keep the secret key used in production secret!
  15. SECRET_KEY = '1)$crmowu-23tz@i2-d=7tb3t+1u&(pm!lnjyuarki^72h!3af'
  16. # SECURITY WARNING: don't run with debug turned on in production!
  17. DEBUG = True
  18. TEMPLATE_DEBUG = True
  19. ADMINS = (
  20. )
  21. MANAGERS = ADMINS
  22. TIME_JS_REFRESH = 30000
  23. ALLOWED_HOSTS = ['*']
  24. # Application definition
  25. INSTALLED_APPS = (
  26. #'django.contrib.admin',
  27. 'django.contrib.auth',
  28. 'django.contrib.contenttypes',
  29. 'django.contrib.sessions',
  30. 'django.contrib.messages',
  31. #'django.contrib.sites',
  32. 'django.contrib.staticfiles',
  33. )
  34. MIDDLEWARE_CLASSES = (
  35. 'django.contrib.sessions.middleware.SessionMiddleware',
  36. 'django.middleware.common.CommonMiddleware',
  37. 'django.middleware.csrf.CsrfViewMiddleware',
  38. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  39. 'django.contrib.messages.middleware.MessageMiddleware',
  40. # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  41. )
  42. ROOT_URLCONF = 'pydash.urls'
  43. WSGI_APPLICATION = 'pydash.wsgi.application'
  44. # Database
  45. # https://docs.djangoproject.com/en/1.6/ref/settings/#databases
  46. DATABASES = {
  47. 'default': {
  48. 'ENGINE': 'django.db.backends.sqlite3',
  49. 'NAME': os.path.join(BASE_DIR, 'db.sqlite3')
  50. }
  51. }
  52. # Internationalization
  53. # https://docs.djangoproject.com/en/1.6/topics/i18n/
  54. LANGUAGE_CODE = 'en-us'
  55. TIME_ZONE = 'UTC'
  56. USE_I18N = True
  57. USE_L10N = True
  58. USE_TZ = True
  59. TEMPLATE_LOADERS = (
  60. 'django.template.loaders.filesystem.Loader',
  61. 'django.template.loaders.app_directories.Loader',
  62. # 'django.template.loaders.eggs.Loader',
  63. )
  64. TEMPLATE_DIRS = (os.path.join(BASE_DIR, 'templates'),)
  65. # Static files (CSS, JavaScript, Images)
  66. # https://docs.djangoproject.com/en/1.6/howto/static-files/
  67. STATIC_ROOT = os.path.join(os.path.dirname(__file__), '..', 'static')
  68. STATIC_URL = '/static/'
  69. STATICFILES_DIRS = (
  70. )
  71. STATICFILES_FINDERS = (
  72. 'django.contrib.staticfiles.finders.FileSystemFinder',
  73. 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
  74. #'django.contrib.staticfiles.finders.DefaultStorageFinder',
  75. )
  76. LOGGING = {
  77. 'version': 1,
  78. 'disable_existing_loggers': False,
  79. 'filters': {
  80. 'require_debug_false': {
  81. '()': 'django.utils.log.RequireDebugFalse'
  82. }
  83. },
  84. 'handlers': {
  85. 'mail_admins': {
  86. 'level': 'ERROR',
  87. 'filters': ['require_debug_false'],
  88. 'class': 'django.utils.log.AdminEmailHandler'
  89. }
  90. },
  91. 'loggers': {
  92. 'django.request': {
  93. 'handlers': ['mail_admins'],
  94. 'level': 'ERROR',
  95. 'propagate': True,
  96. },
  97. }
  98. }