~ubuntu-branches/ubuntu/maverick/python-django/maverick-security

« back to all changes in this revision

Viewing changes to 03_dynamicshebang.diff

  • Committer: Bazaar Package Importer
  • Author(s): Andrea Gasparini
  • Date: 2008-01-14 11:52:15 UTC
  • Revision ID: james.westby@ubuntu.com-20080114115215-kdlshiu6fejy4nex
Tags: 0.96.1-1ubuntu2
debian/patches/03_dynamicshebang.diff:
manage.py created with the right python interpreter.fix LP: #182807

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- django/conf/project_template/manage.py      2008-01-14 11:44:56.000000000 +0100
 
2
+++ django/conf/project_template/manage.py      2008-01-14 11:44:14.000000000 +0100
 
3
@@ -1,4 +1,4 @@
 
4
-#!/usr/bin/env python
 
5
+#!{{ python_name }}
 
6
 from django.core.management import execute_manager
 
7
 try:
 
8
     import settings # Assumed to be in the same directory.
 
9
--- django/core/management.py   2008-01-14 11:45:15.000000000 +0100
 
10
+++ django/core/management.py   2008-01-14 11:44:14.000000000 +0100
 
11
@@ -778,7 +778,7 @@
 
12
             path_new = os.path.join(top_dir, relative_dir, f.replace('%s_name' % app_or_project, name))
 
13
             fp_old = open(path_old, 'r')
 
14
             fp_new = open(path_new, 'w')
 
15
-            fp_new.write(fp_old.read().replace('{{ %s_name }}' % app_or_project, name).replace('{{ %s_name }}' % other, other_name))
 
16
+            fp_new.write(fp_old.read().replace('{{ python_name }}',sys.executable).replace('{{ %s_name }}' % app_or_project, name).replace('{{ %s_name }}' % other, other_name))
 
17
             fp_old.close()
 
18
             fp_new.close()
 
19
             try: