settings.py 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. """
  2. Django settings for ztulec 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. TEMPLATE_DEBUG = True
  18. ALLOWED_HOSTS = []
  19. # Application definition
  20. INSTALLED_APPS = (
  21. 'django.contrib.admin',
  22. 'django.contrib.auth',
  23. 'django.contrib.contenttypes',
  24. 'django.contrib.sessions',
  25. 'django.contrib.messages',
  26. 'django.contrib.staticfiles',
  27. # For Celery
  28. 'kombu.transport.django',
  29. 'rest_framework',
  30. 'panorama',
  31. 'api'
  32. )
  33. MIDDLEWARE_CLASSES = (
  34. 'django.contrib.sessions.middleware.SessionMiddleware',
  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 = 'ztulec.urls'
  43. WSGI_APPLICATION = 'ztulec.wsgi.application'
  44. # Database
  45. # https://docs.djangoproject.com/en/1.7/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.7/topics/i18n/
  54. LANGUAGE_CODE = 'fr_fr'
  55. TIME_ZONE = 'UTC'
  56. USE_I18N = True
  57. USE_L10N = True
  58. USE_TZ = True
  59. # Static files (CSS, JavaScript, Images)
  60. # https://docs.djangoproject.com/en/1.7/howto/static-files/
  61. STATIC_URL = '/static/'
  62. # For uploaded panorama
  63. MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
  64. MEDIA_URL = '/media/'
  65. # Relative to MEDIA_ROOT and MEDIA_URL
  66. PANORAMA_TILES_DIR = "tiles"
  67. # Max distance around a point at which to consider reference points
  68. # (in meters)
  69. PANORAMA_MAX_DISTANCE = 30000
  70. # Celery configuration
  71. BROKER_URL = 'django://'
  72. CELERY_TASK_SERIALIZER = 'json'
  73. CELERY_ACCEPT_CONTENT = ['json']