mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-13 09:32:26 +03:00
moved licenses.json to avoid filepathing issues hopefully?
This commit is contained in:
parent
15109ab31e
commit
b0699ce289
|
@ -331,7 +331,7 @@ def handle_licenses():
|
|||
with open(os.path.join("licenses", "-temporary-placeholder.txt")) as f:
|
||||
selected_title = f.readline()
|
||||
|
||||
with open(os.path.join("/", "licenses.json")) as f:
|
||||
with open(os.path.join("licenses", "licenses.json")) as f:
|
||||
titles_dict = json.load(f)
|
||||
# access the title to filename dictionary to find the correct file
|
||||
# using a dictionary instead of looping reduces time complexity
|
||||
|
|
|
@ -28,7 +28,7 @@ def main() -> None:
|
|||
(license_dir / file.name).write_text(replace_content_options(content))
|
||||
|
||||
# write the titles dictionary to a json file and put it in workflows so it can be accessed by other files
|
||||
with open('licenses.json', 'w') as licenses_dict:
|
||||
with open('{{cookiecutter.project_slug}}/licenses/licenses.json', 'w') as licenses_dict:
|
||||
json.dump(titles_dict, licenses_dict, indent=2)
|
||||
# Put "Not open source" at front so people know it's an option
|
||||
front_options = [
|
||||
|
|
Loading…
Reference in New Issue
Block a user