On Feb 16, 12:39 pm, thebrianschott <[email protected]> wrote:
> I am having no luck making with self.request.get() and None. I have
> found the following references, but they do not pan out for me: empty
> user inputs are not detected by the "if" clause.  Please help.

Request.get() returns `default_value` only if the parameter does not
exist in the request. In your case, if the user doesn't enter
anything, both parameters exist and have an empty string as their
value.

Try this code:

    def get(self):
        nextplace_id = self.request.get('nextplace')
        prevplace_id = self.request.get('prevplace')
        if prevplace_id or nextplace_id:
              print "we are ready to go now"
        else:
              print "you must supply either a Next or Prev place"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to