for the static media part..u probably need this added to ur config...

<Location "/site_media">
   SetHandler none
</Location>


Jim

On Dec 14, 12:09 am, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
> > then open an interpreter and try importing each of the modules
> > individually.
>
> > the resulting error messages should probably lead u t the solution...
>
> Nope, all that works fine. Going step by step:
>
> >>> from myproject import app1
> >>> from myproject import app2
> >>> from app1 import models as models1
> >>> from app1 import views as views1
> >>> from app2 import models as models2
> >>> from app2 import views as views2
> >>> views1.index()
>
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> TypeError: index() takes exactly 1 argument (0 given)
>
> Just what you'd expect.
>
> Reaching for straws: the static media is still not functional, as I
> was leaving that for later, but I can't imagine that's relevant.
> Here's the mod_python bit of apache httpd.conf:
>
> DocumentRoot /home/me/webapps/django
> <Location "/">
> SetHandler python-program
>     PythonHandler django.core.handlers.modpython
>     SetEnv DJANGO_SETTINGS_MODULE myproject.settings
>     PythonPath "['/home/me/webapps/django'] + sys.path"
>     PythonDebug On
> Options FollowSymLinks
> Order allow,deny
> Allow from all
>
> Also, this directory tree is a svn checkout from a repository, don't
> know if that might have any effect.
>
> I realized I'd had the ServerName set wrong in the above apache conf,
> when I fixed it I got the same error, but a different traceback:
>
> (Thanks for your persistence with this, I hope the problem is
> interesting enough to warrant it)
>
> ======
>
> File "/home/me/lib/python2.5/mod_python/importer.py", line 1537, in
> HandlerDispatch
>   default=default_handler, arg=req, silent=hlist.silent)
> File "/home/me/lib/python2.5/mod_python/importer.py", line 1229, in
> _process_target
>   result = _execute_target(config, req, object, arg)
> File "/home/me/lib/python2.5/mod_python/importer.py", line 1128, in
> _execute_target
>   result = object(arg)
> File "/home/me/lib/python2.5/django/core/handlers/modpython.py", line
> 188, in handler
>   return ModPythonHandler()(req)
> File "/home/me/lib/python2.5/django/core/handlers/modpython.py", line
> 161, in __call__
>   response = self.get_response(request)
> File "/home/me/lib/python2.5/django/core/handlers/base.py", line 131,
> in get_response
>   return callback(request, **param_dict)
> File "/home/me/lib/python2.5/django/views/defaults.py", line 90, in
> server_error
>   return http.HttpResponseServerError(t.render(Context({})))
> File "/home/me/lib/python2.5/django/template/__init__.py", line 176,
> in render
>   return self.nodelist.render(context)
> File "/home/me/lib/python2.5/django/template/__init__.py", line 804,
> in render
>   bits.append(self.render_node(node, context))
> File "/home/me/lib/python2.5/django/template/__init__.py", line 817,
> in render_node
>   return node.render(context)
> File "/home/me/lib/python2.5/django/template/loader_tags.py", line 83,
> in render
>   return compiled_parent.render(context)
> File "/home/me/lib/python2.5/django/template/__init__.py", line 176,
> in render
>   return self.nodelist.render(context)
> File "/home/me/lib/python2.5/django/template/__init__.py", line 804,
> in render
>   bits.append(self.render_node(node, context))
> File "/home/me/lib/python2.5/django/template/__init__.py", line 817,
> in render_node
>   return node.render(context)
> File "/home/me/lib/python2.5/django/template/defaulttags.py", line 29,
> in render
>   output = self.nodelist.render(context)
> File "/home/me/lib/python2.5/django/template/__init__.py", line 804,
> in render
>   bits.append(self.render_node(node, context))
> File "/home/me/lib/python2.5/django/template/__init__.py", line 817,
> in render_node
>   return node.render(context)
> File "/home/me/lib/python2.5/django/template/loader_tags.py", line 24,
> in render
>   result = self.nodelist.render(context)
> File "/home/me/lib/python2.5/django/template/__init__.py", line 804,
> in render
>   bits.append(self.render_node(node, context))
> File "/home/me/lib/python2.5/django/template/__init__.py", line 817,
> in render_node
>   return node.render(context)
> File "/home/me/lib/python2.5/django/template/loader_tags.py", line 97,
> in render
>   return self.template.render(context)
> File "/home/me/lib/python2.5/django/template/__init__.py", line 176,
> in render
>   return self.nodelist.render(context)
> File "/home/me/lib/python2.5/django/template/__init__.py", line 804,
> in render
>   bits.append(self.render_node(node, context))
> File "/home/me/lib/python2.5/django/template/__init__.py", line 817,
> in render_node
>   return node.render(context)
> File "/home/me/lib/python2.5/django/template/defaulttags.py", line
> 407, in render
>   output = self.nodelist.render(context)
> File "/home/me/lib/python2.5/django/template/__init__.py", line 804,
> in render
>   bits.append(self.render_node(node, context))
> File "/home/me/lib/python2.5/django/template/__init__.py", line 817,
> in render_node
>   return node.render(context)
> File "/home/me/lib/python2.5/django/template/defaulttags.py", line
> 407, in render
>   output = self.nodelist.render(context)
> File "/home/me/lib/python2.5/django/template/__init__.py", line 804,
> in render
>   bits.append(self.render_node(node, context))
> File "/home/me/lib/python2.5/django/template/__init__.py", line 817,
> in render_node
>   return node.render(context)
> File "/home/me/lib/python2.5/django/template/defaulttags.py", line
> 246, in render
>   return self.nodelist_false.render(context)
> File "/home/me/lib/python2.5/django/template/__init__.py", line 804,
> in render
>   bits.append(self.render_node(node, context))
> File "/home/me/lib/python2.5/django/template/__init__.py", line 817,
> in render_node
>   return node.render(context)
> File "/home/me/lib/python2.5/django/template/defaulttags.py", line
> 212, in render
>   return self.nodelist_false.render(context)
> File "/home/me/lib/python2.5/django/template/__init__.py", line 804,
> in render
>   bits.append(self.render_node(node, context))
> File "/home/me/lib/python2.5/django/template/__init__.py", line 817,
> in render_node
>   return node.render(context)
> File "/home/me/lib/python2.5/django/template/defaulttags.py", line
> 365, in render
>   return reverse(self.view_name, args=args, kwargs=kwargs)
> File "/home/me/lib/python2.5/django/core/urlresolvers.py", line 297,
> in reverse
>   return iri_to_uri(u'/' + get_resolver(urlconf).reverse(viewname,
> *args, **kwargs))
> File "/home/me/lib/python2.5/django/core/urlresolvers.py", line 282,
> in reverse
>   if lookup_view in self.reverse_dict:
> File "/home/me/lib/python2.5/django/core/urlresolvers.py", line 221,
> in _get_reverse_dict
>   self._reverse_dict[pattern.callback] = (pattern,)
> File "/home/me/lib/python2.5/django/core/urlresolvers.py", line 181,
> in _get_callback
>   raise ViewDoesNotExist, "Could not import %s. Error was: %s" %
> (mod_name, str(e))
> ViewDoesNotExist: Could not import myproject.app1.views. Error was: No
> module named app2.models
--~--~---------~--~----~------------~-------~--~----~
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