I can make django work under wsgi.

I configured apache to run wsgi and the test script works.

This is the vhost conf:

<VirtualHost *:80>
    ServerName test.banshee.lnx
    DocumentRoot "/home/www/python"
    ErrorLog /home/gabriel/pywks/test/error_log

    WSGIDaemonProcess test processes=2 threads=15 display-name=%{GROUP}
    WSGIProcessGroup test

    WSGIScriptAlias / /home/gabriel/pywks/test/sample.wsgi

    <Directory "/home/gabriel/pywks/test">
            Order allow,deny
            Allow from all
    </Directory>

</VirtualHost>

And sample.wsgi:

= * =

import os, sys
sys.path.append('/home/gabriel/pywks')
sys.path.append('/home/gabriel/pywks/vertaal')

os.environ['DJANGO_SETTINGS_MODULE'] = 'vertaal.settings'

import django.core.handlers.wsgi

application = django.core.handlers.wsgi.WSGIHandler()

= * =

I'm getting: "Caught an exception while rendering: No module named urls"
the fist time the application call the url tag on a template.

The admin site works, and I assume my urls conf too because it is
failing while rendering the template.

It works fine using mod_python.


Here the full traceback:

Original Traceback (most recent call last):
  File
"/usr/local/lib/python2.5/site-packages/django/template/debug.py", line
71, in render_node
    result = node.render(context)
  File
"/usr/local/lib/python2.5/site-packages/django/template/defaulttags.py",
line 373, in render
    url = reverse(self.view_name, args=args, kwargs=kwargs)
  File
"/usr/local/lib/python2.5/site-packages/django/core/urlresolvers.py",
line 254, in reverse
    *args, **kwargs)))
  File
"/usr/local/lib/python2.5/site-packages/django/core/urlresolvers.py",
line 227, in reverse
    possibilities = self.reverse_dict.getlist(lookup_view)
  File
"/usr/local/lib/python2.5/site-packages/django/core/urlresolvers.py",
line 161, in _get_reverse_dict
    for name in pattern.reverse_dict:
  File
"/usr/local/lib/python2.5/site-packages/django/core/urlresolvers.py",
line 154, in _get_reverse_dict
    if not self._reverse_dict and hasattr(self.urlconf_module,
'urlpatterns'):
  File
"/usr/local/lib/python2.5/site-packages/django/core/urlresolvers.py",
line 198, in _get_urlconf_module
    self._urlconf_module = __import__(self.urlconf_name, {}, {}, [''])
ImportError: No module named urls


Kind regards.

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to