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