Hello everyone, I'm using Flask to make simple RESTful views, and I'm dubious about how to make HTTP requests using the PUT method. Does anybody here know how can I submit a form with the PUT method? I've tried the "Rails method", putting a hidden field called _method in the form, but it didn't work. Thanks, Francisco Souza Software developer at Giran and also full time Open source evangelist at full time English: http://www.franciscosouza.net Portuguese: http://www.franciscosouza.com.br Twitter: @franciscosouza +55 27 3026 0264
Hi, On 8/14/10 3:02 PM, Francisco Souza wrote: > Hello everyone, > I'm using Flask to make simple RESTful views, and I'm dubious about how > to make HTTP requests using the PUT method. Does anybody here know how > can I submit a form with the PUT method? I recommend this snippet here. This operates on the WSGI layer and as such probably a little bit cleaner: http://flask.pocoo.org/snippets/38/ Regards, Armin
Hello everyone,
I'm using Flask to make a flash player,these is a part of tmy
templates codes:
<div>
<h2>player</h2>
<a
href="http://e1h13.simplecdn.net/flowplayer/flowplayer.flv"
style="display:block;width:550px;height:330px"
id="player">
</a>
<script language="JavaScript">
flowplayer("player", "static/flash/flowplayer-3.2.2.swf");
</script>
</div>
the problem is the video can not load in my flash player.
It's my mistake?
Yes, any error that would occur there is occurring purely in your HTML. Kenneth Reitz http://kennethreitz.com/contact-me On Aug 14, 2010, at 10:30 AM, leoomo wrote: > Hello everyone, > I'm using Flask to make a flash player,these is a part of tmy > templates codes: > > <div> > <h2>player</h2> > <a > href="http://e1h13.simplecdn.net/flowplayer/flowplayer.flv" > style="display:block;width:550px;height:330px" > id="player"> > </a> > > <script language="JavaScript"> > flowplayer("player", "static/flash/flowplayer-3.2.2.swf"); > > </script> > > </div> > > > the problem is the video can not load in my flash player. > It's my mistake? > >
Le 14/08/2010 15:02, Francisco Souza a écrit : > Hello everyone, > I'm using Flask to make simple RESTful views, and I'm dubious about > how to make HTTP requests using the PUT method. Does anybody here know > how can I submit a form with the PUT method? > > I've tried the "Rails method", putting a hidden field called _method > in the form, but it didn't work. Hi, Try this ? http://flask.pocoo.org/snippets/1/ Sincerely, -- Simon Sapin
> > On Sat, Aug 14, 2010 at 11:22 AM, Simon Sapin <simon.sapin@exyr.org>wrote: > Le 14/08/2010 15:02, Francisco Souza a écrit : > > Hi, > > Try this ? http://flask.pocoo.org/snippets/1/ > Great :) It works and changed the request method, but my view didn't work, I still get the 405 - Method Not Allowed error message, with the description "The method PUT is not allowed for the requested URL." My view definition is here: http://gist.github.com/524355 I think that snippet doesn't work with the newer Flask version. Thanks, Francisco Souza Software developer at Giran and also full time Open source evangelist at full time English: http://www.franciscosouza.net Portuguese: http://www.franciscosouza.com.br Twitter: @franciscosouza +55 27 3026 0264 On Sat, Aug 14, 2010 at 11:22 AM, Simon Sapin <simon.sapin@exyr.org> wrote: > Le 14/08/2010 15:02, Francisco Souza a écrit : > > Hello everyone, > > I'm using Flask to make simple RESTful views, and I'm dubious about > > how to make HTTP requests using the PUT method. Does anybody here know > > how can I submit a form with the PUT method? > > > > I've tried the "Rails method", putting a hidden field called _method > > in the form, but it didn't work. > > Hi, > > Try this ? http://flask.pocoo.org/snippets/1/ > > Sincerely, > -- > Simon Sapin >