./manage.py shell questions

1 view
Skip to first unread message

chiggsy

unread,
Sep 8, 2008, 11:02:15 PM9/8/08
to Django users
Hi all,

I have some questions about the shell I get from manage.py shell:

When i run that command, I get IPython, which is good, but when i
check my namespace it is empty. Is this supposed to happen? Is this
command not supposed to load django, and my settings etc when i run
it? All it seems to do is add the path of my project to sys.path,
which seems to be the only thing different from ipython...

Karen Tracey

unread,
Sep 8, 2008, 11:15:59 PM9/8/08
to django...@googlegroups.com

It also adds your project's settings module to os.environ['DJANGO_SETTINGS_MODULE'].  That makes your settings available to Django without you having to set that environment variable yourself.  It doesn't auto-import anything, you still need to import the bits of django and your app that you want to work with in the shell.

Karen

chiggsy

unread,
Sep 8, 2008, 11:41:15 PM9/8/08
to Django users
Excellent. I am now Illuminated ( a bit more anyway ) Thanks!

On Sep 8, 11:15 pm, "Karen Tracey" <kmtra...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages