Re: [web2py] Re: Login to web2py from external script

2015-01-14 Thread Niphlod
On Wednesday, January 14, 2015 at 1:27:59 AM UTC+1, Richard Penman wrote: > > > http is stateless > > do you mean because the decoding is handled at the server layer before > reaches web2py? > > I mean that web2py doesn't store anywhere how to send the data in. As long as it's valid, it's par

Re: [web2py] Re: Login to web2py from external script

2015-01-13 Thread Richard Baron Penman
> http is stateless do you mean because the decoding is handled at the server layer before reaches web2py? On Tue, Jan 13, 2015 at 6:04 PM, Niphlod wrote: > http is stateless. > > > On Tuesday, January 13, 2015 at 6:12:27 AM UTC+1, Richard Penman wrote: >> >> Yeah same data of course, but differ

Re: [web2py] Re: Login to web2py from external script

2015-01-13 Thread Jim S
Is there a 'how-to' anywhere that shows how to do this? I'd really like to see this as a topic in Chapter 14: Other Recipes in the book. Is it somewhere else where I've missed it? -Jim On Tuesday, January 13, 2015 at 9:30:54 AM UTC-6, Richard Penman wrote: > > and web2py is not > > On Tue,

Re: [web2py] Re: Login to web2py from external script

2015-01-13 Thread Richard Baron Penman
and web2py is not On Tue, Jan 13, 2015 at 6:04 PM, Niphlod wrote: > http is stateless. > > > On Tuesday, January 13, 2015 at 6:12:27 AM UTC+1, Richard Penman wrote: >> >> Yeah same data of course, but different encoding than form specifies so I >> expected back end to reject it. >> >> why it shou

Re: [web2py] Re: Login to web2py from external script

2015-01-13 Thread Niphlod
http is stateless. On Tuesday, January 13, 2015 at 6:12:27 AM UTC+1, Richard Penman wrote: > > Yeah same data of course, but different encoding than form specifies so I > expected back end to reject it. > why it shouldn't be ? it's just different encodings to send the same > data over the wire

Re: [web2py] Re: Login to web2py from external script

2015-01-12 Thread Richard Baron Penman
Yeah same data of course, but different encoding than form specifies so I expected back end to reject it. why it shouldn't be ? it's just different encodings to send the same data over the wire. On Monday, January 12, 2015 at 3:36:12 AM UTC+1, Richard Penman wrote: > > Strangely I found that the

[web2py] Re: Login to web2py from external script

2015-01-12 Thread Niphlod
why it shouldn't be ? it's just different encodings to send the same data over the wire. On Monday, January 12, 2015 at 3:36:12 AM UTC+1, Richard Penman wrote: > > Strangely I found that the login forms works even when encode the data as > usual for application/x-www-form-urlencoded: > > cj = co

[web2py] Re: Login to web2py from external script

2015-01-11 Thread Richard Penman
Strangely I found that the login forms works even when encode the data as usual for application/x-www-form-urlencoded: cj = cookielib.CookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) html = opener.open(login_url).read() formkey = xpath.get(html, '//input[@name="_formkey