Nishanth Salahudeen
unread,Nov 23, 2009, 5:17:53 AM11/23/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google App Engine
Hi,
I modified hello world example to have 3 different scripts handling 3
different url patterns. I tested them by manually entering the url
into the address bar and hit ENTER.
"Localhost:8085" shows up as "Hello world!"
"Localhost:8085/2" doest appear. It shows blank page. Log says "404
error"
i tried random things instead of "2". the result is the same as that
with "2".
Please help.
In another version, I added a button with associated it to "/2" url
and used a handler function inside the main.py script file itself(as
opposed to a separate script file). When I clicked the button, the url
path "/2" showed up properly as expected. The address bar now says
"localhost:8085/2/".At this stage if I simply click inside the address
bar to select the url and hit ENTER, the page goes blank again like
before. when I replaced the button with a simple href link to the same
address url, it doesnt work!!
what could be going wrong?
My app.yaml file is as shown below
----------------------------------start
application: multipagetry
version: 1
runtime: python
api_version: 1
handlers:
- url: /2/.*
script: main2.py
- url: /
script: main.py
- url: /.*
script: main3.py
---------------------------------end
my main.py file which works properly for address "localhost:8085/" is
as below
--------------------------------start
import wsgiref.handlers
from google.appengine.ext import webapp
class MainHandler(webapp.RequestHandler):
def get(self):
self.response.out.write('Hello world!')
def main():
application = webapp.WSGIApplication([('/', MainHandler)],
debug=True)
wsgiref.handlers.CGIHandler().run(application)
if __name__ == '__main__':
main()
---------------------------------end
my main2.py file which doesnt work properly for address "localhost:
8085/2/" is as below
--------------------------------start
import wsgiref.handlers
from google.appengine.ext import webapp
class MainHandler(webapp.RequestHandler):
def get(self):
self.response.out.write('Hello world2222!')
def main():
application = webapp.WSGIApplication([('/', MainHandler)],
debug=True)
wsgiref.handlers.CGIHandler().run(application)
if __name__ == '__main__':
main()
---------------------------------end