settings.py 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. """
  2. Django settings for dashboard4 project.
  3. For more information on this file, see
  4. https://docs.djangoproject.com/en/2.1/topics/settings/
  5. For the full list of settings and their values, see
  6. https://docs.djangoproject.com/en/2.1/ref/settings/
  7. """
  8. import os
  9. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  10. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  11. # Quick-start development settings - unsuitable for production
  12. # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
  13. # SECURITY WARNING: keep the secret key used in production secret!
  14. SECRET_KEY = 'orb8q7e9aw#4yc5^k7fj8yz93!xy&3vj4b23&4(nzcbg7$=x97'
  15. # SECURITY WARNING: don't run with debug turned on in production!
  16. DEBUG = True
  17. ALLOWED_HOSTS = ['www.altemica.net','altemica.net','www.altemica.com','altemica.com']
  18. CSRF_TRUSTED_ORIGINS = ['https://altemica.net','https://www.altemica.net',]
  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. 'django.contrib.humanize',
  28. 'configurazione',
  29. 'login',
  30. 'sicurezza',
  31. 'utenti',
  32. 'domini',
  33. 'registrar',
  34. 'cancellazione',
  35. #'servizi',
  36. 'causali',
  37. 'history',
  38. 'contatti',
  39. 'alias',
  40. #'coda',
  41. 'logger',
  42. 'comunicazioni',
  43. 'template',
  44. 'ftp',
  45. 'liste',
  46. 'mail',
  47. 'database',
  48. 'target',
  49. 'note',
  50. 'mqtt',
  51. 'filtro',
  52. 'web',
  53. 'proxy',
  54. 'supporto',
  55. 'spam',
  56. ]
  57. '''
  58. disabled:
  59. '''
  60. SESSION_ENGINE = 'django.contrib.sessions.backends.file'
  61. MIDDLEWARE = [
  62. 'django.middleware.security.SecurityMiddleware',
  63. 'django.contrib.sessions.middleware.SessionMiddleware',
  64. 'django.middleware.common.CommonMiddleware',
  65. 'django.middleware.csrf.CsrfViewMiddleware',
  66. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  67. 'django.contrib.messages.middleware.MessageMiddleware',
  68. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  69. ]
  70. ROOT_URLCONF = 'dashboard4.urls'
  71. TEMPLATES = [
  72. {
  73. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  74. 'DIRS': [ os.path.join(BASE_DIR,'static/basic'), ],
  75. 'APP_DIRS': True,
  76. 'OPTIONS': {
  77. 'context_processors': [
  78. 'django.template.context_processors.debug',
  79. 'django.template.context_processors.request',
  80. 'django.contrib.auth.context_processors.auth',
  81. 'django.contrib.messages.context_processors.messages',
  82. ],
  83. },
  84. },
  85. ]
  86. WSGI_APPLICATION = 'dashboard4.wsgi.application'
  87. # Database
  88. # https://docs.djangoproject.com/en/2.1/ref/settings/#databases
  89. DATABASES = {
  90. 'default': {
  91. 'ENGINE': 'django.db.backends.mysql',
  92. 'NAME':'services',
  93. 'USER':'_services_',
  94. 'PASSWORD':'_Empatia2024_',
  95. 'HOST': '10.55.224.206',
  96. 'PORT': '',
  97. }
  98. }
  99. # Password validation
  100. # https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
  101. AUTH_PASSWORD_VALIDATORS = [
  102. {
  103. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  104. },
  105. {
  106. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  107. },
  108. {
  109. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  110. },
  111. {
  112. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  113. },
  114. ]
  115. # Internationalization
  116. # https://docs.djangoproject.com/en/2.1/topics/i18n/
  117. LANGUAGE_CODE = 'it-it'
  118. TIME_ZONE = 'Europe/Rome'
  119. USE_I18N = True
  120. USE_L10N = True
  121. USE_TZ = True
  122. # Static files (CSS, JavaScript, Images)
  123. # https://docs.djangoproject.com/en/2.1/howto/static-files/
  124. STATIC_URL='dashboard4_static/'
  125. #STATIC_ROOT = '/d'
  126. #/home/net005/966.it/ftp/dashboard4/static'
  127. STATICFILES_DIRS = [ os.path.join(BASE_DIR,'images'), ]
  128. # da attivare quando in servizio
  129. FORCE_SCRIPT_NAME = '/dashboard4'
  130. #la sessione comunque scade alla chiusura del browser
  131. SESSION_EXPIRE_AT_BROWSER_CLOSE=True
  132. #impostazioni di posta.
  133. EMAIL_HOST = '10.132.0.8'
  134. EMAIL_PORT = 25