2

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:

enter image description here

Can I hide this SQL? It's so voluminous it makes the display unusable at times.

Ollie Glass
  • 19,455
  • 21
  • 76
  • 107

1 Answers1

0

with recent version, you could use

%%capture variable
the code

to capture stdout and stderr into a variable adding the --no-stdout flag

%%capture --no-stdout variable

wont capture stdout, thus displaying it.

Also, please, IPython (upper casse I) preferably, ipython accepted, but try to avoid iPython

Matt
  • 27,170
  • 6
  • 80
  • 74