diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f8491530..1b9bb5e6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All enhancements and patches to Cookiecutter Django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +##[2016-06-03] +### Added +- Documentation for debugging with Docker (@mjsisley) + ##[2016-06-02] ### Added - Added better instructions for installing postgres on Mac OS X (@dot2dotseurat ) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 4e0bc3bc5..5a0ab6eb4 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -97,6 +97,7 @@ Listed in alphabetical order. Matt Menzenski `@menzenski`_ Matt Warren `@mfwarren`_ Meghan Heintz `@dot2dotseurat`_ + mjsisley `@mjsisley`_ mozillazg `@mozillazg`_ Pablo `@oubiga`_ Raphael Pierzina `@hackebrot`_ @@ -160,6 +161,7 @@ Listed in alphabetical order. .. _@MathijsHoogland: https://github.com/MathijsHoogland .. _@menzenski: https://github.com/menzenski .. _@mfwarren: https://github.com/mfwarren +.. _@mjsisley: https://github.com/mjsisley .. _@mozillazg: https://github.com/mozillazg .. _@originell: https://github.com/originell .. _@oubiga: https://github.com/oubiga diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 03e9221c5..85aef9c6d 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -141,3 +141,45 @@ If you want to run the stack in detached mode (in the background), use the ``-d` :: $ docker-compose -f dev.yml up -d + +Debugging +~~~~~~~~~~~~~ + +ipdb +""""" + +If you are using the following within your code to debug: + +:: + + import ipdb; ipdb.set_trace() + +Then you may need to run the following for it to work as desired: + +:: + + $ docker-compose run -f dev.yml --service-ports django + +django-debug-toolbar +"""""""""""""""""""" + +In order for django-debug-toolbar to work with docker you need to add your docker-machine ip address (the output of `Get the IP ADDRESS`_) to INTERNAL_IPS in local.py + + +.. May be a better place to put this, as it is not Docker specific. + +You may need to add the following to your css in order for the django-debug-toolbar to be visible (this applies whether Docker is being used or not): + +.. code-block:: css + + /* Override Bootstrap 4 styling on Django Debug Toolbar */ + #djDebug[hidden], #djDebug [hidden] { + display: block !important; + } + + #djDebug [hidden][style='display: none;'] { + display: none !important; + } + + +