From 439766ea8f85149a09646cb125f7d00fd3d9afc7 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Sat, 7 Nov 2015 19:47:31 -0800 Subject: [PATCH] Slight change to post_gen_hook --- CHANGELOG.md | 9 ++++++--- hooks/post_gen_project.py | 4 +--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eaf483f5..52a3a9e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,13 @@ All enhancements and patches to cookiecutter-django will be documented in this f This project adheres to [Semantic Versioning](http://semver.org/). ## [2015-11-7] +### Added +- newrelic support (@amjith) +- DJANGO_SENTRY_DSN to env.example (@jayfk) + ### Changed -- Added newrelic support (@amjith) -- Fixed an error where celery could'nt load the sentry DSN from settings (@jayfk) -- Added DJANGO_SENTRY_DSN to env.example (@jayfk) +- Made `post_gen_hook.set_secret_key()` only changes one CHANGEME!!! at a time. +- Fixed an error where celery couldn't load the sentry DSN from settings (@jayfk) - Renamed ADMIN_URL to DJANGO_ADMIN_URL in env.example (@ChrisPappalardo) ## [2015-11-06] diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 90c1b45f..9570e9f4 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -62,10 +62,9 @@ def set_secret_key(setting_file_location): # Generate a SECRET_KEY that matches the Django standard SECRET_KEY = get_random_string() - SECRET_KEY = 'CHANGEME!!!' + SECRET_KEY # Replace "CHANGEME!!!" with SECRET_KEY - file_ = file_.replace('CHANGEME!!!', SECRET_KEY) + file_ = file_.replace('CHANGEME!!!', SECRET_KEY, 1) # Write the results to the locals.py module with open(setting_file_location, 'w') as f: @@ -92,7 +91,6 @@ def make_secret_key(project_directory): set_secret_key(env_file) - def remove_task_app(project_directory): """Removes the taskapp if celery isn't going to be used""" # Determine the local_setting_file_location