Hide SQL statements when running IPython notebook with Django's django-extensions
问题 I'm using Django's django-extensions to run an iPython notebook with access to the Django models (as detailed here http://andrewbrookins.com/python/using-ipython-notebook-with-django/). When I make model queries, the notebook shows the underlying SQL queries executed by Django, like so: Can I hide this SQL? It's so voluminous it makes the display unusable at times. 回答1: with recent version, you could use %%capture variable the code to capture stdout and stderr into a variable adding the --no