Alternatively u can do this:

python manage.py shell

this will set up a shell with the necessay variables defined...

Jim


On Dec 13, 11:38 pm, jim <[EMAIL PROTECTED]> wrote:
> set ur environment variable DJANGO_SETTINGS_MODULE to 'settings' eg.
>
> export DJANGO_SETTINGS_MODULE=<current working directory>.settings
>
> then open an interpreter and try importing each of the modules
> individually.
>
> the resulting error messages should probably lead u t the solution...
>
> Jim
>
> On Dec 13, 11:03 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
>
> > Yup. The whole project directory tree from myproject on down is
> > exactly what it has been on my local system (with the exception of
> > settings.py), which has always worked fine using the django
> > development server. That's why this is so mysterious to me.
>
> > On Dec 14, 11:58 am, jim <[EMAIL PROTECTED]> wrote:
>
> > > do u have a __init__.py in the directory containing app1 and app2?
>
> > > Jim
>
> > > On Dec 13, 10:33 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
>
> > > > I just put my local django development setup up onto my web host, and
> > > > am trying to make all the necessary adjustments. So far I haven't been
> > > > able to get the views to work. I've got:
>
> > > > myproject.app1
> > > > myproject.app2
>
> > > > The basic index view lives in myproject.app1.views. When I try to
> > > > visit the index, I get ViewDoesNotExist: Could not import
> > > > myproject.app1.views. Error was: No module named app1.models.
>
> > > > The following two lines are at the top of the myproject.app1.views
> > > > file
>
> > > > from app1.models import (some models)
> > > > from app2.models import (some other models)
>
> > > > If I change this to:
>
> > > > from myproject.app1.models import...
> > > > from myproject.app2.models import...
>
> > > > Then the error changes from 'No module named app1.models' to 'No
> > > > module named app2.models.'
>
> > > > In my development environment I never had to prepend the project name
> > > > (though obviously that's not solving the problem here, either). When
> > > > migrating to the web host I changed nothing but the settings file, and
> > > > the settings get imported correctly. I'm using 0.97-pre-SVN-6917,
> > > > python 2.5.1, and here's my traceback:
>
> > > > ========
> > > > Traceback:
> > > > File "/home/me/lib/python2.5/django/core/handlers/base.py" in
> > > > get_response
> > > >   73.             callback, callback_args, callback_kwargs =
> > > > resolver.resolve(request.path)
> > > > File "/home/me/lib/python2.5/django/core/urlresolvers.py" in resolve
> > > >   233.                     sub_match = pattern.resolve(new_path)
> > > > File "/home/me/lib/python2.5/django/core/urlresolvers.py" in resolve
> > > >   172.             return self.callback, args, kwargs
> > > > File "/home/me/lib/python2.5/django/core/urlresolvers.py" in
> > > > _get_callback
> > > >   181.             raise ViewDoesNotExist, "Could not import %s. Error
> > > > was: %s" % (mod_name, str(e))
>
> > > > Exception Type: ViewDoesNotExist at /
> > > > Exception Value: Could not import myproject.app1.views. Error was: No
> > > > module named app2.models
> > > > ========
>
> > > > Hoping someone can shed some light....
>
> > > > E
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to