first of segunda
This commit is contained in:
@@ -9,21 +9,14 @@ import pytz
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'django-insecure-5*mm&uf5zq@t6nrs_5z8-_qtyapm^3&yz^wqqkc_a!v(!ulj-^'
|
||||
|
||||
SECRET_KEY = os.getenv("adminAS_KEY")
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = False
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
@@ -31,7 +24,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
|
||||
|
||||
'rest_framework',
|
||||
'rest_framework.authtoken',
|
||||
|
||||
@@ -57,9 +50,7 @@ MIDDLEWARE = [
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'Admin.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
@@ -118,15 +109,13 @@ EMAIL_USE_SSL=True
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
|
||||
|
||||
|
||||
|
||||
if DEBUG:
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': 'cfdi_as',
|
||||
'USER': 'root',
|
||||
'PASSWORD': 'Soluciones28@',
|
||||
'PASSWORD':os.getenv("BD_PASS"),
|
||||
'HOST': '127.0.0.1',
|
||||
'PORT': '',
|
||||
'OPTIONS': {'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"},
|
||||
@@ -138,7 +127,7 @@ else:
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': 'fjrodriguez$cfdi_as',
|
||||
'USER': 'fjrodriguez',
|
||||
'PASSWORD': 'Soluciones28@',
|
||||
'PASSWORD':os.getenv("BD_PASS"),
|
||||
'HOST': 'fjrodriguez.mysql.pythonanywhere-services.com',
|
||||
'PORT': '3306',
|
||||
'OPTIONS': {'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"},
|
||||
|
||||
Reference in New Issue
Block a user