In a link in a web page I want to pass a GET parameter to a GAE web app in Python. So, if someone access the web app through this link, one form with some input fields will show up. If someone access the web app, i.e. by typing the web app url, another form with more input fields will show up.
Does someone know the best way to do this?
I tried the following but it didn’t work:
def get(self):
q=self.request.get("q")
if q is None:
#show form with all fields
else:
#show form without all fields
def post(self):
#here I care about the added fields only if nothing was passed as a GET parameter
By default, get() returns the empty string (”) if the requested argument is not in the request (see documentation).
So for checking if an argument is missing, use
or