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.

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