I am still in the development phase of a Django App. Before even writing my views.py, I test them out to see if my models are correctly defined. This I do it in the terminal by invoking
python manage.py shell
But oh so often I make some syntax error prompting me to abort the shell ctrl-D
& retype everything. This process is taking forever. It would be better if I could write all this in some file just for my trials & if all's well copy it to views.py
.
What's the process for this? Is it as simple as creating a trial.py
in my app directory. Won't I have to import the Django env? What's the best way to do this?