[web2py] Re: select only one table in a joined select

2014-06-04 Thread Robin Manoli
LaDarrius, the point to have the join is to get the tag properties in one query. Your solution only returns the tag id's. Annet, tweaking your solution made it work: *dbTags = db((db.product_tag.product==row.product.id)&(db.product_tag.tag==db.tag.id)).select(db.tag.ALL)* Thanks for your help g

Re: [web2py] Re: TABLE and aggregate fields

2014-06-04 Thread Massimiliano
I think I explained the problem in the wrong way. Before, with the old version of web2py some procedures that make use of datatable worked very well. Today we miss some fields... aggregate fields. So I was looking for an hint to make the system work again with little effort :D Thank you On Tue

Re: [web2py] Re: TABLE and aggregate fields

2014-06-04 Thread Niphlod
I don't know what to suggest unless you show some code. On Wednesday, June 4, 2014 10:23:29 AM UTC+2, Massimiliano wrote: > > I think I explained the problem in the wrong way. > > Before, with the old version of web2py some procedures that make use of > datatable worked very well. > Today we miss

Re: [web2py] Re: web2py CMS

2014-06-04 Thread Philip Kilner
Hi, +1 for Plone from me, too. If you only need something lightweight, it may be OTT - but if you need a mature product that you will not outgrow then Plone is well worth a look. It's not hard to knit web2py and Plone together - depends what you want to achieve obviously, but where I've needed b

Re: [web2py] Re: TABLE and aggregate fields

2014-06-04 Thread Massimiliano
I think that is the problem. Data from rows.json() Look at the data structure: version 2.5.1 u'[{"SUM(qviewriepilogoprevisioni.motrici)": 0, "zona": "ABRUZZO", "SUM(qviewriepilogoprevisioni.bilici)": 2, "SUM(qviewriepilogoprevisioni.abbinati)": 0, "tratta": "ASCOLI (Ascoli Piceno)"}, {"SUM(qvie

Re: [web2py] Re: TABLE and aggregate fields

2014-06-04 Thread Niphlod
Does this mean that your code relied on rows.json() and now the output is different ? In other words: can you please state what your application needs from 2.5.1 to work and doesn't with 2.9.5 ? Did you try with the trunk version ? On Wednesday, June 4, 2014 11:13:17 AM UTC+2, Massimiliano wrot

Re: [web2py] Re: TABLE and aggregate fields

2014-06-04 Thread Niphlod
BTW: I think that if you download the latest version (i.e., the latest source code) you'd have no issues with SQLTABLE because of a patch has been included for it on 2014-04-24. On Wednesday, June 4, 2014 12:34:35 PM UTC+2, Niphlod wrote: > > Does this mean that your code relied on rows.json() a

[web2py] Re: How to update the stored original filename for upload field using smartgrid edit form?

2014-06-04 Thread Michael Beller
I used compute fields and it now works fine. Unless I did something wrong, the instructions in the book for storing the original filename only work for the initial insert and does not address updating the field that contains the original filename during an update. Here is my final code (I know

Re: [web2py] Re: web2py CMS

2014-06-04 Thread Carlos Costa
I found Plone very hard to do almost anything. For simple sites I would not recomend although it is really the best in the Python world. 2014-06-04 6:02 GMT-03:00 Philip Kilner : > Hi, > > +1 for Plone from me, too. > > If you only need something lightweight, it may be OTT - but if you need > a

Re: [web2py] Re: TABLE and aggregate fields

2014-06-04 Thread Anthony
It does look like a significant change was made to Row.as_json -- previously it did pull the items out of _extra, but now leaves _extra in place. Not sure why. Anthony On Wednesday, June 4, 2014 6:34:35 AM UTC-4, Niphlod wrote: > > Does this mean that your code relied on rows.json() and now the

Re: [web2py] Re: plugin_dataTables

2014-06-04 Thread Manuele Pesenti
Il 03/06/14 22:12, Massimo Di Pierro ha scritto: > Could you post some screenshots? off course... I'll do it ASAP... in the meanwhile you can clone the repo under web2py applications and visit pages: * plugin_examples/rpadroni.html * plugin_examples/myjoin.html Cheers Manuele -- Resources:

[web2py] Scheduler

2014-06-04 Thread Tom Russell
I have implemented the scheduler per the info and examples in Chapter 4 of the book. I am trying to start the workers but my problem is I am not sure how to since my app is hosted on pythonanywhere and according to the book I need to do it from the interface from where you set the ip and port.

Re: [web2py] Re: web2py CMS

2014-06-04 Thread Michele Comitini
the title of this thread is "web2py CMS" 2014-06-04 13:30 GMT+02:00 Carlos Costa : > I found Plone very hard to do almost anything. > For simple sites I would not recomend although it is really the best in > the Python world. > > > 2014-06-04 6:02 GMT-03:00 Philip Kilner : > > Hi, >> >> +1 for

Re: [web2py] Re: TABLE and aggregate fields

2014-06-04 Thread Niphlod
me neither. Lately I try to assume the fact that something is stable only if it's tested. If it isn't, then it may change in a while, so I don't write code depending on it. Fortunately as_json() is not documented in the book (hence "experimental" at least in theory) but I'd argue that someone b

[web2py] Re: Scheduler

2014-06-04 Thread Niphlod
no, you can't, because pythonanywhere is a shared hosting provider that does wonderful things, except letting you control a process that is not part of a web stack. On Wednesday, June 4, 2014 5:00:06 PM UTC+2, Tom Russell wrote: > > I have implemented the scheduler per the info and examples in C

[web2py] Re: Problems with multiple forms and SQLFORM.grid

2014-06-04 Thread john smith
Ok, I managed to do almost everything I want in this function. Now I only need to know how to remove the record by clicking a button. I think that i just need to put this: 'db(db.auth_membership.id==row.id).delete()' in onclick property of the button. The problem is that all solutions for it I

[web2py] Re: Problems with multiple forms and SQLFORM.grid

2014-06-04 Thread LaDarrius Stewart
In what function can you show some new code? And yes do a ajax callback to a delete method. ex: onclick="ajax('{{=URL('deletesomething',args=(row.id))}}',[],null) (row.id could be wrong obv) def deletesomething(): db(db.table.id ==request.args(0)).delete() I

Re: [web2py] web2py function import not working well

2014-06-04 Thread Derek
you running it from the shell gives you the REPL which you don't have when you run it through web2py. repl will print out if you just give it a class it will tell you what instance of class you have. if you want to print like it does in the repl, you need to 'print repr(x)' where x is the class

Re: [web2py] Re: web2py CMS

2014-06-04 Thread Derek
And in the text: Any thoughts, suggestions, links and comments would be very appreciated. On Wednesday, June 4, 2014 10:00:25 AM UTC-7, Michele Comitini wrote: > > the title of this thread is "web2py CMS" > > > > 2014-06-04 13:30 GMT+02:00 Carlos Costa > >: > >> I found Plone very hard to do

[web2py] Re: Problems with multiple forms and SQLFORM.grid

2014-06-04 Thread john smith
Yes, it works perfectly now. Here is my function: @auth.requires(auth.has_membership('librarian') or auth.has_membership('admin')) def deletesomething(): db(db.auth_membership.id==request.args(0)).delete() redirect(URL('show_reader', args=request.args(1)), client_side=True) @auth.requires(auth.ha

[web2py] Re: Scheduler

2014-06-04 Thread Michael Beller
You can't use the web2py scheduler but you can create your own simple version. Here is more information from the python anywhere forum: https://www.pythonanywhere.com/forums/topic/179/ Basically you can launch web2py periodically, e.g., once an hour or once per day, and execute a module that c

Re: [web2py] Re: Autocomplete widget on SQLFORM.grid search?

2014-06-04 Thread JoeCodeswell
Alec Taylor said: "I know, but it could also help suggest possible values to search for details on in the grid ." I agree, Alec. +1 Love and peace, Joe On Monday, May 27, 2013 8:36:25 PM UTC-7, Alec Taylor wrote: > > I know, but it could also help suggest possible values to search for > det

Re: [web2py] .grid() my own search widget possible? How?

2014-06-04 Thread JoeCodeswell
Dear Richard, Would you (and Jim) please post your sample code? Thanks in advance. Love and peace, Joe On Thursday, April 24, 2014 8:10:01 AM UTC-7, Richard wrote: > > I am reading the sqlhtml.py search_widget... > > So I would just pass my function (search widget) like that : > > SQLFORM.grid