Add script path to "WSGIPythonPath" in wsgi.conf (on Debian this is located in /etc/apache2/mods-enabled/wsgi.conf)
2011/4/4 Petey <[email protected]> > Hi, > > I started learning web.py. I installed and configured apache and > mod_wsgi. > > LoadModule wsgi_module modules/mod_wsgi.so > > WSGIScriptAlias /webpy htdocs/webpy/index.py/ > > Alias /webpy/static htdocs/webpy/static/ > AddType text/html .py > > <Directory htdocs/webpy/index.py/> > Order deny,allow > Allow from all > </Directory> > > > I'm having a problem with loading templates. If i run the project from > internal web.py server then everything works allright but if I try to > enter templated site I get: internal server error. > > I suppose that it tries to find a template inside site-packages/web/ > folder. How do I modify it so I can use my templates folder within > project files? > > Error log: > File "C:/Users/Piotr/Desktop/xampp/htdocs/webpy/index.py", line 18, > in GET > return render.hello("Templates demo", "Hello", "A long time ago...") > File "C:\\Python\\lib\\site-packages\\web\\template.py", line 1009, in > __getattr__ > t = self._template(name) > File "C:\\Python\\lib\\site-packages\\web\\template.py", line 1003, in > _template > self._cache[name] = self._load_template(name) > File "C:\\Python\\lib\\site-packages\\web\\template.py", line 993, in > _load_template > raise AttributeError, "No template named " + name > AttributeError: No template named hello > > -- > You received this message because you are subscribed to the Google Groups > "web.py" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/webpy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.
