Permalink
Browse files

always load funfactory from vendor library

  • Loading branch information...
1 parent c76098d commit df0f394758b21066ea1ddef60237a6ba32700a2d @lonnen lonnen committed Aug 27, 2012
Showing with 8 additions and 12 deletions.
  1. +8 −12 manage.py
View
@@ -5,20 +5,16 @@
# Edit this if necessary or override the variable in your environment.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project.settings')
-try:
- # For local development in a virtualenv:
- from funfactory import manage
-except ImportError:
- # Production:
- # Add a temporary path so that we can import the funfactory
- tmp_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
- 'vendor', 'src', 'funfactory')
- sys.path.append(tmp_path)
+# Add a temporary path so that we can import the funfactory
+tmp_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
+ 'vendor', 'src', 'funfactory')
+# Comment out to load funfactory from your site packages instead
+sys.path.insert(0, tmp_path)
- from funfactory import manage
+from funfactory import manage
- # Let the path magic happen in setup_environ() !
- sys.path.remove(tmp_path)
+# Let the path magic happen in setup_environ() !
+sys.path.remove(tmp_path)
manage.setup_environ(__file__, more_pythonic=True)

0 comments on commit df0f394

Please sign in to comment.