Django deployment - can't import app.urls

Posted by hora on Stack Overflow See other posts from Stack Overflow or by hora
Published on 2010-05-29T04:37:11Z Indexed on 2010/05/29 4:42 UTC
Read the original article Hit count: 437

Filed under:
|

I just moved a django project to a deployment server from my dev server, and I'm having some issues deploying it. My apache config is as follows:

<Location "/">
        Order allow,deny
        Allow from all
        SetHandler python-program
        PythonHandler django.core.handlers.modpython
        SetEnv DJANGO_SETTINGS_MODULE project.settings
        PythonDebug On
        PythonPath "['/home/django/'] + sys.path"
</Location>

Django does work, since it renders the Django debug views, but I get the following error:

ImportError at /
No module named app.urls

And here is all the information Django gives me:

Request Method: GET
Request URL: http://myserver.com/
Django Version: 1.1.1
Python Version: 2.6.5
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'django.contrib.admindocs',
 'project.app']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware')


Traceback:
File "/usr/lib64/python2.6/site-packages/django/core/handlers/base.py" in get_response
  83.                     request.path_info)
File "/usr/lib64/python2.6/site-packages/django/core/urlresolvers.py" in resolve
  218.                     sub_match = pattern.resolve(new_path)
File "/usr/lib64/python2.6/site-packages/django/core/urlresolvers.py" in resolve
  216.             for pattern in self.url_patterns:
File "/usr/lib64/python2.6/site-packages/django/core/urlresolvers.py" in _get_url_patterns
  245.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/lib64/python2.6/site-packages/django/core/urlresolvers.py" in _get_urlconf_module
  240.             self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib64/python2.6/site-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)

Exception Type: ImportError at /
Exception Value: No module named app.urls

Any ideas as to why I get an import error?

© Stack Overflow or respective owner

Related posts about django

Related posts about deployment