Guest User

Untitled

a guest
Jan 20th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. import os
  2.  
  3. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  4.  
  5. SECRET_KEY = ''
  6.  
  7. DEBUG = False
  8.  
  9. ALLOWED_HOSTS = ['hostnames_or_IPs']
  10.  
  11.  
  12. INSTALLED_APPS = [
  13. 'django.contrib.admin',
  14. 'django.contrib.auth',
  15. 'django.contrib.contenttypes',
  16. 'django.contrib.sessions',
  17. 'django.contrib.messages',
  18. 'django.contrib.staticfiles',
  19.  
  20. 'othersApplications',
  21. ]
  22.  
  23. MIDDLEWARE = [
  24. 'django.middleware.security.SecurityMiddleware',
  25. 'django.contrib.sessions.middleware.SessionMiddleware',
  26. 'django.middleware.common.CommonMiddleware',
  27. 'django.middleware.csrf.CsrfViewMiddleware',
  28. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  29. 'django.contrib.messages.middleware.MessageMiddleware',
  30. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  31. ]
  32.  
  33. ROOT_URLCONF = 'raspAPI.urls'
  34.  
  35. TEMPLATES = [
  36. {
  37. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  38. 'DIRS': [os.path.join(BASE_DIR, 'templates')]
  39. ,
  40. 'APP_DIRS': True,
  41. 'OPTIONS': {
  42. 'context_processors': [
  43. 'django.template.context_processors.debug',
  44. 'django.template.context_processors.request',
  45. 'django.contrib.auth.context_processors.auth',
  46. 'django.contrib.messages.context_processors.messages',
  47. ],
  48. },
  49. },
  50. ]
  51.  
  52. WSGI_APPLICATION = 'raspAPI.wsgi.application'
  53.  
  54. DATABASES = {
  55. 'default': {
  56. 'ENGINE': 'django.db.backends.postgresql_psycopg2',
  57. 'NAME': 'nomedobanco',
  58. 'USER': 'nomedousuario',
  59. 'PASSWORD': 'senhadousuario',
  60. 'HOST': 'localhost',
  61. 'PORT': '',
  62. }
  63. }
  64.  
  65. AUTH_PASSWORD_VALIDATORS = [
  66. {
  67. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  68. },
  69. {
  70. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  71. },
  72. {
  73. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  74. },
  75. {
  76. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  77. },
  78. ]
  79.  
  80. LANGUAGE_CODE = 'en-us'
  81.  
  82. TIME_ZONE = 'UTC'
  83.  
  84. USE_I18N = True
  85.  
  86. USE_L10N = True
  87.  
  88. USE_TZ = True
  89.  
  90. STATIC_URL = '/static/'
  91. STATIC_ROOT = 'static/'
Add Comment
Please, Sign In to add comment