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?
views:
75answers:
3Yes, knew about that from the docs. I'd probably go with shell_plus, since I'm already using django extensions.
chiggsy
2009-11-25 07:56:00
+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
2009-11-23 20:51:31
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
2009-11-24 16:27:26
+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
2009-11-23 21:23:50
Thanks for the viewtools link... I'll be checking it out very soon. Best answer, especially since you read my question. Thanks.
chiggsy
2009-11-25 07:54:01