Re: [web2py] Re: GAE Task Queue no longer passes payload to web2py function

2019-05-28 Thread Carl Hunter Roach
Thanks Dave. I’m thinking it must be something of that order too. Time to rebuild this project’s yank file. Carl Hunter Roach Bisham Barn Owl Group Middle Thames Conservation Trust Runnymede Ringing Group Founder, Midnight 30 Ltd midnight30.com Makers of Great Careers

[web2py] Re: GAE Task Queue no longer passes payload to web2py function

2019-05-28 Thread Carl Hunter Roach
31c3ed9930> That is weird. For the payload of the Google task I'm passing in some json data. I can't see where an fdopen value would be coming from. On Friday, 24 May 2019 21:37:53 UTC+1, Dave S wrote: > > > > On Friday, May 24, 2019 at 3:43:26 AM UTC-7, Carl Hunter Roach

[web2py] Re: GAE Task Queue no longer passes payload to web2py function

2019-05-24 Thread Carl Hunter Roach
Thanks for responding dps. Having found the issue arrive with the R-2.15.0b2 release I did try the latest 2.18x line. But that too was broken so I went back to R-2.14.6 But then last week the issue started to occur (I hadn’t pushed any code so this change is hard to explain, to say the least).

Re: [web2py] Re: retrieving json field from db (GAE)

2019-03-04 Thread Carl Hunter Roach
hould have posted to pydal instead. Apologies for that. On Sun, 3 Mar 2019 at 08:09, Massimo Di Pierro wrote: > if we broke this, it was not intentional. Please open a ticket about this > so we can track it. It will be fixed asap > > On Friday, 1 March 2019 04:17:44 UTC-8, Carl Hunter Roac

Re: [web2py] Re: update finds previous error in function definition

2019-03-03 Thread Carl Hunter Roach
I've added this as an issue. https://github.com/web2py/web2py/issues/2122 On Sun, 3 Mar 2019 at 08:05, Massimo Di Pierro wrote: > Can you please open a ticket about this? > > On Friday, 1 March 2019 04:07:28 UTC-8, Carl Hunter Roach wrote: >> >> I've been re

Re: [web2py] Re: 2.18.1 is OUT

2019-02-25 Thread Carl Petersen
Agreed, download link is currently broken. On Monday, February 25, 2019 at 12:38:01 AM UTC-6, Lovedie JC wrote: > > Having trouble with download page: > See attached. > > On Mon, 25 Feb 2019 at 07:57, Alex Glaros > wrote: > >> am on Windows >> >> -- >> Resources: >> - http://web2py.com >> - htt

[web2py] Re: Problem with wsgihandler.py Apache/Python3

2018-12-07 Thread Carl Petersen
if isinstance(body, unicodeT): body = to_bytes(body) return [body] I didn't know whether I should just apply to_bytes(body) like the other returns because the other returns were coded "return [body]" instead of "return body". Thanks On Frida

[web2py] Re: Problem with wsgihandler.py Apache/Python3

2018-12-07 Thread Carl Petersen
Hello, I'm having a similar issue. I'm using Python 3.6.6, mod_wsgi 4.6.5, Apache 2.4.6 with web2py 2.17.2. I can get to the welcome screen, but as soon as I try to access the admin application I get the following on my screen: Internal Server Error The server encountered an internal error o

[web2py] db._adapter.is_numerical_type no longer found

2018-12-04 Thread Carl Petersen
stgrePsyco' object has no attribute 'is_numerical_type' Any assistance would be appreciated. Carl -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- Yo

[web2py] Re: json data breaks, via routing, to a web2py controller

2018-11-05 Thread Carl Hunter Roach
ow what is tripping loads() up. Probably never will :) On Monday, 5 November 2018 07:04:16 UTC, Dave S wrote: > > > > On Sunday, November 4, 2018 at 5:06:33 AM UTC-8, Carl Hunter Roach wrote: >> >> As suspected, my workaround was to URL encode the "offending" fiel

[web2py] Re: json data breaks, via routing, to a web2py controller

2018-11-04 Thread Carl Hunter Roach
hy I've tripped over here. On Saturday, 3 November 2018 19:04:20 UTC, Carl Hunter Roach wrote: > > I've had a stable web2py-based service for some years now. > But it broke today with a small change in a data value - that's my working > hypothesis. > > The out

[web2py] json data breaks, via routing, to a web2py controller

2018-11-03 Thread Carl Hunter Roach
I've had a stable web2py-based service for some years now. But it broke today with a small change in a data value - that's my working hypothesis. The output of the print statement (see code below): The value of "page_cursor" sent by the caller is "page_cursor" : "A2ebAAFVVvv0OW53MHyzU0VWVVBx

[web2py] Re: UPDATE BOOTSTRAP VERSION FROM 3 TO 4

2018-10-05 Thread Carl Petersen
Leonel, could you go into a bit more depth on the changes you had to make in the menu? I would certainly appreciate it. On Wednesday, April 26, 2017 at 8:51:15 AM UTC-5, Leonel Câmara wrote: > > The forms in Boostrap 4 are pretty much the same as in bootstrap 3, you do > need to change some st

[web2py] Re: how to import a package that has deeply nested imports

2017-09-05 Thread Carl Hunter Roach
placing the tlslite directly in applications/appname/modules enables import statements to resolve correctly (just as the manual states! :) I had incorrectly placed it one level lower to group some other files together. On Monday, 4 September 2017 18:28:48 UTC+1, Carl Hunter Roach wrote

[web2py] how to import a package that has deeply nested imports

2017-09-04 Thread Carl Hunter Roach
I'd like to use https://github.com/freshplanet/AppEngine-SocketPool/tree/master/tlslite in a GAE/Web2py project If I place tlslite in my apps `modules` directory I can then add imports such as `from applications.appname.modules.tlslite import ...` but tlslite's python source has many `import`

Re: [web2py] Re: Documenting a file with sphinx, that has local_import in it

2017-08-08 Thread Carl Hunter Roach
ut request and other web2py > environnement objects maybe you can work something base on this workaround > related to IDE : > > > http://web2py.com/books/default/chapter/29/14/other-recipes#Using-general-purpose-IDEs-with-web2py > > On Tue, Aug 8, 2017 at 12:39 PM, Carl Hunter Roa

Re: [web2py] Re: Documenting a file with sphinx, that has local_import in it

2017-08-08 Thread Carl Hunter Roach
nx config files so, perhaps, Sphinx-support has a way to go? On Tue, 8 Aug 2017 at 16:51 Richard Vézina wrote: > I think web2py is sphinx compliant now, I recall that Simone (Niphold) had > refactor docstring to do so... To be confirmed... > > Richard > > On Tue, Aug 8, 2017 at 11:

[web2py] Re: Documenting a file with sphinx, that has local_import in it

2017-08-08 Thread Carl Hunter Roach
Is this still the recommended workaround to get Sphinx to generate documentation for projects built upon Web2py? On Saturday, 28 May 2011 16:18:42 UTC+1, Massimo Di Pierro wrote: > > controllers and models in web2py are written in python but are not > python modules. They use objects > (reque

[web2py] Conditional IS_IN_DB

2017-06-19 Thread Carl Petersen
try code master, but if the code-type field were "PC", then I'd like the source and target codes validated against the GL Profit Center table (ie... IS_IN_DB()). Thanks, Carl -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://gith

Re: [web2py] Re: Caught out by python/web2py syntax

2017-05-16 Thread Carl Hunter Roach
https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/zZ1g2S0ywVs/unsu

[web2py] Caught out by python/web2py syntax

2017-05-16 Thread Carl Hunter Roach
I had (something like) the following code: In db.py a table called "point" In a controller: # points is a list of dicts defining rows in table point for point in points: db.point.insert(**point) The code would disappear inside db.point.insert without throwing an exception. Th

[web2py] How do I make a Web2py threadsafe for GAE?

2017-02-15 Thread Carl Hunter Roach
In my app.yaml file I have: api_version: 1 runtime: python27 threadsafe: true handlers: - url: /_ah/warmup script: applications/myapp/mycontroller/warmup in mycontroller: def warmup(): ''' called by GAE to ready a Jupiter instance '''

[web2py] Re: advice for a GAE warmup function

2017-02-14 Thread Carl Hunter Roach
a typo! GAE (Google App Engine) warmup as document here https://cloud.google.com/appengine/docs/python/warmup-requests/ in a platform-agnostic way. On Thursday, 9 February 2017 14:16:32 UTC, Carl Hunter Roach wrote: > > > Anyone with advice on what to put in a GAW warmup() function

[web2py] advice for a GAE warmup function

2017-02-09 Thread Carl Hunter Roach
Anyone with advice on what to put in a GAW warmup() function (https://cloud.google.com/appengine/docs/python/warmup-requests/configuring) Is there a minimum for a DAL-based Web2py application? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py

[web2py] appropriate to ask for a log call to be removed?

2017-02-07 Thread Carl Hunter Roach
In \gluon\packages\dal\pydal\adapters\google_adapters.py there is a single log output that writes out a number without a context string. More of a debug aid meant to be removed. 554 self.db.logger.info(str(counter)) Is this file part of Web2py or imported, untouched, from another project? C

Re: [web2py] Re: how to access the message parameter of a raise HTTP?

2017-01-19 Thread Carl Hunter Roach
ny wrote: > On Thursday, January 19, 2017 at 4:32:51 AM UTC-5, Carl Hunter Roach wrote: > > thanks. > > I don't like adding UI Text to URLs as it's too easy for 3rd-parties to > generate URls and have your site serve anything they like :) > > > Note, this is

Re: [web2py] Re: how to access the message parameter of a raise HTTP?

2017-01-19 Thread Carl Hunter Roach
n error handler page. That way HTTP remains untouched and it's clearer that I've written an alternative implementation. Has anyone else come across this issue with Web2py's HTTP missing body text? On Wed, 18 Jan 2017 at 23:18 Anthony wrote: > On Wednesday, January 18, 2017

[web2py] how to access the message parameter of a raise HTTP?

2017-01-18 Thread Carl Hunter Roach
To routes.py I have: routes_onerror = [ ('*/400', '/app/controller/error_handler') ] So for a raise HTTP(400, "Explanation Text") and from error_handler() I can get request.vars.code (400, in this example). How can error_hander() get the text "Explanation Text" ? -- Resources: - http://web2py

[web2py] How to set-up function to call via URL on a HTTPS GAE Web2py ?

2017-01-10 Thread Carl Hunter Roach
I have a GAE App built with Web2py. I've added a SSL cert to the GAE App. I have URLS like this: https://mydomain/app/controller/function when function is an undecorated function then all is well and I get back some HTML The problem: When function is decorated with `@myservice.json` and `myserv

[web2py] Using GCD Stackdriver with a Web2py project

2016-12-13 Thread Carl Hunter Roach
I'm using GCD Stackdriver successfully for an App Engine/Web2py-based app. The only files I can't set breakpoints for are my controllers because Stackdriver can't find a Python module. Would it be recommended to add an __init__.py file to the controllers directory? -- Resources: - http://web2

[web2py] For GAE developers. What's missing from a GqlQuery() call?

2016-11-17 Thread Carl Hunter Roach
I have some code running on dev_appserver and on GAE: gqldb.GqlQuery("SELECT DISTINCT acolumnn FROM atable") This used to return values from the database. The database (both locally on GAE) contain appropriate content for acolumn in atable. I think I need entries in index.yaml but dev_appse

[web2py] Re: web2py under GAE: disabling indexes

2016-09-09 Thread Carl Hunter Roach
Did the "custom_qualifier" patch make it into root? I can see it is used in dal/pydal/adapters/google_adapters.py but with any values passed straight through it's not easy to work out what is/isn't supported. On Sunday, 10 March 2013 02:51:11 UTC, Christian Foster Howes wrote: > > Massimo, Scot

[web2py] Deploying Web2py on AWS Mobile Hub

2016-04-13 Thread Carl Hunter Roach
With AWS Mobile Hub supporting Python and deployment zip files for any libraries has anyone taken this route and have AWS Lambda backed by Web2py? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/

[web2py] Multiple upload fields in a SQLFORM.factory

2015-10-28 Thread Carl Petersen
ng_tie_out/upload.html#* Any ideas as to what I'm doing wrong. Please let me know if additional information is needed. Thanks, Carl -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/we

[web2py] Re: Support for GQL DISTINCT

2015-10-26 Thread Carl Hunter Roach
GQL example, 10. Can anyone help? On Monday, 26 October 2015 10:57:53 UTC, Carl Hunter Roach wrote: > > Google slipped in support for DISTINCT in its GQL SELECT in 2013. > > Are there any plans to add this to the DAL? > > Ref: https://cloud.google.com/datastore/docs/apis/gql/

[web2py] Support for GQL DISTINCT

2015-10-26 Thread Carl Hunter Roach
Google slipped in support for DISTINCT in its GQL SELECT in 2013. Are there any plans to add this to the DAL? Ref: https://cloud.google.com/datastore/docs/apis/gql/gql_reference -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] handling None for list:reference

2015-10-13 Thread Carl Hunter Roach
apologies for this question - I see it's been popular over the years - but I can't find the definitive answer. How can I either: a) handle the case of have no references to insert? or b) avoid the duplication of two db inserts that are identical except one is missing a field that can't be set to

[web2py] Re: can validate_and_update_or_insert() be used with Auth on GAE?

2015-10-13 Thread Carl Hunter Roach
password=user.password, field2=user.field2) else: db.auth_user.validate_and_insert( username=user.username, password=user.password, field2=user.field2) On Monday, 12 October 2015 20:08:38 UTC+1, Carl Hunter

[web2py] can validate_and_update_or_insert() be used with Auth on GAE?

2015-10-12 Thread Carl Hunter Roach
I'm trying to use validate_and_update_or_insert() to update/insert users into my auth_user table. user = [ Storage(username="u1", password='p1', field2='field2'), Storage(username="u1", password='p1', field2='field2')] for user in users: res = db(db.auth_user.username==user).validat

[web2py] Re: MSSQLAdapter missing?

2015-05-08 Thread Carl Petersen
least the driver manager is seeing the driver correctly. Is there anything else I can try? Any assistance would be greatly appreciated! Carl On Thursday, May 7, 2015 at 2:22:42 PM UTC-5, Niphlod wrote: > > > > On Thursday, May 7, 2015 at 6:01:17 PM UTC+2, Ron Chatterjee wrote: &

[web2py] Re: MSSQLAdapter missing?

2015-05-07 Thread Carl Petersen
DriverConnect)") I have checked, and the file "libmsodbcsql-11.0.so.2270.0" is located in that directory, and is readable. If I have missed something obvious, my apologies. website maintainer is my part-time hat, and a new one at that! Thanks, Carl On Thursday, May 7, 20

[web2py] MSSQLAdapter missing?

2015-05-07 Thread Carl Petersen
previously using mssql3. Thanks, Carl -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google

[web2py] Re: Error in Eclipse kepler for Web2py source: generics.xml

2015-02-05 Thread Carl Hunter Roach
" as something with valid XML markup >> inside, while web2py's generic.xml is filled with templating functions that >> are NOT static xml. >> >> On Tuesday, January 13, 2015 at 10:38:00 AM UTC+1, Carl Hunter Roach >> wrote: >>> >>> In today&#

[web2py] Re: Error in Eclipse kepler for Web2py source: generics.xml

2015-01-16 Thread Carl Hunter Roach
something with valid XML markup >> inside, while web2py's generic.xml is filled with templating functions that >> are NOT static xml. >> >> On Tuesday, January 13, 2015 at 10:38:00 AM UTC+1, Carl Hunter Roach >> wrote: >>> >>> In today&#

[web2py] Error in Eclipse kepler for Web2py source: generics.xml

2015-01-14 Thread Carl Hunter Roach
In today's Web2py source I get a "" for the contents of applications/x/views/generic.xml with the default content: {{from gluon.serializers import xml}}{{=XML(xml(response._vars,quote=False))}} The error is: Content is not allowed in prolog This error doesn't prevent the application from workin

[web2py] What is the correct parser to use for web2py template HTML files in Eclipse?

2015-01-14 Thread Carl Hunter Roach
Eclipse's standard HTML parser kicks our errors and warnings when validating Web2py HTML template files. e.g., appadmin.html line 66 {{if stop" delimiter. But this is {{embedded}} Python Any tips on what validator to use for such a file that will a) not produce a slew of warnings and the odd

[web2py] Fill a field based on the value from another autocomplete field

2014-11-17 Thread Carl Petersen
So what I'd like to do is once a user makes a selection from the drop down of an autocomplete field (for instance selecting a customer) in a view , I'd like to immediately update the address, city and state fields on the same view. How would I go about that? Thanks, Carl --

[web2py] reference auth_user from a table in one database to the auth_user table in another database

2014-10-23 Thread Carl Petersen
n/dal.py", line 3079, in represent return BaseAdapter.represent(self, obj, fieldtype) File "/opt/web-apps/web2py/gluon/dal.py", line 2016, in represent ftype = self.db[p[0]][p[2]].type File "/opt/web-apps/web2py/gluon/dal.py", line 8512, in __getitem__ retu

[web2py] applications/app/languages

2014-08-05 Thread Carl Hunter Roach
Each file in applications/app/languages has a line: # -*- coding: utf8 -*- I've had to ammend this to: # -*- coding: utf-8 -*- otherwise an exception is thrown in \Python\lib\encodings\utf_8.py (see below). utf-8 is the standard term rather than utf8. My question: does anyone know why all

[web2py] app engine bug? Invalid view reported for app engine but not elsewhere

2014-07-11 Thread Carl Hunter Roach
In my default.py I add a function newview when running locally on 127.0.0.1:8000 all is fine but if I try dev_appserver or GAE then newview runs but on returning my browser displays the error "invalid view (default/newview.html) If I add a new html file all runs fine -- Resources: - http://we

[web2py] update_or_insert - handling record created/modified timestamps

2014-07-11 Thread Carl Hunter Roach
I am using Web2py on an appengine project and each of my tables include two 'datetime' fields cDate and mDate to record when the record was created and modified respectively. Last time I used Web2py I'd check if a record existed and call insert() or update_record() appropriately. Now, I can p

[web2py] importing current - which approach is the latest approach?

2013-11-05 Thread Carl
In one of my apps modules I've used: from gluon import current but for a later app, Eclipse/pydev leads me to use this: from gluon.globals import current Is the latter the recommended approach? Is the former removed? thanks -- Resources: - http://web2py.com - http://web2py.com/book (Document

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

2013-07-12 Thread Carl Roach
ers > i have at anytime and the un-predictable eviction of GAE memcache. > > sorry that's not very helpful. :( > > cfh > > On 7/12/13 7:36 , Carl wrote: > >> Chrtistian... are you using MemcacheClient in your db.py file? >> I've take a copy of the master

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

2013-07-12 Thread Carl
sorry... error in this posting (but not in my code) I currently have session.connect(request, response, db=MEMDB(cache.memcache)) On Friday, 12 July 2013 15:36:35 UTC+1, Carl wrote: > > Chrtistian... are you using MemcacheClient in your db.py file? > I've take a copy of the mast

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

2013-07-12 Thread Carl
sion.connect(request, response, MEMDB(MemcacheClient(request)) On Tuesday, 18 June 2013 14:20:07 UTC+1, Christian Foster Howes wrote: > > Carl, > > i have been working through my web2py upgrade to 2.5.1 + GAE SDK 1.8.1 > upgrade and am not seeing any problems with DAL or

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 wrote: > C

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 wrote: > 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

[web2py] Re: user text contains semi-colons

2013-06-12 Thread Carl
The answer was to pass the data as JSON in an ajax call rather than add parameters to an URL. On Thursday, 6 June 2013 16:37:05 UTC+1, Carl wrote: > > I've a browser app that calls a Web2py server app; it builds up URLs to > pass data. > > Some of that data might be from an

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

2013-06-10 Thread Carl Roach
here: >> >> http://jsonlint.com/ >> >> Also, before using JSON you might want to read the spec. >> http://www.json.org/ >> >> Any reason why you are using JSON? In most cases it's very inefficient. >> I'd recommend CSV or YAML. >>

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

2013-06-10 Thread Carl
I am passing the string {'POST' : 'query POST'} to my Web2py server code. Looking at gluon/main/py and tracing into sj.load(body) at line 225 leads to Python/Lib/json/decoder.py but eventually gets to errmsg(), line 36, with msg = Expecting proper name. doc = [{'POST' : 'qwerty POST'}] pos = 2 e

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

2013-06-07 Thread Carl Roach
lod wrote: > if you're using recent web2py releases, that are able to parse POST vars > encoded in json, you should have them in request.vars as usual. Otherwise, > see response.body.read() > > On Friday, June 7, 2013 5:24:44 PM UTC+2, Carl wrote: >> >> From

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

2013-06-07 Thread Carl
>From a GWT app I'm calling my Web2py server app. String jsonData = "{'example' : 'example data'}"; builder.setHeader("Accept", "application/json"); builder.setHeader("Content-type", "application/json"); builder.setHeader("Content-length", Integer.toString(jsonData.length())); builder.sendRequest(

[web2py] user text contains semi-colons

2013-06-06 Thread Carl
I've a browser app that calls a Web2py server app; it builds up URLs to pass data. Some of that data might be from an end-user and if that data contains a semi-colon it "breaks" web2py's parsing of the URL into args and vars (specifically it breaks the vars parsing) Q1. Any suggestions of the

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

2013-06-05 Thread Carl
, 12 April 2013 23:34:13 UTC+1, Christian Foster Howes 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, April

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

2013-05-29 Thread Carl Roach
ps://github.com/kennethreitz/requests/issues/498 surely there has been some work to adapt requests to GAE. On Wednesday, May 29, 2013 7:05:22 PM UTC+2, Carl wrote: > > I downloaded this pure Python code for using LinkedIn's API - the new API > they launched this year. > > https:/

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

2013-05-29 Thread Carl
I downloaded this pure Python code for using LinkedIn's API - the new API they launched this year. https://github.com/ozgur/python-linkedin Ozgur's code uses https://github.com/kennethreitz/requests Is anyone using "requests" in a Web2py project? Follow-up: anyone using Ozgur's **new** LinkedI

[web2py] using the new LinkedIn authentication API

2013-05-24 Thread Carl
Come July 15th LInkedIn will stop supporting its old/current authentication/data-retrieval API and move to its new, more flexible system. Has anyone already upgraded? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from t

[web2py] Eclipse error but fine at runtime

2013-05-08 Thread Carl
In a module I have the following line: current.response.headers["Content-Type"] = "application/json" Eclipse underlines headers and flags an error "Undefined variable from import:headers" Is there an alternative expression to access .headers so that I can be error free? -- --- You received

Re: [web2py] HTTP status codes

2013-05-01 Thread Carl Roach
> i.e. with the code as int and a description as str? > > > 2013/5/1 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

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 -- > http://www.iana.org/assignme

Re: [web2py] Re: HTTP status codes

2013-05-01 Thread Carl Roach
thanks On 1 May 2013 17:48, Anthony 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(

Re: [web2py] Re: HTTP status codes

2013-05-01 Thread Carl Roach
wrote: > More simply, I think you can also just do this: > > raise HTTP('429 Too Many Requests') > > Anthony > > On Wednesday, May 1, 2013 11:33:14 AM UTC-4, Carl wrote: > >> works sweetly. >> >> from gluon import HTTP >> from gluon.http import d

Re: [web2py] Re: HTTP status codes

2013-05-01 Thread Carl
works sweetly. from gluon import HTTP from gluon.http import defined_status if not(429 in defined_status): defined_status[429] = 'Too Many Requests' raise HTTP(429, "Too Many Requests") On Wednesday, 1 May 2013 15:57:36 UTC+1, Carl wrote: > > thanks Leonel, I

Re: [web2py] Re: HTTP status codes

2013-05-01 Thread Carl Roach
thin in your model > > from gluon import http > > http.defined_status[429] = 'Too Many Request' > > And then in your controllers > > raise HTTP(429) > > Quarta-feira, 1 de Maio de 2013 15:13:05 UTC+1, Carl escreveu: > >> Web2py supports a s

[web2py] HTTP status codes

2013-05-01 Thread Carl
Web2py supports a subset of HTTP status codes as listed here: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes The LinkedIn service I am using employs throttling and I'd like to throw a 429 Too Many Requests exception. Can this status code, along with other missing codes, be added to web2

[web2py] how to send json data to a web2py server

2013-04-23 Thread Carl
I am calling a web2py app from a GWT app. to date I've packed my data into an URL but I'd like to send JSON data instead. when I call http://.../init/default/call.json/update and call is thus: def call(): return service() I trace into service() but find that in tools.py that __call__(self

[web2py] Re: catching server exception in client GWT code

2013-04-16 Thread Carl
are correct. One can add on additional tests again "type" for using alternative exceptions. Downsides: - this approach does place all such exception classes into one file which doesn't keep code splitting streamlined. At least the exception classes are small. - the file has to be edit

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 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

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

2013-04-12 Thread Carl Roach
sues. > > On Friday, April 12, 2013 9:10:10 AM UTC-7, Carl wrote: >> >> 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 wrote: &g

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 wrote: > I proposed in web2py 2.5 we remove the gql module. > > > On Friday, 12 April 2013 05:21:10 UTC-5, Carl wrote: >>

[web2py] dev_appserver session not running completely in 'gae' mode

2013-04-12 Thread Carl
I placed a clean copy of the latest web2py release and added my application to it (init) and linkedin library plus a couple of yaml files. If I run web2py all is fine. But when I run dev_appserver I can the following error when I try to login using LinkedIn. The error doesn't look like a valid r

[web2py] Re: upgrading appengine has broken web2py

2013-04-12 Thread Carl
, response, MEMDB(cache.memcache)) Has this approach become "out of date"? On Friday, 12 April 2013 11:21:10 UTC+1, Carl wrote: > > Removing the line "from gluon.contrib.gql import *" removed the error and > allows my app to launch. > > I next run into this

[web2py] Re: upgrading appengine has broken web2py

2013-04-12 Thread Carl
_create_id id = self._tableobj.incr(shard_id) AttributeError: 'MemcacheClient' object has no attribute 'incr' One for me to investigate. On Friday, 12 April 2013 11:06:38 UTC+1, Carl wrote: > > has my db.py content fallen out of date? > > it includes: > from gluon.sql i

[web2py] Re: upgrading appengine has broken web2py

2013-04-12 Thread Carl
has my db.py content fallen out of date? it includes: from gluon.sql import SQLCustomType if request.env.web2py_runtime_gae: # if running on Google App Engine from gluon.contrib.gql import * db = DAL('gae') On Friday, 12 April 2013 11:00:09 UTC+1, Carl wrote: > >

[web2py] Re: upgrading appengine has broken web2py

2013-04-12 Thread Carl
in custom_importer return NATIVE_IMPORTER(name, globals, locals, fromlist, level) ImportError: No module named gql That's fairly obvious because I've just delete gql.py! :) On Friday, 12 April 2013 07:48:27 UTC+1, Carl wrote: > > If I remove the file (and its .pyc) then I get

[web2py] Re: upgrading appengine has broken web2py

2013-04-11 Thread Carl
If I remove the file (and its .pyc) then I get a web2py "Ticket issued: unknown" I'll try upgrading again. On Friday, 12 April 2013 02:58:27 UTC+1, Massimo Di Pierro wrote: > > What if you delete that file? > > On Thursday, 11 April 2013 12:31:15 UTC-5, Carl wro

[web2py] upgrading appengine has broken web2py

2013-04-11 Thread Carl
With an update to appengine, all is still fine when running web2py locally. but if I run dev_appserver then on start-up I get the following kicked out at the console... File "F:\wp\TestEnvoy\web2py\gluon\contrib\gql.py", line 5, in from gluon.dal import DAL, Field, Table, Query, Set, Expres

[web2py] catching server exception in client GWT code

2013-04-11 Thread Carl
Probably a small # of developers in this situation... I'm using web2py on the server and GWT on the client. I'd like to throw an exception in my web2py server code and catch and handle in in my client GWT code. So far, when I catch an exception, GWT only reports a generic "500" status code whe

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

2012-10-29 Thread Carl Roach
gt; > Joe B. > > > On Sunday, October 28, 2012 12:34:28 PM UTC-7, Carl wrote: >> >> 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 GW

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

2012-10-28 Thread Carl Roach
js application into a series of relatively independent objects > and allows caching for each one independently, which could have an impact on > reload times (depending on your browser cache settings). > > -- Joe B. > > On Sunday, October 28, 2012 2:30:39 AM UTC-7, Carl wrote: >&

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 wrote: > Hi Carl -- > > That is surprising. I don't know much about pyjs or GWT for that matter, but > from what I had read

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

2012-10-27 Thread Carl Roach
choice explicitly in your GWT app. (I'm no GWT expert so this > is about as deep as I go.) > > Joe B. > > > > On Friday, October 26, 2012 3:06:38 AM UTC-7, Carl wrote: >> >> Is anyone using GWT to build clients to work with Web2py server apps? >> >&g

[web2py] GWT, CSS and Web2Py

2012-10-26 Thread Carl
Is anyone using GWT to build clients to work with Web2py server apps? I'm copying my GWT WAR directory into my Web2y's server's STATIC directory but what's the best way to manage GWT's CSS file? --

[web2py] Re: while loop with multiple results

2012-10-13 Thread Carl
If the first or second name contains an "is" you're not going to get the desired substrings. --

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 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 id

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

2012-09-17 Thread Carl Roach
ight function to call (that way if someone > tampers with the URL, they can't call any function that's not in the > dictionary). > > Anthony > > On Monday, September 17, 2012 1:33:26 PM UTC-4, Carl wrote: >> >> I've got a request object coming to my

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 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 > def foo(param

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

2012-09-17 Thread Carl Roach
whatever > > def blastoff(): > try: > x = *_*blastoff(**request.vars) > except Exception: > x = "error calling function, vars not passed or vars is wrong" > return dict(x=x) > > > > On Mon, Sep 17, 2012 at 2:33 PM, Carl wrote: > >

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

2012-09-17 Thread Carl
I've got a request object coming to my Web2py app's controller function. request.args[0] is another function name e.g., blastoff request.vars are parameters e.g., Storage object: {'seconds':10, 'confirm' : 'okay'} how can I call blastoff with the parameters such that I can write blastoff as...

[web2py] Adding LinkedIn authentication as an option to existing username/password authentication

2012-08-17 Thread Carl
Big hat tip to: Udi Milo These steps will enable a Web2py app that currently authenticates users using username/password (or email.password) to add the option for users to use their LinkedIn account instead. Once logged in, the app can access the LinkedIn API to access user LinkedIn data. *1.

  1   2   3   4   5   >