Advertisement
Guest User

Untitled

a guest
Apr 27th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.95 KB | None | 0 0
  1. [settings]
  2. DEBUG=True
  3. TEMPLATE_DEBUG=True
  4. SECRET_KEY='r-9@#_0@-^1@2&+4!1j-dsg&28jj7!ut6soxkfc@q=l5x_s7g+'
  5.  
  6. DB_ENGINE=mysql
  7. DB_NAME=cro
  8. DB_USER=root
  9. DB_PASSWORD=
  10. DB_HOST=localhost
  11. DB_PORT=3306
  12.  
  13.  
  14.  
  15.  
  16. // Settings.py
  17. """
  18. Django settings for cro project.
  19.  
  20. Generated by 'django-admin startproject' using Django 2.0.4.
  21.  
  22. For more information on this file, see
  23. https://docs.djangoproject.com/en/2.0/topics/settings/
  24.  
  25. For the full list of settings and their values, see
  26. https://docs.djangoproject.com/en/2.0/ref/settings/
  27. """
  28.  
  29. import os
  30. from decouple import config
  31.  
  32. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  33. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  34.  
  35.  
  36. # Quick-start development settings - unsuitable for production
  37. # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
  38.  
  39. # SECURITY WARNING: keep the secret key used in production secret!
  40. SECRET_KEY = '&%2!v_^mz5w6hn4fzv3ezizw@=+3c3(xi00o+2e&3m4h^evm+u'
  41.  
  42. # SECURITY WARNING: don't run with debug turned on in production!
  43. DEBUG = True
  44.  
  45. ALLOWED_HOSTS = ['*', '127.0.0.1']
  46.  
  47. PROJECT_ROOT = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
  48.  
  49.  
  50. # Application definition
  51.  
  52. INSTALLED_APPS = [
  53.     #Django
  54.     'django.contrib.admin',
  55.     'django.contrib.auth',
  56.     'django.contrib.contenttypes',
  57.     'django.contrib.sessions',
  58.     'django.contrib.messages',
  59.     'django.contrib.staticfiles',
  60.     #apps
  61.     'apps.fiscalizacao',
  62.     'django_superform',
  63. ]
  64.  
  65. MIDDLEWARE = [
  66.     'django.middleware.security.SecurityMiddleware',
  67.     'django.contrib.sessions.middleware.SessionMiddleware',
  68.     'django.middleware.common.CommonMiddleware',
  69.     'django.middleware.csrf.CsrfViewMiddleware',
  70.     'django.contrib.auth.middleware.AuthenticationMiddleware',
  71.     'django.contrib.messages.middleware.MessageMiddleware',
  72.     'django.middleware.clickjacking.XFrameOptionsMiddleware',
  73. ]
  74.  
  75. ROOT_URLCONF = 'cro.urls'
  76.  
  77. TEMPLATES = [
  78.     {
  79.         'BACKEND': 'django.template.backends.django.DjangoTemplates',
  80.         'DIRS': [os.path.join(PROJECT_ROOT, 'templates')],
  81.         'APP_DIRS': True,
  82.         'OPTIONS': {
  83.             'context_processors': [
  84.                 'django.template.context_processors.debug',
  85.                 'django.template.context_processors.request',
  86.                 'django.contrib.auth.context_processors.auth',
  87.                 'django.contrib.messages.context_processors.messages',
  88.             ],
  89.         },
  90.     },
  91. ]
  92.  
  93. WSGI_APPLICATION = 'cro.wsgi.application'
  94.  
  95.  
  96. # Database
  97. # https://docs.djangoproject.com/en/2.0/ref/settings/#databases
  98.  
  99. DATABASES = {
  100.     'default': {
  101.         'ENGINE': 'django.db.backends.%s' % config('DB_ENGINE'),
  102.         'NAME': config('DB_NAME'),
  103.         'USER': config('DB_USER'),
  104.         'PASSWORD': config('DB_PASSWORD'),
  105.         'HOST': config('DB_HOST', default='localhost'),
  106.         'PORT': config('DB_PORT'),
  107.     }
  108. }
  109.  
  110.  
  111. # Password validation
  112. # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
  113.  
  114. AUTH_PASSWORD_VALIDATORS = [
  115.     {
  116.         'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  117.     },
  118.     {
  119.         'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  120.     },
  121.     {
  122.         'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  123.     },
  124.     {
  125.         'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  126.     },
  127. ]
  128.  
  129. AUTH_USER_MODEL = 'fiscalizacao.user'
  130.  
  131. # Internationalization
  132. # https://docs.djangoproject.com/en/2.0/topics/i18n/
  133.  
  134. LANGUAGE_CODE = 'pt-br'
  135.  
  136. TIME_ZONE = 'America/Fortaleza'
  137.  
  138. USE_I18N = True
  139.  
  140. USE_L10N = True
  141.  
  142. USE_TZ = False
  143.  
  144. DATE_INPUT_FORMATS = ['%d/%m/%Y']
  145.  
  146. # Static files (CSS, JavaScript, Images)
  147. # https://docs.djangoproject.com/en/2.0/howto/static-files/
  148.  
  149. STATIC_URL = '/static/'
  150. STATIC_ROOT = os.path.join(BASE_DIR, 'static')
  151.  
  152. MEDIA_URL = '/media/'
  153. MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement