[web2py:23408] Documentation issue with Services

2009-06-06 Thread David Watson
Hi, in the services section on this page: http://www.web2py.com/examples/default/tools I believe the intent of the example is actually something closer to the following: def myfunction(a,b): return int(a)+int(b) As it stands, when called with the parameters encoded as demonstrated: http:/

[web2py:26634] Re: Authentication for services

2009-07-16 Thread David Watson
I'm using web2py 1.65.5 with google app engine. I've run into a problem with request.args in relation to my json calls: @service.json def json_read_nologin(): return request.args[0] or the same function defined sans the service decorator, both work fine, as long as I don't pass something co

[web2py:26635] Authentication against a web2py hosted json function from python client

2009-07-16 Thread David Watson
Hi, I'm trying to get authentication working for a python client talking to a web2py json function. I'm using the @auth.requires_login() decorator but I can't seem to get a successful login (works fine from the user login web page). I'm using client code copied directly from the last example on t

[web2py:26651] Re: Authentication against a web2py hosted json function from python client

2009-07-16 Thread David Watson
basic auth client encoding that I referenced? Thanks, David On Jul 16, 5:54 am, Fran wrote: > On Jul 16, 8:18 am, David Watson wrote: > > > I'm trying to get authentication working for a python client talking > > to a web2py json function. I'm using the @auth.requires

[web2py:26652] Re: Authentication for services

2009-07-16 Thread David Watson
re, since I have no idea what args   > > consumers are assuming for validation. But it does seem reasonable in   > > the abstract to allow a little more than this pattern permits. > > > (And I could see piggybacking on the IS_HTTP_URL validator for the   > > first cut.) &g

[web2py:26754] Re: Authentication against a web2py hosted json function from python client

2009-07-17 Thread David Watson
Thanks so much for the help. I use json for some other functions, but that was not a requirement here so I just hit it with a hammer and switched to xmlrpc. I didn't realize that you could use the service proxy like that for json though, so that was a very useful exercise. -d On Jul 16, 11:48 am

[web2py:27344] problem with web2py changing default application from init to welcome while it's running?

2009-07-24 Thread David Watson
Hi, I am running tip of the trunk from svn. I have my application in init and deleted the welcome application. I am running on ubuntu server 9.04 on a single core pentium 4. I start web2py with: sudo nohup python web2py.py -p 80 -i 192.168.1.40 -a whatever Everything is fine and the pages are s

[web2py:27497] Re: problem with web2py changing default application from init to welcome while it's running?

2009-07-28 Thread David Watson
      redirect(html.URL(r=request))   # and go   > > >> there > > > >> This is the default sequence:  of no 'a' (app) specified, then   > > >> start with init, and if it fails, then go to 'welcome' > > > >> Make sense now? &

[web2py:27499] Re: problem with web2py changing default application from init to welcome while it's running?

2009-07-28 Thread David Watson
Also, there's only one web2py process as yarko had asked. On Jul 28, 10:07 am, David Watson wrote: > Thanks for all the responses. > > I'm not doing os.chdir in my code. > > What happens is this: > > I launch from an ssh session to my ubuntu 9.04 server machine:

[web2py:27720] problem with web2py, gae, and taskqueue

2009-07-31 Thread David Watson
Has anybody had any luck getting the taskqueue from google app engine to work in web2py? I presume that it should work under dev_appserver, but isn't working for me. I defined a simple default controller based on the gae example at the google blog: def process_post_file(): rows=db(db.files.p

[web2py:28654] Re: problem with web2py, gae, and taskqueue

2009-08-14 Thread David Watson
t; (simplified for this example): > > > > def call(): > > >     return service() > > > > @service.run      ## we'll use this to enable this as a taskqueue- > > > friendly URL > > > def taskfunction(): > > >     """ > > >    For s

[web2py:29880] the book 2nd ed. - is there any option but lulu?

2009-09-02 Thread David Watson
Hi, I tried to buy the book this morning on lulu. What a nightmare. Started in safari 4.03 on OS X, couldn't get logged in or registered, generally came back with blank pages. Tried it in FF 3.5. Same thing. I even tried Chrome, which went so far as to report connection error 102 at the same poin

[web2py:29915] Re: the book 2nd ed. - is there any option but lulu?

2009-09-02 Thread David Watson
On Sep 2, 2:08 pm, Yarko Tymciurak wrote: > I am able to login to Lulu; are you running behind a firewall, or with some > network security that would prevent a secure (https) connection? That is > required for login. Nope. I have lots of ssh, ssl, and htttps connections going all the time. --

[web2py] couchdb sample: AttributeError: 'Server' object has no attribute 'commit'

2011-01-05 Thread David Watson
Hello, I am running CouchDBX 1.0.1 on Mac OS X 10.6 with couchdb-python version 0.8. I am using the following code in db.py: db=DAL('couchdb://127.0.0.1:5984') db.define_table('person',Field('name')) id=db.person.insert(name='Jim') print id row=db.person(id) print row

[web2py] Re: couchdb sample: AttributeError: 'Server' object has no attribute 'commit'

2011-01-05 Thread David Watson
ne 283, in close_all_instances instance.connection.close() AttributeError: 'Server' object has no attribute 'close' Thanks, David On Jan 5, 11:41 pm, mdipierro wrote: > this should now be fixed.please try. > > On Jan 5, 8:21 pm, David Watson wrote: > > &

[web2py] Re: couchdb sample: AttributeError: 'Server' object has no attribute 'commit'

2011-01-06 Thread David Watson
I had the same crash as David Marko on the welcome app. On Jan 6, 2:23 am, David Marko wrote: > I have the same problem here. > > Whats more with latest trunk I cant > openhttp://127.0.0.1:8000/welcome/default/index. It raises: > > Traceback (most recent call last): >   File "c:\java\web2py\gluo

[web2py] smartgrid: events and callbacks downstream?

2011-12-13 Thread David Watson
I am using smartgrid to generate some table and form interfaces to my database. Is there a way to use something like the process function with smartgrid to get callbacks? It's not clear to me how I can hook into the downstream click-generated events from the edit form, for instance. I just want to

[web2py] Re: smartgrid: events and callbacks downstream?

2011-12-13 Thread David Watson
the complexity that Massimo describes, I'd argue for a very simple CRUD trigger callback set as most all of my web service usage patterns map to that directly. Hope this helps. David On Dec 13, 2:44 pm, David Watson wrote: > I am using smartgrid to generate some table and form int

[web2py] web2py app with no CSS or javascript?

2011-09-11 Thread David Watson
I'm using the latest stable release of web2py. I need to produce an app that has no CSS or javascript. Is the quickest way to do this just stripping these things from layout.html or is there a setting somewhere that would cause the rendering to go plain-jane? Thanks, David

[web2py] Re: web2py with twitter bootstrap - very clean interface ...

2011-11-09 Thread David Watson
On Sep 26, 5:43 pm, Bruno Rocha wrote: > We are planning to include it in the next web2py version. > > I will share the actual w2p after a clean up. > Hi, does anybody know if the twitter-bootstrap integration code is available for web2py yet? The one shown here: http://labs.blouweb.com/bootstra

[web2py] Re: web2py with twitter bootstrap - very clean interface ...

2011-11-09 Thread David Watson
Sorry, I found it: http://groups.google.com/group/web2py-developers/browse_thread/thread/d9c3698044c4902f/8eb26098b55388d3?lnk=gst&q=bootstrap#8eb26098b55388d3 On Nov 9, 12:47 pm, David Watson wrote: > On Sep 26, 5:43 pm, Bruno Rocha wrote: > > > We are planning to includ

[web2py] django and sqlalchemy on web2py

2011-11-14 Thread David Watson
Hi All, I've been working with the code here: http://code.google.com/p/django-and-sqlalchemy-on-web2py/ to "port" a legacy django model to web2py. It works fine for simple single inheritance cases, and cases where the ancestor depth is one. However, when I try to use a user-defined django model

[web2py] packaging return from executesql as Rows object?

2011-11-16 Thread David Watson
Does anybody have example code showing how to package the return from executesql as a gluon.sql.Rows object? I have tried: raw_rows = legacy_db.executesql(sqlstr, as_dict=True) from gluon import sql columns = ['col1', 'col2', 'col3'] rowsobj = sql.Rows(legacy_db, raw_rows, columns

[web2py] Re: packaging return from executesql as Rows object?

2011-11-18 Thread David Watson
Hi Bruno, I tried both of these but neither one worked. I just wound up with an empty table. I wasn't sure why you used Row objects in one list comprehension and Storage objects in the other, but neither one produced a list that the table likes. :( Not sure what's going on there but there were no

[web2py] Re: packaging return from executesql as Rows object?

2011-11-18 Thread David Watson
This produces a table with a single column and the rows consisting of what should have been the header columns followed by the body columns manifested as rows also. On Nov 17, 10:25 am, DenesL wrote: > Why not just: > > table = TABLE(THEAD(columns), TBODY(raw_rows)) > > On Nov 16,

[web2py] fedora, pip, web2py, virtualenv, and mysql

2011-11-28 Thread David Watson
I've installed web2py via pip in a virtualenv with the --no-site- packages option: virtualenv --no-site-packages env pip install web2py which gives me version 1.98.2. I added a VERSION file in the root and this got web2py running. I copied admin and my application, which depends on mysql, into

[web2py] Re: fedora, pip, web2py, virtualenv, and mysql

2011-11-29 Thread David Watson
I don't believe that's true. For instance, in the aforementioned example my code has a mysql db uri specified in db.py, but the mysql driver is never loaded, despite its obvious presence in the virtualenv. Only the sqlite3 driver gets loaded. The different behavior can clearly be observed after r

[web2py] 'id' on 1.99.3 with SQLFORM.grid and links

2011-12-01 Thread David Watson
I am running web2py version 1.99.3 I have the following code in my default controller. The view shows the item. When i run links = [lambda row: A('Edit',_href=URL("default","sweeps",args=[row.id])), lambda row: A('Delete',_href=URL("default","promos",args=[row.id]))] grid2 = SQL

[web2py] Re: 'id' on 1.99.3 with SQLFORM.grid and links

2011-12-02 Thread David Watson
Thanks for your response. On Dec 1, 1:20 pm, Anthony wrote: > Does your query/grid include the 'id' field? Yes. Did the same code used to work > on 1.99.2? No.

[web2py] Exception with couchdb on trunk ('Database' object has no attribute 'save')

2011-06-15 Thread David Watson
Hi All, I finally got some time to begin working with couchdb on trunk again. I'm working with: web2py™ Version 1.96.4 (2011-06-14 14:30:00) Python Python 2.6.5: /usr/bin/python Couchdb Apache 0.10.0 on Ubuntu 10.04 LTS I was blown away by how far the web interface on web2py has progressed i

[web2py] Re: mongoDBAdapter test ......

2011-06-21 Thread David Watson
Hi Joe, That report is generated because the types dictionary for that key doesn't have a value that encodes a template for the field.length to be written into. If you look at the types at the top of the class, you'll notice that some types do have a template value and some do not. Unfortunately,

[web2py] 404 access denied problem with janrain on cube2py

2011-06-21 Thread David Watson
I uncommented and edited the janrain code on a freshly installed version of cube2py with the latest web2py on ubuntu lucid. All four of the logins work; however, all 3 but google fail after they get back to cube2py as follows: If I try to go here: http://davidwatson.local/cube2py/plugin_wiki/page