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.

133 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. TIME_JS_REFRESH_LONG = 120000
  24. TIME_JS_REFRESH_NET = 2000
  25. ALLOWED_HOSTS = ['*']
  26. # Application definition
  27. INSTALLED_APPS = (
  28. #'django.contrib.admin',
  29. 'django.contrib.auth',
  30. 'django.contrib.contenttypes',
  31. 'django.contrib.sessions',
  32. 'django.contrib.messages',
  33. #'django.contrib.sites',
  34. 'django.contrib.staticfiles',
  35. )
  36. MIDDLEWARE_CLASSES = (
  37. 'django.contrib.sessions.middleware.SessionMiddleware',
  38. 'django.middleware.common.CommonMiddleware',
  39. 'django.middleware.csrf.CsrfViewMiddleware',
  40. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  41. 'django.contrib.messages.middleware.MessageMiddleware',
  42. # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  43. )
  44. ROOT_URLCONF = 'pydash.urls'
  45. WSGI_APPLICATION = 'pydash.wsgi.application'
  46. # Database
  47. # https://docs.djangoproject.com/en/1.6/ref/settings/#databases
  48. DATABASES = {
  49. 'default': {
  50. 'ENGINE': 'django.db.backends.sqlite3',
  51. 'NAME': os.path.join(BASE_DIR, 'db.sqlite3')
  52. }
  53. }
  54. # Internationalization
  55. # https://docs.djangoproject.com/en/1.6/topics/i18n/
  56. LANGUAGE_CODE = 'en-us'
  57. TIME_ZONE = 'UTC'
  58. USE_I18N = True
  59. USE_L10N = True
  60. USE_TZ = True
  61. TEMPLATE_LOADERS = (
  62. 'django.template.loaders.filesystem.Loader',
  63. 'django.template.loaders.app_directories.Loader',
  64. # 'django.template.loaders.eggs.Loader',
  65. )
  66. TEMPLATE_DIRS = (os.path.join(BASE_DIR, 'templates'),)
  67. # Static files (CSS, JavaScript, Images)
  68. # https://docs.djangoproject.com/en/1.6/howto/static-files/
  69. STATIC_ROOT = os.path.join(os.path.dirname(__file__), '..', 'static')
  70. STATIC_URL = '/static/'
  71. STATICFILES_DIRS = (
  72. )
  73. STATICFILES_FINDERS = (
  74. 'django.contrib.staticfiles.finders.FileSystemFinder',
  75. 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
  76. #'django.contrib.staticfiles.finders.DefaultStorageFinder',
  77. )
  78. LOGGING = {
  79. 'version': 1,
  80. 'disable_existing_loggers': False,
  81. 'filters': {
  82. 'require_debug_false': {
  83. '()': 'django.utils.log.RequireDebugFalse'
  84. }
  85. },
  86. 'handlers': {
  87. 'mail_admins': {
  88. 'level': 'ERROR',
  89. 'filters': ['require_debug_false'],
  90. 'class': 'django.utils.log.AdminEmailHandler'
  91. }
  92. },
  93. 'loggers': {
  94. 'django.request': {
  95. 'handlers': ['mail_admins'],
  96. 'level': 'ERROR',
  97. 'propagate': True,
  98. },
  99. }
  100. }