ladogton2010 commited on
Commit
226a1a3
·
1 Parent(s): 431938e

base de datos

Browse files
Files changed (1) hide show
  1. app/mysite/settings.py +7 -2
app/mysite/settings.py CHANGED
@@ -10,6 +10,7 @@ For the full list of settings and their values, see
10
  https://docs.djangoproject.com/en/3.2/ref/settings/
11
  """
12
 
 
13
  from pathlib import Path
14
 
15
  # Build paths inside the project like this: BASE_DIR / 'subdir'.
@@ -75,8 +76,12 @@ WSGI_APPLICATION = 'mysite.wsgi.application'
75
 
76
  DATABASES = {
77
  'default': {
78
- 'ENGINE': 'django.db.backends.sqlite3',
79
- 'NAME': BASE_DIR / 'db.sqlite3',
 
 
 
 
80
  }
81
  }
82
 
 
10
  https://docs.djangoproject.com/en/3.2/ref/settings/
11
  """
12
 
13
+ import os
14
  from pathlib import Path
15
 
16
  # Build paths inside the project like this: BASE_DIR / 'subdir'.
 
76
 
77
  DATABASES = {
78
  'default': {
79
+ 'ENGINE': 'django.db.backends.mysql',
80
+ 'NAME': os.getenv('DB_DATABASE_NAME'),
81
+ 'USER': os.getenv('DB_USER'),
82
+ 'PASSWORD': os.getenv('DB_PASSWORD'),
83
+ 'HOST': os.getenv('DB_HOST'),
84
+ 'PORT': os.getenv('DB_PORT'),
85
  }
86
  }
87