Skip to content

Instantly share code, notes, and snippets.

@rogeruiz
Last active February 2, 2018 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogeruiz/e736e4a7af602f53a3fc4d9194a62a90 to your computer and use it in GitHub Desktop.
Save rogeruiz/e736e4a7af602f53a3fc4d9194a62a90 to your computer and use it in GitHub Desktop.
getting an interactive Django console from within a CF python-buildpack

Getting an interactive Django console from within a CF python-buildpack

  1. cf ssh into a running application
    • Once in your running application, find the dependencies that were used for running your Python application. They should be in a directory marked deps/.
  2. Export the $LD_LIBRARY_PATH to include the lib/ directory found in the deps/ directory. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/vcap/deps/0/lib.
  3. Change directories into your Django app and run python manage.py shell

At this point you should be in an interactive Django shell. Have fun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment