Code

Ticket #1040: 1040.diff

File 1040.diff, 606 bytes (added by fcurella, 3 years ago)
Line 
1Index: django/core/management/commands/startproject.py
2===================================================================
3--- django/core/management/commands/startproject.py     (revision 16738)
4+++ django/core/management/commands/startproject.py     (working copy)
5@@ -37,3 +37,7 @@
6         settings_contents = re.sub(r"(?<=SECRET_KEY = ')'", secret_key + "'", settings_contents)
7         fp.write(settings_contents)
8         fp.close()
9+
10+        # Assign execution permission to manage.py
11+        manage_file = os.path.join(directory, project_name, 'manage.py')
12+        os.chmod(manage_file, int('755', 8))