Thanks!
On Sep 6, 7:21 am, andrei <[email protected]> wrote:
> The problem is that your app doesn't have the right path.
> You should do
> import sys, os
> rootdir = os.path.abspath(os.path.dirname(__file__)) + '/'
> render = web.template.render(rootdir+'templates/')
>
> and you don't need this unless you want to open templates dir to
> public
> Alias /testapp/templates /var/www/testapp/templates/
>
> On Sep 6, 11:17 am, p_W <[email protected]> wrote:
>
> > I am building a test app with web.py right now, and am trying to make
> > sure my apache/wsgi setup is correct for future production use.
>
> > The one problem I am having is that when I run the app with the web.py
> > dev server, everything is fine. When I run it through apache/wsgi, it
> > cannot find my templates/ dir. Here is my code.py file:
>
> > import web
> > web.config.debug = True
> > render = web.template.render("templates/")
> > urls=(....#url list here)
> > application = web.application(urls, globals()).wsgifunc()
> > if __name__ == "__main__":
> > application.run()
>
> > class index:
> > def GET(self):
> > return render.index()
>
> > I have my httpd.conf file set up like the example in the Cookbook, and
> > have worked out a couple of the problems already (didn't realize that
> > app=web.application.... wouldn't work, had to be
> > application=web.application....) but have not been able to get this
> > one.
>
> > I have tried this line in my httpd.conf:
>
> > Alias /testapp/templates /var/www/testapp/templates/
>
> > but it still gave me the same error. Any help would be appreciated.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---