Re: Browsing Django modules from interactive python shell

2009-12-02 Thread Kenny Meyer
On Wed, 2 Dec 2009 11:36:48 -0500 Bill Freeman wrote: > import a > > does not automatically import modules and sub packages of package a. > It takes special action in a's __init__.py to make this happen as it > does for os.path when > you import os. > > I assume that you're doing this directly

Re: Browsing Django modules from interactive python shell

2009-12-02 Thread Frank DiRocco
Hello Kenny, As Bill mentioned in this threads parallel thread, you are prolly just entring the python shell like thiis $ python Instead try this from you projects directory (django_site\mysite) $ python manage.py shell As bill mentioned all kindsa magical cool stuff happens... fdiro...@4b0x

Re: Browsing Django modules from interactive python shell

2009-12-02 Thread Kenny Meyer
On Wed, 2 Dec 2009 11:19:41 -0500 Frank DiRocco wrote: > How about trying to look at whats available for django... mine says > this > > >>> import django > >>> dir(django) > ['VERSION', '__builtins__', '__doc__', '__file__', '__name__', > '__package__', '__path__', 'conf', 'contrib', 'core',

Re: Browsing Django modules from interactive python shell

2009-12-02 Thread Bill Freeman
import a does not automatically import modules and sub packages of package a. It takes special action in a's __init__.py to make this happen as it does for os.path when you import os. I assume that you're doing this directly in python, since in the manage.py shell other stuff has already caused

Re: Browsing Django modules from interactive python shell

2009-12-02 Thread Frank DiRocco
How about trying to look at whats available for django... mine says this >>> import django >>> dir(django) ['VERSION', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', 'conf', 'contrib', 'core', 'db', 'dispatch', 'forms', 'get_version', 'http', 'middleware', 'sho

Browsing Django modules from interactive python shell

2009-12-02 Thread Kenny Meyer
Hi guys, I have some strange behaviour in my interactive python shell, when trying to browse Django modules... Example: >>> import django >>> dir(django.core) AttributeError: 'module' object has no attribute 'core' >>> import django.core >>> dir(django.core) ['__builtins__', '__doc__', '__file_