File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -12,4 +12,5 @@ pushreg
12
12
mypoly.py
13
13
tmp
14
14
poly2.py
15
+ libraries-local
15
16
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
+
3
+ # Prepend project subdirectory 'libraries-local' to sys.path.
4
+ # This allows us to use/test any version of Django
5
+ # (e.g. Django 1.2 subversion) or any other packages/libraries.
6
+ import sys , os
7
+ project_path = os .path .dirname (os .path .abspath (__file__ ))
8
+ libs_local_path = os .path .join (project_path , 'libraries-local' )
9
+ if libs_local_path not in sys .path : sys .path .insert (1 , libs_local_path )
10
+ import django
11
+ print 'using Django version: %s, from %s' % (django .get_version (), os .path .dirname (os .path .abspath (django .__file__ )))
12
+
13
+ # vanilla Django manage.py from here on:
14
+
2
15
from django .core .management import execute_manager
3
16
try :
4
17
import settings # Assumed to be in the same directory.
You can’t perform that action at this time.
0 commit comments