I'd like to save myself some typing when I'm testing things in python manage.py shell. Basically I have a little shell script that gets me into the >>> shell, but I'd like to be able to automatically push in the import calls in my views.py script so I don't have to type them every time I want to test something. I tried writing them out in the shell script but it seems that they weren't passed to python shell.
Here's what I have so far.
#!/usr/local/bin/bash
python ~/path/to/manage.py shell
import datetime
from django.shortcuts import render_to_response
from mymodel.models import *
from myapp.forms import *
... and so on
What I'd like to happen is for all the import lines to be pushed into python shell so I don't have to type/copy-paste them everytime I want to debug at the shell.