With the virtual environment activated and your project directory selected as the current directory, enter the following command in your command-line tool:
(myproject_env)$ python manage shell
By executing the preceding command, you will get in an interactive Python shell configured for your Django project, where you can play around with the code, inspect classes, try out methods, or execute scripts on the fly. In this recipe, we will go through the most important functions that you need to know in order to work with the Django shell.
You can either install IPython or bpython using one of the following commands, which will highlight the syntax for the output of your Django shell and add some other helpers: