1

Can someone please provide an example of how to read and print "sydney" and "NSW" from URL:

http://xyz.appspot.com/main?city=sydney&state=NSW 

Using the def get (name, city, state) function?

Thank you

2 Answers 2

5

Its quite simple use

def get(self):
  city = self.request.get('city')
  state = self.request.get('state')

This is one the first things you get from

Getting started with Google AppEngine

Sign up to request clarification or add additional context in comments.

Comments

0

Assuming you are using webapp2 under Python 2.7

check out http://webapp-improved.appspot.com/guide/handlers.html

1 Comment

Link is now dead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.