Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Commit

Permalink
Merge pull request #130 from Lonnen/funfactory-vendor-load
Browse files Browse the repository at this point in the history
always load funfactory from vendor library
  • Loading branch information
kumar303 committed Aug 28, 2012
2 parents c76098d + df0f394 commit 3ca0071
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions manage.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,20 +5,16 @@
# Edit this if necessary or override the variable in your environment. # Edit this if necessary or override the variable in your environment.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project.settings') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project.settings')


try: # Add a temporary path so that we can import the funfactory
# For local development in a virtualenv: tmp_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
from funfactory import manage 'vendor', 'src', 'funfactory')
except ImportError: # Comment out to load funfactory from your site packages instead
# Production: sys.path.insert(0, 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')
sys.path.append(tmp_path)


from funfactory import manage from funfactory import manage


# Let the path magic happen in setup_environ() ! # Let the path magic happen in setup_environ() !
sys.path.remove(tmp_path) sys.path.remove(tmp_path)




manage.setup_environ(__file__, more_pythonic=True) manage.setup_environ(__file__, more_pythonic=True)
Expand Down

0 comments on commit 3ca0071

Please sign in to comment.