[magic-removal][patch] embed IPython shell in development server
|Reported by:||Owned by:||Adrian Holovaty|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
This patch lets you drop into an IPython shell mid-request with the development server to play around in the local namespace. Handy for debugging and getting familiar with Django's request and response objects.
from django.utils.shell import ipshell def some_view(request): response = render_to_response(...) ipshell() # suspend request here and drop into IPython shell return response
If a call to ipshell() is left in production code a warning will be sent to
stdout and processing will continue normally.