You could have also used:urlpatterns = patterns('', (r'^$', 'qsm.recs.views.matrix'), (r'^users/', include('qsm.recs.urls')),because (as you know now) the python path was looking up to your project directory, but not as far as your application directory... Aaron bcurtu wrote: I got it!It was my apache config, I have included the path to the root of the project: PythonPath "['/home/bcurtu/ws-python','/home/bcurtu/ws-python/qsm'] + sys.path" Now it works, thanks! On 18 abr, 19:17, "Michael Wieher" <[EMAIL PROTECTED]> wrote:i guess the relative path is the question i assume ws-python is the directory your main urls file is in and the recs directly lives in it, with an __init__.py file ? On Fri, Apr 18, 2008 at 12:15 PM, bcurtu <[EMAIL PROTECTED]> wrote:Hi,I have set up my apache with mod_python. When I call my main page on /, it works fine. However, when I try to access to other applications (/users/23) I get this error:ImproperlyConfigured: Error while importing URLconf 'recs.urls': No module named recs.urlsMy main urls.py code is:urlpatterns = patterns('', (r'^$', 'qsm.recs.views.matrix'), (r'^users/', include('recs.urls')), ... and moreAnd of course, I have a recs/urls.py file with a correct configuration...My mod_python config is :<Location "/"> SetHandler python-program PythonHandler django.core.handlers.modpython PythonPath "['/home/bcurtu/ws-python'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE qsm.settings PythonDebug On </Location>Everything looks fine, isn't it? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~--- |
- mod_python error bcurtu
- Re: mod_python error Michael Wieher
- Re: mod_python error bcurtu
- Re: mod_python error Tim Sawyer
- Re: mod_python error bcurtu
- Re: mod_python error Aaron Fay