Created
November 7, 2021 12:15
-
-
Save gabrielloliveira/64a862b225a9da269fd95bb511507d68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
from django.core.management.utils import get_random_secret_key | |
BASE_DIR = Path(__file__).resolve().parent.parent | |
ENV_VARIABLES = f"""SECRET_KEY={get_random_secret_key()} | |
DEBUG=True | |
ALLOWED_HOSTS=* | |
""" | |
file = open(f"{BASE_DIR}/meuprojeto/.env", "w") | |
file.write(ENV_VARIABLES) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment