settings.py 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. """
  2. Django settings for celutz project.
  3. For more information on this file, see
  4. https://docs.djangoproject.com/en/1.7/topics/settings/
  5. For the full list of settings and their values, see
  6. https://docs.djangoproject.com/en/1.7/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. # Quick-start development settings - unsuitable for production
  12. # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
  13. # SECURITY WARNING: keep the secret key used in production secret!
  14. SECRET_KEY = 'ei3#@ejlp((&tlx2jrscs^wrvpn$y4o-7_(-$a_uc9%j3eux1*'
  15. # SECURITY WARNING: don't run with debug turned on in production!
  16. DEBUG = True
  17. ALLOWED_HOSTS = []
  18. # Application definition
  19. INSTALLED_APPS = (
  20. 'django.contrib.admin',
  21. 'django.contrib.auth',
  22. 'django.contrib.contenttypes',
  23. 'django.contrib.sessions',
  24. 'django.contrib.messages',
  25. 'django.contrib.staticfiles',
  26. # For Celery
  27. 'kombu.transport.django',
  28. 'rest_framework',
  29. 'panorama.apps.PanoramaConfig',
  30. 'api'
  31. )
  32. MIDDLEWARE_CLASSES = (
  33. 'django.contrib.sessions.middleware.SessionMiddleware',
  34. 'django.middleware.locale.LocaleMiddleware',
  35. 'django.middleware.common.CommonMiddleware',
  36. 'django.middleware.csrf.CsrfViewMiddleware',
  37. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  38. 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
  39. 'django.contrib.messages.middleware.MessageMiddleware',
  40. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  41. )
  42. ROOT_URLCONF = 'celutz.urls'
  43. TEMPLATES = [
  44. {
  45. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  46. 'DIRS': [],
  47. 'APP_DIRS': True,
  48. 'OPTIONS': {
  49. 'context_processors': [
  50. 'django.contrib.auth.context_processors.auth',
  51. 'django.template.context_processors.debug',
  52. 'django.template.context_processors.request',
  53. 'django.template.context_processors.i18n',
  54. 'django.template.context_processors.media',
  55. 'django.template.context_processors.static',
  56. 'django.template.context_processors.tz',
  57. 'django.template.context_processors.csrf',
  58. 'django.contrib.messages.context_processors.messages',
  59. ],
  60. },
  61. },
  62. ]
  63. WSGI_APPLICATION = 'celutz.wsgi.application'
  64. # Database
  65. # https://docs.djangoproject.com/en/1.7/ref/settings/#databases
  66. DATABASES = {
  67. 'default': {
  68. 'ENGINE': 'django.db.backends.sqlite3',
  69. 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  70. }
  71. }
  72. # Internationalization
  73. # https://docs.djangoproject.com/en/1.7/topics/i18n/
  74. LANGUAGE_CODE = 'fr'
  75. TIME_ZONE = 'UTC'
  76. USE_I18N = True
  77. USE_L10N = True
  78. USE_TZ = True
  79. # Static files (CSS, JavaScript, Images)
  80. # https://docs.djangoproject.com/en/1.7/howto/static-files/
  81. STATIC_ROOT = 'static'
  82. STATIC_URL = '/static/'
  83. # Is it required to login to use celutz?
  84. LOGIN_REQUIRED = False
  85. # For uploaded panorama
  86. MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
  87. MEDIA_URL = '/media/'
  88. # Relative to MEDIA_ROOT and MEDIA_URL
  89. PANORAMA_TILES_DIR = "tiles"
  90. # Max distance around a point at which to consider reference points
  91. # (in meters)
  92. PANORAMA_MAX_DISTANCE = 50000
  93. # Celery configuration
  94. BROKER_URL = 'django://'
  95. CELERY_TASK_SERIALIZER = 'json'
  96. CELERY_ACCEPT_CONTENT = ['json']
  97. # Local settings overriding
  98. try:
  99. from celutz.local_settings import *
  100. except ImportError:
  101. pass