summary refs log tree commit diff
path: root/pkgs/development/python-modules/mezzanine
diff options
context:
space:
mode:
authorLancelot SIX <lsix@lancelotsix.com>2016-10-31 16:09:19 +0100
committerLancelot SIX <lsix@lancelotsix.com>2016-10-31 16:38:45 +0100
commit8617a068b8ed7fa77356a518e79a12d37460c0ae (patch)
tree8935af0beab7dec2524a050d94e450a8fde2891d /pkgs/development/python-modules/mezzanine
parent0f7decd0121af57fc60a63623d83b19c9dee1229 (diff)
downloadnixpkgs-8617a068b8ed7fa77356a518e79a12d37460c0ae.tar
nixpkgs-8617a068b8ed7fa77356a518e79a12d37460c0ae.tar.gz
nixpkgs-8617a068b8ed7fa77356a518e79a12d37460c0ae.tar.bz2
nixpkgs-8617a068b8ed7fa77356a518e79a12d37460c0ae.tar.lz
nixpkgs-8617a068b8ed7fa77356a518e79a12d37460c0ae.tar.xz
nixpkgs-8617a068b8ed7fa77356a518e79a12d37460c0ae.tar.zst
nixpkgs-8617a068b8ed7fa77356a518e79a12d37460c0ae.zip
pythonPackages.mezzanine: Fix template project
This makes sure that the template project can be used and updated.
Otherzise files copied from the store stay readonly and cannot be
updated during the generation process.
Diffstat (limited to 'pkgs/development/python-modules/mezzanine')
-rw-r--r--pkgs/development/python-modules/mezzanine/writable_settings.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/mezzanine/writable_settings.patch b/pkgs/development/python-modules/mezzanine/writable_settings.patch
new file mode 100644
index 00000000000..4b5be7b5950
--- /dev/null
+++ b/pkgs/development/python-modules/mezzanine/writable_settings.patch
@@ -0,0 +1,21 @@
+diff -Nur mezzanine-3.1.10/mezzanine/bin/mezzanine_project.py mezzanine-3.1.10-patched/mezzanine/bin/mezzanine_project.py
+--- mezzanine-3.1.10/mezzanine/bin/mezzanine_project.py	2014-08-30 07:12:19.000000000 +0200
++++ mezzanine-3.1.10-patched/mezzanine/bin/mezzanine_project.py	2016-10-31 14:47:30.982401818 +0100
+@@ -5,6 +5,7 @@
+ from distutils.dir_util import copy_tree
+ from optparse import OptionParser
+ import os
++import stat
+ from shutil import move
+ from uuid import uuid4
+ 
+@@ -61,6 +62,9 @@
+         copy_tree(os.path.join(package_path, "project_template"), project_path)
+         move(local_settings_path + ".template", local_settings_path)
+ 
++    os.chmod(local_settings_path,
++             os.stat(local_settings_path).st_mode | stat.S_IWRITE)
++
+     # Generate a unique SECRET_KEY for the project's setttings module.
+     with open(local_settings_path, "r") as f:
+         data = f.read()