From 09006da12fd2956ca3ed5fc960492d664b6d5e56 Mon Sep 17 00:00:00 2001 From: "Nikita P. Shupeyko" Date: Mon, 28 Aug 2017 13:04:46 +0300 Subject: [PATCH] Randomize POSTGRES_PASSWORD in ./envs/(.local|.production)/.postgres --- hooks/post_gen_project.py | 2 ++ {{cookiecutter.project_slug}}/.envs/.local/.postgres | 2 +- {{cookiecutter.project_slug}}/.envs/.production/.postgres | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 7f23b164a..61d617701 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -204,6 +204,8 @@ def main(): set_secret_key(os.path.join(PROJECT_DIR_PATH, 'config', 'settings', 'local.py')) set_secret_key(os.path.join(PROJECT_DIR_PATH, 'config', 'settings', 'test.py')) set_secret_key(os.path.join(PROJECT_DIR_PATH, '.envs', '.production', '.django')) + set_secret_key(os.path.join(PROJECT_DIR_PATH, '.envs', '.local', '.postgres')) + set_secret_key(os.path.join(PROJECT_DIR_PATH, '.envs', '.production', '.postgres')) if __name__ == '__main__': diff --git a/{{cookiecutter.project_slug}}/.envs/.local/.postgres b/{{cookiecutter.project_slug}}/.envs/.local/.postgres index 1ec7dd497..7fbedf3aa 100644 --- a/{{cookiecutter.project_slug}}/.envs/.local/.postgres +++ b/{{cookiecutter.project_slug}}/.envs/.local/.postgres @@ -1,2 +1,2 @@ POSTGRES_USER={{cookiecutter.project_slug}} -POSTGRES_PASSWORD=postgrespassword +POSTGRES_PASSWORD=CHANGEME!!! diff --git a/{{cookiecutter.project_slug}}/.envs/.production/.postgres b/{{cookiecutter.project_slug}}/.envs/.production/.postgres index db8859462..d7240b68d 100644 --- a/{{cookiecutter.project_slug}}/.envs/.production/.postgres +++ b/{{cookiecutter.project_slug}}/.envs/.production/.postgres @@ -1,2 +1,2 @@ POSTGRES_USER= -POSTGRES_PASSWORD= +POSTGRES_PASSWORD=CHANGEME!!!