Django: Automatically executing statements in `manage.py shell`
I ended up monkeypatching IPython.frontend.terminal.embed.InteractiveShellEmbed.__call__ to add the definitions I wanted. (I know many people are opposed to monkeypatching but I find it to be a good solution in this case.)
Every time I start a shell using python manage.py shell, I want a few lines to be executed automatically. (In my case it would be a few import lines in the style of import django, my_app.)
How do I do this?