views:

75

answers:

3

I'm working on debugging Django from the command-line. I'm working with django_extensions, and I have IPython installed and ideally I'd like to be able to extract as much information in the shell as possible. How would I go about this task most efficiently?

+1  A: 

How about:

python manage.py shell

More info here

Geo
Yes, knew about that from the docs. I'd probably go with shell_plus, since I'm already using django extensions.
chiggsy
+2  A: 

If you have django_extensions installed, use

python manage.py shell_plus

to get all of your model classes automatically pre-loaded.

Carl Meyer
Shell_plus is great. Also be sure to checkout iPython which adds a lot of useful features when using the shell (like printing dictionaries in 'pretty' tabbed and readable way instead of a clobber of data) -- http://ipython.scipy.org/moin/
T. Stone
+2  A: 

As mentioned by Geo manage.py shell is good but since you have django_extensions already installed then Carl's suggestion of manage.py shell_plus is even better... saves a ton of typing.

But, as a third suggestion that is a bit less general, you might also want to check out django-viewtools. I personally tend to use shell_plus, but this might be useful.

Van Gale
Thanks for the viewtools link... I'll be checking it out very soon. Best answer, especially since you read my question. Thanks.
chiggsy