Re: automatically import lots of modules at python manage.py shell time?

2010-03-28 Thread Matt Schinckel
On Mar 28, 3:35 am, Rolando Espinoza La Fuente wrote: > On Fri, Mar 26, 2010 at 7:39 PM, Bjunix wrote: > > django-extensions[1] brings the shell_plus command which auto-imports > > all models in installed apps. You can use this or have a look at it's > >

Re: automatically import lots of modules at python manage.py shell time?

2010-03-27 Thread Rolando Espinoza La Fuente
On Fri, Mar 26, 2010 at 7:39 PM, Bjunix wrote: > django-extensions[1] brings the shell_plus command which auto-imports > all models in installed apps. You can use this or have a look at it's > source. Yes. shell_plus is quite handy. $ bin/manage.py shell_plus [...] >From 'api'

Re: automatically import lots of modules at python manage.py shell time?

2010-03-26 Thread Bjunix
django-extensions[1] brings the shell_plus command which auto-imports all models in installed apps. You can use this or have a look at it's source. [1] http://github.com/django-extensions/django-extensions On Mar 26, 11:52 pm, "Tom X. Tobin" wrote: > On Fri, Mar 26,

Re: automatically import lots of modules at python manage.py shell time?

2010-03-26 Thread Tom X. Tobin
On Fri, Mar 26, 2010 at 5:45 PM, Phlip wrote: > os.environ['DJANGO_SETTINGS_MODULE'] = 'dev2_settings'  #  TODO  look > up which one My local copy actually has the following code in it: import os import re import sys m =

Re: automatically import lots of modules at python manage.py shell time?

2010-03-26 Thread Phlip
Tom X. Tobin wrote: > #!/usr/bin/env ipython -i -nobanner > Save that to a file in your PATH, make it executable, and you should be set. Awesome--thanks. And, instead of chmod +x-ing it, I added it to our common fab files, so everyone gets it with 'fab shell'. And I could not get ip =

Re: automatically import lots of modules at python manage.py shell time?

2010-03-26 Thread Tom X. Tobin
On Fri, Mar 26, 2010 at 4:47 PM, Phlip wrote: > I am in anguish over watching my colleagues fire up python manage.py > shell... > > ...and then typing several incredibly long import lines before > actually getting anything done. > > These same colleagues also seem to have

automatically import lots of modules at python manage.py shell time?

2010-03-26 Thread Phlip
Djangoists: I am in anguish over watching my colleagues fire up python manage.py shell... ...and then typing several incredibly long import lines before actually getting anything done. These same colleagues also seem to have itchy ^C fingers, meaning they bail out of the shell too often, too.