Django Shell Plus Clear History

625 views Asked by At

Is there a command to clear the history of Django's Shell Plus?

I did not find any hints in the documentation or by typing ?.

2

There are 2 answers

0
sevic On BEST ANSWER

Removing the ipython history (~/.ipython/profile_default/history.sqlite) did the job.

0
WMRamadan On

You can also use the readline python package to clear history of Django Shell:

import readline
readline.clear_history()