To solve I make this:

in httpd.conf:

#In my server, I put my app out of htdocs.
WSGIScriptAlias /park-system "c:/apps/park-system/code.py/"

Alias /park-system/static "c:/apps/park-system/static/"
AddType text/html .py

#<File code.py>
#   SetHandler wsgi-script
#   Options ExecCGI FollowSymLinks
#</File>

<Directory "c:/apps/park-system/">
    Options Indexes FollowSymLinks MultiViews ExecCGI

    AddHandler cgi-script .cgi
    AddHandler wsgi-script .wsgi

    AllowOverride None
    Order allow,deny
    allow from all
</Directory>


in code.py:

#!/usr/bin/python

#This is necessary to find the "web" folder.
import sys, os
abspath = os.path.dirname(__file__)
sys.path.append(abspath)
os.chdir(abspath)

import web

render = web.template.render('templates/')

urls = (
  '/', 'index'
)

# This variable need to be called application
application = web.application(urls, globals()).wsgifunc()

class index:
    def GET(self):
        return render.index()

# This line need to be comment.
#if __name__ == "__main__": app.run()

Thanks for all help.

-- Leandro.

-- 
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.

Reply via email to