Re: [web2py] Re: upgrading appengine has broken web2py

2013-07-12 Thread Carl Roach
that's great to know! that's probably why Web2py didn't break for you but did for me... it broke GAE memcache. thanks for getting back to me. On 12 July 2013 18:26, Christian Foster Howes cfho...@gmail.com wrote: I'm storing session in the database given the large number of active users i

Re: [web2py] Re: upgrading appengine has broken web2py

2013-06-18 Thread Carl Roach
hi Massimo, What would be the implications of removing the gql modulefrom Web2py? On 12 April 2013 16:17, Massimo Di Pierro massimo.dipie...@gmail.comwrote: I proposed in web2py 2.5 we remove the gql module. On Friday, 12 April 2013 05:21:10 UTC-5, Carl wrote: Removing the line from

Re: [web2py] Re: upgrading appengine has broken web2py

2013-06-18 Thread Carl Roach
thanks C perhaps I can also change my web2py code to get the app running. M has been making changes in trunk to remove the gql.py. this might address my issue too. I tried trunk but got a bunch of unresolved imports from Eclipse. On 18 June 2013 14:20, Christian Foster Howes cfho...@gmail.com

Re: [web2py] Passing a JSON to a Web2py-based server. What am I missing?

2013-06-10 Thread Carl Roach
JSON isn't Python :) Of course single quotes was the issue! I've now got data from my Java GWT client app. I'm using JSON because JavaScript luvs JSON and GWT overlays makes handling such data very straightforward. On Monday, 10 June 2013, Niphlod wrote: uhm. web2py handles usual encoded

Re: [web2py] Re: where is the json data when using GWT's RequestBuilder() ?

2013-06-07 Thread Carl Roach
thanks. both request.vars and response.body.read() are empty. I'm calling my function: http://127.0.0.1:8000/init/default/call.jsp I think it must be something in my Java GWT app that's not setting something for Web2py to identify that there is json data. On 7 June 2013 20:16, Niphlod

Re: [web2py] Re: Can I use Requests in a GAE Web2py project?

2013-05-30 Thread Carl Roach
thanks for the pointer. urllib3 has been ported to GAE (requests uses urllib so that's one worry off the list) but requests uses some file-system calls (and GAE doesn't support file systems). I'll take a look and see if the library has been taken further for GAE. according to

Re: [web2py] Re: HTTP status codes

2013-05-01 Thread Carl Roach
thanks Leonel, I'm refactoring server calls at the mo, but I'll try that straight afterwards. On 1 May 2013 15:56, Leonel Câmara leonelcam...@gmail.com wrote: I guess you could add 429 to gluon.http definitions in your model and then use it, but I haven't tried it Something like thin in

Re: [web2py] Re: HTTP status codes

2013-05-01 Thread Carl Roach
ah... the *tyranny of /w* this works... HTTP('429 Too_Many_Requests') In glucon/http.py HTTP regex_status isn't friendly to messages with whitespace (or hyphens) Thanks for pointing me to this. One line simple line beats 5 simple lines! :) On 1 May 2013 16:41, Anthony abasta...@gmail.com

Re: [web2py] Re: HTTP status codes

2013-05-01 Thread Carl Roach
thanks On 1 May 2013 17:48, Anthony abasta...@gmail.com wrote: Oops. Actually, I think this should be fixed -- I'll open an issue. Anthony On Wednesday, May 1, 2013 12:09:17 PM UTC-4, Carl wrote: ah... the *tyranny of /w* this works... HTTP('429 Too_Many_Requests') In glucon/http.py

Re: [web2py] HTTP status codes

2013-05-01 Thread Carl Roach
The existing code makes it possible to raise any 3-digit status code. raise HTTP('xxx Messsage_text') though, see above post, spaces aren't allowed in Message_text in current regex. On Wednesday, 1 May 2013, Anthony wrote: There's more than just one missing --

Re: [web2py] HTTP status codes

2013-05-01 Thread Carl Roach
as str? 2013/5/1 Carl Roach m...@carlroach.com The existing code makes it possible to raise any 3-digit status code. raise HTTP('xxx Messsage_text') though, see above post, spaces aren't allowed in Message_text in current regex. On Wednesday, 1 May 2013, Anthony wrote: There's more

Re: [web2py] Re: upgrading appengine has broken web2py

2013-04-13 Thread Carl Roach
thanks - I'll give them a go. On 13 April 2013 21:51, Christian Foster Howes cfho...@gmail.com wrote: The 2 versions that i have used this week with the latest GAE are: Version 2.0.8 (2012-09-07 03:47:51) stable Version 2.0.9 (2012-09-13 23:51:30) stable cfh On 4/12/13 21:13 , Carl

Re: [web2py] Re: upgrading appengine has broken web2py

2013-04-12 Thread Carl Roach
Perhaps 2.5 isn't far away given 2.4.6 is out. I'll be happy to a version of web2py with it removed. On 12 April 2013 16:17, Massimo Di Pierro massimo.dipie...@gmail.comwrote: I proposed in web2py 2.5 we remove the gql module. On Friday, 12 April 2013 05:21:10 UTC-5, Carl wrote: Removing

Re: [web2py] Re: upgrading appengine has broken web2py

2013-04-12 Thread Carl Roach
What version are you using Christian? On 12 Apr 2013 23:34, Christian Foster Howes cfho...@gmail.com wrote: i'm not having any problems with GAE + web2py.though i'm not fully upgraded on my web2py versions...perhaps i should do a test upgrade and see if i hit the same issues. On Friday,

Re: [web2py] Re: GWT, CSS and Web2Py

2012-10-29 Thread Carl Roach
Coming from Pyjamas I lifted its approach to build a Web2py View HTML file. My question was: does anyone manage the CSS of their Web2py server pages and their GWT client app together? And I was going to follow-up with: What issues did they have to overcome? Are they using CSS variables between the

Re: [web2py] Re: GWT, CSS and Web2Py

2012-10-28 Thread Carl Roach
I've not read that claim while using Pyjamas. Do you have a reference to make your money back claim :) On 28 Oct 2012, at 09:21, Joe Barnhart joe.barnh...@gmail.com wrote: Hi Carl -- That is surprising. I don't know much about pyjs or GWT for that matter, but from what I had read the

Re: [web2py] Re: GWT, CSS and Web2Py

2012-10-28 Thread Carl Roach
That's, as you've pointed out, comparing source code. I was comparing their respective JavaScript output. The number of lines of Java I've written using GWT will be more than the lines of Python I'd written using Pyjamas. But the JavaScript that GWT generates is far smaller than that produced

Re: [web2py] Re: GWT, CSS and Web2Py

2012-10-27 Thread Carl Roach
thanks for taking the time to reply Joe. I've written quite a lot of code using Pyjamas and really enjoyed it. But the application size grows quickly making support of mobile platforms impractical. I switched to GWT (and GWTP) to reduce my application size. GWT delivers so many advantages that

Re: [web2py] how do I pass multiple variables in a Storage object to a function expecting named parameters?

2012-09-18 Thread Carl Roach
I appreciate the input Anthony. On 18 September 2012 00:37, Anthony abasta...@gmail.com wrote: Sorry, when I replied I only saw Bruno's first reply. I like his option #3 as well. Anthony On Monday, September 17, 2012 3:06:51 PM UTC-4, Carl wrote: Great idea. But if I use Bruno option #3

Re: [web2py] how do I pass multiple variables in a Storage object to a function expecting named parameters?

2012-09-17 Thread Carl Roach
thanks Bruno for the quick reply. blastoff() was only an example function; note that request.args[0] can contain other function names. so, rather than x = *_*blastoff(**request.vars) how can I use the value in request.args[0] in each call? ie... I'm writing a dispatch function that will call

Re: [web2py] how do I pass multiple variables in a Storage object to a function expecting named parameters?

2012-09-17 Thread Carl Roach
Thanks Bruno - I've got it too! thanks for your help. On 17 Sep 2012, at 19:05, Bruno Rocha rochacbr...@gmail.com wrote: Now I got it... I can see 3 ways.. but that is not so safe to do it... option 1 def dispatcher(): def blastoff(param1, param2): return something

Re: [web2py] how do I pass multiple variables in a Storage object to a function expecting named parameters?

2012-09-17 Thread Carl Roach
Great idea. But if I use Bruno option #3 and avoid adding other functions to the module I won't have to repeat myself. On Monday, 17 September 2012, Anthony wrote: Maybe make a dictionary of functions, then map request.args(0) to the dictionary keys to identify the right function to call

Re: [web2py] Re: LinkedIn Integration - my step by step tutorial

2012-08-16 Thread Carl Roach
I haven't integrated this LinkedIn with GAE just yet. I'll see if I get the same exception when I do. On 16 Aug 2012, at 11:45, Alec Taylor alec.tayl...@gmail.com wrote: I for one couldn't get the session variable to work properly, and received an error (see:

Re: [web2py] Re: LinkedIn Integration - my step by step tutorial

2012-08-16 Thread Carl Roach
and on Red Hat's server (Apache), but both give me that same error. On Thu, Aug 16, 2012 at 8:48 PM, Carl Roach m...@carlroach.com wrote: I haven't integrated this LinkedIn with GAE just yet. I'll see if I get the same exception when I do. On 16 Aug 2012, at 11:45, Alec Taylor alec.tayl

Re: [web2py] Is anyone using GWT?

2012-06-07 Thread Carl Roach
Larry, I really enjoyed coding in Pyjs. GWT/Java involves a lot of hoops which I'm jumping through. I'm looking at porting my Pyjs app to GWT. On 7 June 2012 17:29, Larry Wapnitsky wrote: I'm slowly learning the PyJS/Pyjamas libraries, so I'll say yes for me On Thursday, June 7, 2012

Re: [web2py] Returning JSON data to a GWT client app

2012-04-02 Thread Carl Roach
thanks Michele alas that change returns invalid view (default/stockPrices.html) presumably because there is no view or no view with prices defined. I'm looking for something that allows my existing Pyjamas app and new GWT app to call the same functions. That gives me a good way to test the new

Re: [web2py] Returning JSON data to a GWT client app

2012-04-02 Thread Carl Roach
yes... I've been using @service.json and my Pyjamas app can call such decorated and retrieve json-formatted data. all I need to do is return {'tag1', data1', 'tag2', data2} I now want to know how I can get a GWT app to call the same function. Anyone using GWT with Web2py? On 2 April 2012 11:34,

Re: [web2py] what other tools do you use with web2py

2011-09-11 Thread Carl Roach
The AJAX is the only 'bit' that is Web2py specific. Your mental model will need to shift to writing an application in Pyjamas rather than writing web pages. That applications, thru ajax can communicate with your Web2py instance. On 11 September 2011 11:52, Richard Dijkstra

Re: [web2py] what other tools do you use with web2py

2011-09-11 Thread Carl Roach
...@planet.nlwrote: Carl, Thank for the conceptual advise. Besides the examples is also a tutorial for pyjama - web2py available. Op 11 sep 2011, om 12:55 heeft Carl Roach het volgende geschreven: Or a brief pyjama-w2p cookbook recipe like: - create database - create webpage thru pyjama - connect

Re: [web2py] what other tools do you use with web2py

2011-09-11 Thread Carl Roach
and when you need to take a break try this app written in Pyjamas... http://pymines.appspot.com/ On 11 September 2011 12:43, Carl Roach m...@carlroach.com wrote: you might try asking for help here: http://www.linkedin.com/groups?gid=3634078trk=hb_side_g otherwise... work through the example

Re: [web2py] Re: gluon/contrib/simplejson/encoder.py changes

2011-07-20 Thread Carl Roach
excellent. I'm using @service.jsonrpc as a decorator to controller functions and setting service=Service(globals()) in db.py what needs to change to move to the new approach? p.s. the 3rd edition hardcopy arrived last week... my, how it's grown! excellent production! On 20 July 2011 18:20,

Re: [web2py] Re: Recurly with web2py

2011-07-15 Thread Carl Roach
I'll be needing that erratum :) In the meantime happy to support Massimo with the purchase On 15 Jul 2011, at 09:28, cjrh caleb.hatti...@gmail.com wrote: On Thursday, July 14, 2011 6:00:29 PM UTC+2, Carl wrote: separately... had my head down when the 3rd edition of the Web2py book came

Re: [web2py] Re: XSRF attacks

2011-07-15 Thread Carl Roach
that's excellent news (and thanks for those links). if I'm defining the HTML of a form in a file in my views/ directory how do I leverage this gatekeeper? On 15 July 2011 15:49, Anthony abasta...@gmail.com wrote: web2py already uses the second method mentioned, as long as you call

Re: [web2py] Re: XSRF attacks

2011-07-15 Thread Carl Roach
and relately... I'm using Web2py JSON api. is my site protected out of the box or do I need to pass parameters in a particular manner? On 15 July 2011 15:53, Carl Roach m...@carlroach.com wrote: that's excellent news (and thanks for those links). if I'm defining the HTML of a form in a file

Re: [web2py] Re: XSRF attacks

2011-07-15 Thread Carl Roach
that is *so* cool. thanks Anthony. I've modify my controller code to create a form and call accepts(): form = FORM(TEXTAREA(_name='message'), INPUT(_name='email')) if form.accepts(request.vars, session): etc and return the form so it's passed to my view My view is still hand-coded HTML but now

Re: [web2py] Re: how to use contrib/login_methods/linkedin_account.py

2011-07-14 Thread Carl Roach
Using web2py's sample classes as a reference and a lot of code written by Ozgur Vatansever I have written code to OAuth into LinkedIn (built on gluon.contrib.login_methods.oauth10a_account) This enables access to a contact's name, job title, photo company as well as details about their

Re: [web2py] Re: admin complains at encoder

2011-07-10 Thread Carl Roach
cheers. I'll look into it. On 10 Jul 2011, at 17:30, howesc how...@umich.edu wrote: looks to me like admin is posting data as a string, not something with a timetuple() method. don't all form posts come to you as strings and would need to be cast to other types before storing in the DB?

Re: [web2py] Re: How do I apply placeholder text to web2py forms?

2011-06-23 Thread Carl Roach
thanks. feels right to have this data in the view but I can see the advantage of 'declare once' in the model. I agree Anthony, a solution could be baked into web2py as 'label' already has been. html5 is here and adoption is pretty good thanks in large part to webkit. On 23 June 2011 17:04,

Re: [web2py] Re: How do I apply placeholder text to web2py forms?

2011-06-23 Thread Carl Roach
gotcha. something more open-ended. On 23 June 2011 17:29, Anthony abasta...@gmail.com wrote: On Thursday, June 23, 2011 12:19:06 PM UTC-4, Carl wrote: I agree Anthony, a solution could be baked into web2py as 'label' already has been. html5 is here and adoption is pretty good thanks in large

Re: [web2py] Re: Running one-off code when user logins in (using OAuth) for the first time

2011-06-22 Thread Carl Roach
I tried both of those before posting; alas neither are supported by Web2py/OAuth. Perhaps that's a hole? On 22 June 2011 14:37, Anthony abasta...@gmail.com wrote: On Wednesday, June 22, 2011 6:57:14 AM UTC-4, Carl wrote: I need to call a function when a user logins for the first time.

Re: [web2py] Re: how to implement two different login processes?

2011-06-21 Thread Carl Roach
thanks Bruno. My UI requirements are not to give a choice to visiting users so I specifically require the options on different pages. One page won't be indexed by search engines and will be by-invitation only. I'm using the LinkedIn API to access user data from LinkedIn's servers so JanRain isn't

Re: [web2py] Re: acting upon anchor text post login

2011-06-18 Thread Carl Roach
Ah, that's the fact I feared :) I perhaps can pass in parameters as 'args' as a work around and create the _next hyperlink by converting args to anchor text. I'm using browser history management so anchors have to be used 'eventually'. On 18 Jun 2011, at 13:08, Anthony abasta...@gmail.com

Re: [web2py] Re: updating session cookie

2011-06-16 Thread Carl Roach
ah! I'm setting and retrieving the value via json using two @service.jsonrpc functions. Have I found a hole? or should I be adding a little more code within my json setter function? On 16 June 2011 16:57, Massimo Di Pierro massimo.dipie...@gmail.com wrote: That's automatic. If you just do

Re: [web2py] Re: GAE taskqueue with Web2py 1.95.1

2011-06-03 Thread Carl Roach
it was this definition: auth.messages.verify_email = request.env.http_host+str(URL(r=request,c='default',f='user', args=['verify_email']))+'/%(key)s to verify your email' which I had changed from: auth.messages.verify_email = request.env.http_host+URL(r=request,c='default',f='user',

Re: [web2py] Re: GAE taskqueue with Web2py 1.95.1

2011-06-02 Thread Carl Roach
thanks for the feedback. my task is called correctly when I manually Run it from http://localhost:8080/_ah/admin/tasks?queue=default I've given the task a name (to make it unique) using a mixture of a-z0-9- The fact that dev_appserver is failing to call the URL correctly / URL is failing to call

Re: [web2py] Re: GAE taskqueue with Web2py 1.95.1

2011-06-02 Thread Carl Roach
ah ha! a bug in my app's db.py was preventing dev_appserver.py from calling my task url... sensitive chap. these subtly differences between web2py, dev_appserver and GAE are frustrating - I'll be happier when it's all in the cloud :) On 2 June 2011 15:28, Carl Roach m...@carlroach.com wrote

Re: [web2py] Re: How do I check if a user account is blocked/disabled?

2011-05-27 Thread Carl Roach
Thanks. And thanks for .first() On 27 May 2011, at 13:14, Ross Peoples ross.peop...@gmail.com wrote: That is how I do it. As far as I know, setting registration_key to 'disabled' is the only way for web2py to deny a log in for someone using Auth. When I need to set this or check it, I

Re: [web2py] Re: Google GAE Task Queue independence

2011-03-12 Thread Carl Roach
() object. Not very backward compatible, I would say... On Mar 12, 12:48 am, Carl Roach m...@carlroach.com wrote: thanks howesc On 11 Mar 2011, at 23:29, howesc how...@umich.edu wrote: i use taskqueue extensively in my GAE apps. i have not wrapped it in a way that it runs

Re: [web2py] Re: Google GAE Task Queue independence

2011-03-11 Thread Carl Roach
thanks howesc On 11 Mar 2011, at 23:29, howesc how...@umich.edu wrote: i use taskqueue extensively in my GAE apps. i have not wrapped it in a way that it runs in non-gae environment. My usages of the taskqueue are for things that i can't complete in a single 30 second execution time, so

Re: [web2py] Re: how to use cache decorator within modules?

2011-03-01 Thread Carl Roach
thanks Massimo. The ability to have cache decorators in modules would be great. On 1 March 2011 02:09, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Jonathan and I have a plan to make this easy but it will not be in until 1.93 or 1.94. On Feb 28, 3:12 pm, pbreit pbreitenb...@gmail.com

Re: [web2py] Re: Is user in [app]/[controller.py]/user hard-coded into Web2py?

2010-10-15 Thread Carl Roach
I've got authentication working with LinkedIn. But no registration step happens... I would like to add a set of permissions the first time a new user logins in via LinkedIn. For a second type of user I offer a registration page to get email/password and then add a different set of permissions.

Re: [web2py] Re: Is user in [app]/[controller.py]/user hard-coded into Web2py?

2010-10-15 Thread Carl Roach
a registration process. 6) my auth_user table also a boolean manager field that defaults to false. 7) I use appadmin to promote users to managers On Oct 15, 6:40 pm, Carl Roach carl.ro...@gmail.com wrote: I've got authentication working with LinkedIn. But no registration step happens... I would like

Re: [web2py] Re: almost have linkedin oauth working within web2py application. just need one more push

2010-10-09 Thread Carl Roach
://code.google.com/r/michelecomitini-facebookaccess/source/browse/#hg/applications/helloTwitter I will put the linkedin example online soon... mic 2010/10/9 Carl Roach carl.ro...@gmail.com: Thanks M. I'll look into that but I will need full access to LinkedIn (name, company, contacts

Re: [web2py] Re: almost have linkedin oauth working within web2py application. just need one more push

2010-10-08 Thread Carl Roach
Thanks M. I'll look into that but I will need full access to LinkedIn (name, company, contacts) I'm nearly there it's just the vague error message that had me stumped :) On 9 Oct 2010, at 04:18, mdipierro mdipie...@cs.depaul.edu wrote: If you only need authentication you may want to consider

Re: [web2py] Re: upgrade from 1.84.4 to 1.85.1 fails operations into datastore in sqlite but not GAE

2010-09-20 Thread Carl Roach
Will do On 20 Sep 2010, at 14:35, mdipierro mdipie...@cs.depaul.edu wrote: Can you please try trunk? On Sep 20, 8:09 am, Carl carl.ro...@gmail.com wrote: It took a bit of binary upgrading to pin down this issue but I#ve found that it's between 1.84.4 and 1.85.1 However since 1.85.1

Re: [web2py] Re: applying multiple decorators in a/c/default.py

2010-05-07 Thread Carl Roach
Excellent... thanks On 7 May 2010, at 15:32, mdipierro mdipie...@cs.depaul.edu wrote: You cannot do this: @auth.requires_login() @service.jsonrpc def add_team(name, cap): #function uses auth.user.id but you can do @service.jsonrpc def add_team(name, cap): #function uses

Re: [web2py] Re: Web2py LinkedIn/OAuth and dev_appserver too

2010-03-25 Thread Carl Roach
Cheers! Will do. On 25 Mar 2010, at 18:19, mdipierro mdipie...@cs.depaul.edu wrote: It is possible linkedin.py uses some API that is not supported by GAE. I did not try. In any case make sure you have latest dev_appserver since httplib (used by linkedin) was not supported in early versions.

Re: [web2py] Re: storing a Python list

2010-03-01 Thread Carl Roach
thanks M; I'll delve deeper On 1 Mar 2010, at 19:07, mdipierro mdipie...@cs.depaul.edu wrote: This should work. I just tried it again and works for me. Something else is the problem. Can you show me a piece of code that exhibt the problem and your complete traceback? On Mar 1, 12:59 pm,

Re: [web2py] Re: storing a Python list

2010-02-23 Thread Carl Roach
thanks Richard On 23 Feb 2010, at 23:48, Richard richar...@gmail.com wrote: if you are on GAE then you can simply use: from gluon.contrib.gql import gae Field('name', gae.StringListProperty()) On Feb 18, 2:47 am, Carl carl.ro...@gmail.com wrote: I have a Python list that I want to store

Re: [web2py] Re: Auth on GAE silently fails to login

2010-01-19 Thread Carl Roach
Will do. On 19 Jan 2010, at 22:16, mdipierro mdipie...@cs.depaul.edu wrote: I guess it is not upgrading the file. Let us know when you find out the solution to the problem. On Jan 19, 12:55 pm, Carl carl.ro...@gmail.com wrote: Looks like a GAE quirk! I have 1.74.6 and it has the line 425.