Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion GET AND POST METHOD

Received: by 10.59.10.136 with SMTP id ea8mr621494ved.5.1343725107938;
        Tue, 31 Jul 2012 01:58:27 -0700 (PDT)
X-BeenThere: cherrypy-users@googlegroups.com
Received: by 10.220.119.137 with SMTP id z9ls4301793vcq.2.gmail; Tue, 31 Jul
 2012 01:58:24 -0700 (PDT)
Received: by 10.58.117.41 with SMTP id kb9mr636831veb.27.1343725104408;
        Tue, 31 Jul 2012 01:58:24 -0700 (PDT)
Received: by 10.58.117.41 with SMTP id kb9mr636830veb.27.1343725104393;
        Tue, 31 Jul 2012 01:58:24 -0700 (PDT)
Return-Path: <danbr...@gmail.com>
Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50])
        by gmr-mx.google.com with ESMTPS id m9si1760537vdg.3.2012.07.31.01.58.24
        (version=TLSv1/SSLv3 cipher=OTHER);
        Tue, 31 Jul 2012 01:58:24 -0700 (PDT)
Received-SPF: pass (google.com: domain of danbr...@gmail.com designates 209.85.212.50 as permitted sender) client-ip=209.85.212.50;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of danbr...@gmail.com designates 209.85.212.50 as permitted sender) smtp.mail=danbr...@gmail.com; dkim=pass header...@gmail.com
Received: by vbal1 with SMTP id l1so5712358vba.9
        for <cherrypy-users@googlegroups.com>; Tue, 31 Jul 2012 01:58:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        bh=eMbHuROpEptGiHfJHH83MEaghlOYOH7YgmQSdYCpu2A=;
        b=mrZyuN6M3fCzqtyEN3bWHjE8KLgI1FJwIBzGp7EQHcVXNV0Mi+EqEOMQyyO1KBn5CK
         r0y/ykGBaePDo3OGq7/u5QI5Fy+Sv1jQfQiWiDF+TRi6G02wpIP58ZOSV72EWG6RF60h
         pTy2CZVS2IKQlQo1gIkaBZwSVY5T8LfD968arONdkiNDVD8LZLXe174cunN1SbNxBlIr
         y9zyXHY7cH9vzYcwlym9yr3clqp+lfW5UAu6c7DtSY7d3v7oymNGxdmlfX0iSACb3FQS
         Mwy8PzIEefyUBt85aYqIiy1Z0SkkXXdR1Ea7pA/mN0UQtLrQhm1tER4730A7K+mA/NAs
         ZnEg==
MIME-Version: 1.0
Received: by 10.58.85.164 with SMTP id i4mr1834741vez.29.1343725104120; Tue,
 31 Jul 2012 01:58:24 -0700 (PDT)
Received: by 10.220.63.208 with HTTP; Tue, 31 Jul 2012 01:58:24 -0700 (PDT)
Received: by 10.220.63.208 with HTTP; Tue, 31 Jul 2012 01:58:24 -0700 (PDT)
In-Reply-To: <4d406326-4dc1-4ea0-8ab7-3026f155df42@googlegroups.com>
References: <4d406326-4dc1-4ea0-8ab7-3026f155df42@googlegroups.com>
Date: Tue, 31 Jul 2012 18:58:24 +1000
Message-ID: <CADopz65JcJyD-b-jkFEw-JYs17Qgc1-6q+_=0FPdEd65psS...@mail.gmail.com>
Subject: Re: [cherrypy-users] GET AND POST METHOD
From: Daniel Bryan <danbr...@gmail.com>
To: cherrypy-users@googlegroups.com
Content-Type: multipart/alternative; boundary=047d7bacbf5a81c2f204c61c6170

--047d7bacbf5a81c2f204c61c6170
Content-Type: text/plain; charset=ISO-8859-1

The simplest solution is to look at the value of cherrypy.request.method.

My own use of cherrypy is focused on RESTful web services, so I prefer for
my request handlers to be organised by request method. Some people like
this pattern, others don't. See here:
http://tools.cherrypy.org/wiki/HTTPMethodFiltering
On Jul 31, 2012 6:46 PM, "Nightfury" <amidrayopen...@gmail.com> wrote:

> i have the following code and i want to rebult it using GET method in if
> condition.how can i do this.
>
> class client:
>     def index(self,name=None):
>         if name :
>             ClientObj = Collection()
>             print "name in view",name
>
>             ClientObj.name=name
>             loginBll.createClient(ClientObj)
>
>         return open(os.path.join(MEDIA_DIR, u"clients.html"))
>     index.exposed = True
>
> --
> You received this message because you are subscribed to the Google Groups
> "cherrypy-users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/cherrypy-users/-/sO1rVBKgAYQJ.
> To post to this group, send email to cherrypy-users@googlegroups.com.
> To unsubscribe from this group, send email to
> cherrypy-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/cherrypy-users?hl=en.
>

--047d7bacbf5a81c2f204c61c6170
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<p>The simplest solution is to look at the value of cherrypy.request.method=
.</p>
<p>My own use of cherrypy is focused on RESTful web services, so I prefer f=
or my request handlers to be organised by request method. Some people like =
this pattern, others don&#39;t. See here: <a href=3D"http://tools.cherrypy.=
org/wiki/HTTPMethodFiltering">http://tools.cherrypy.org/wiki/HTTPMethodFilt=
ering</a></p>

<div class=3D"gmail_quote">On Jul 31, 2012 6:46 PM, &quot;Nightfury&quot; &=
lt;<a href=3D"mailto:amidrayopen...@gmail.com">amidrayopen...@gmail.com</a>=
&gt; wrote:<br type=3D"attribution"><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
i have the following code and i want to rebult it using GET method in if co=
ndition.how can i do this.<br><br>class client:<br>=A0=A0=A0 def index(self=
,name=3DNone):<br>=A0=A0=A0=A0=A0=A0=A0 if name :<br>=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0 ClientObj =3D Collection()<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 print &quot;name in view&quot;,name<br>=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Cli=
entObj.name=3Dname<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 loginBll.createClie=
nt(ClientObj)<br>=A0=A0=A0=A0=A0=A0=A0 <br>=A0=A0=A0=A0=A0=A0=A0 return ope=
n(os.path.join(MEDIA_DIR, u&quot;clients.html&quot;))<br>
=A0=A0=A0 index.exposed =3D True<br>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;cherrypy-users&quot; group.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msg/cherrypy-users/-/sO1rVBKgAYQJ" target=3D"_blank">https://groups.go=
ogle.com/d/msg/cherrypy-users/-/sO1rVBKgAYQJ</a>.<br>=20
To post to this group, send email to <a href=3D"mailto:cherrypy-users@googl=
egroups.com" target=3D"_blank">cherrypy-users@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to <a href=3D"mailto:cherrypy-us=
ers%2Bunsubscribe@googlegroups.com" target=3D"_blank">cherrypy-users+unsubs=
cribe@googlegroups.com</a>.<br>

For more options, visit this group at <a href=3D"http://groups.google.com/g=
roup/cherrypy-users?hl=3Den" target=3D"_blank">http://groups.google.com/gro=
up/cherrypy-users?hl=3Den</a>.<br>


</blockquote></div>

--047d7bacbf5a81c2f204c61c6170--