[google-appengine] Re: Using boolean information in the URL string..?

2009-05-14 Thread Adam

leaving off the =value part of the name=value pair will not prevent
name from being included in your dictionary of GET query parameters.
You should be able to use something like:

if isthere in request.params.keys():
# isthere is present
else:
# isthere is not present

to check for it.

On May 14, 2:35 pm, astrid.thuec...@googlemail.com
astrid.thuec...@googlemail.com wrote:
 hi,

 I just want to tell me appengine that something is there or not - thus
 typically a boolean information.

 I want to tell the appengine by using an URL string that is either:

 http://example.appspot.com?propect=22istherehttp://example.appspot.com?propect=22

 isthere shall communicate to the appengine this boolean information.
 Is this the right way to do it or a breach of the specification of URL
 formatting?

 I think normally it expect a '=value' after isthere ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Using boolean information in the URL string..?

2009-05-14 Thread Sylvain

or do this

http://example.appspot.com/?propect=22isthere=0
or
http://example.appspot.com/?propect=22isthere=1

then you do something like that
isthere = req.get('isthere','1') == '1'
Then you can get a boolean true (default)/false


On 14 mai, 22:04, Adam adam.crossl...@gmail.com wrote:
 leaving off the =value part of the name=value pair will not prevent
 name from being included in your dictionary of GET query parameters.
 You should be able to use something like:

 if isthere in request.params.keys():
     # isthere is present
 else:
     # isthere is not present

 to check for it.

 On May 14, 2:35 pm, astrid.thuec...@googlemail.com

 astrid.thuec...@googlemail.com wrote:
  hi,

  I just want to tell me appengine that something is there or not - thus
  typically a boolean information.

  I want to tell the appengine by using an URL string that is either:

 http://example.appspot.com?propect=22istherehttp://example.appspot.c...

  isthere shall communicate to the appengine this boolean information.
  Is this the right way to do it or a breach of the specification of URL
  formatting?

  I think normally it expect a '=value' after isthere ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Using boolean information in the URL string..?

2009-05-14 Thread codingGirl

I already happy if I do not violate any URL syntax specifications by
just writing ishere

Where can I find the specification that says I do it correctly?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Using boolean information in the URL string..?

2009-05-14 Thread Nick Johnson (Google)

You want RFC 1738 (Uniform Resource Locators):
http://www.faqs.org/rfcs/rfc1738.html and section 3.2 of RFC 2616
(HTTP): http://www.faqs.org/rfcs/rfc2616.html

Neither spec actually requires that the query string take a particular
form, other than specifying what characters are valid in that part of
the URL. The standard key/value format you usually see used is the
application/x-www-form-urlencoded mime type, defined in the HTML
specification 
(http://www.w3.org/TR/html401/interact/forms.html#form-content-type).
There's no obligation to adhere to that standard when generating your
own URLs, though - it merely specifies what HTML forms can generate.

-Nick Johnson

On Thu, May 14, 2009 at 10:46 PM, codingGirl
astrid.thuec...@googlemail.com wrote:

 I already happy if I do not violate any URL syntax specifications by
 just writing ishere

 Where can I find the specification that says I do it correctly?
 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---