Re: [web2py] Re: grid: deletion row callback

2014-07-07 Thread Manuele Pesenti
Il 07/07/14 23:49, Anthony ha scritto: > I'm not sure how easy that would be in the browser without hacking > web2py.js, but on the server, you can check for when a deletion > happens and then send back some JS to be executed. Not tested, but > maybe something like: > > | > defmygrid(): > ifreq

Re: [web2py] Re: grid: deletion row callback

2014-07-07 Thread Manuele Pesenti
Il 07/07/14 22:43, 黄祥 ha scritto: > pardon me, i'm not sure what do you mean with _javascript_ trigger. > please explain more about it. btw, web2py have ondelete (executed on > HTML Form Side) and before_delete callback (executed on DAL side). Thank you 黄祥 :) I mean that I need to refresh some part

[web2py] XMLRPC fault ?

2014-07-07 Thread lyn2py
Hello, I'm trying out the XML RPC to have 2 apps talk to each other, and this is what I have in my code (copy-pasted from this groups and web2py book): App 1: def test(): import xmlrpclib xmlpxy = xmlrpclib.ServerProxy( 'http://127.0.0.1:8000/app2/default/call/xmlrpc') result = xmlpx

Re: [web2py] Re: custom group names in web2py

2014-07-07 Thread James Lamb
is there a list of default values that we can call using the %(id)s style syntax? On Tue, Jul 8, 2014 at 5:02 AM, Leonel Câmara wrote: > One way to do it is to append an action to db.auth_user._after_insert > where you create the group if it doesn't exist yet and then add the user. > > Check: >

[web2py] Re: how to Consume external NetTcp SOAP service in Web2Py

2014-07-07 Thread Dave S
On Monday, July 7, 2014 6:32:28 PM UTC-7, Dave S wrote: > > > > On Tuesday, June 24, 2014 10:48:13 AM UTC-7, Massimo Di Pierro wrote: >> >> web2py ships with pysimplesoap. It is documented on google code. >> >> On Monday, 23 June 2014 12:39:22 UTC-5, Gopi wrote: >>> >>> Hi All.. I am new to web2p

[web2py] Re: how to Consume external NetTcp SOAP service in Web2Py

2014-07-07 Thread Dave S
On Tuesday, June 24, 2014 10:48:13 AM UTC-7, Massimo Di Pierro wrote: > > web2py ships with pysimplesoap. It is documented on google code. > > On Monday, 23 June 2014 12:39:22 UTC-5, Gopi wrote: >> >> Hi All.. I am new to web2py. Is there a way to call external NetTcp SOAP >> service in Web2Py.

[web2py] Re: grid: deletion row callback

2014-07-07 Thread Anthony
I'm not sure how easy that would be in the browser without hacking web2py.js, but on the server, you can check for when a deletion happens and then send back some JS to be executed. Not tested, but maybe something like: def mygrid(): if request.args(-3) == 'delete': deleted_record =

[web2py] Re: Updating database outside web2py

2014-07-07 Thread Cliff Kachinske
I would use the native Python adapter for what you want to do. There is less code to load and execute, thus less memory, less time and fewer opportunities for error. The only possible drawback is you will need to write some SQL. On Thursday, July 3, 2014 12:53:34 AM UTC-4, Mayank Kumar wrote: >

[web2py] Re: Auto update db records behaviour per input field on release (AJAX)

2014-07-07 Thread Derek
If you read, I suggested that when the 'page close' or 'navigate away' event is fired, you can trigger a save then (one option). You can use parsely to manage your validators (because you don't want to save invalid data). It will do run-time validation, which you can then hook into to do the sa

Re: [web2py] SQLEDITABLE plugin

2014-07-07 Thread Fabiano Almeida
Thanks Kato!!! Now I get it!! 2014-07-07 8:30 GMT-03:00 kato : > I will add a postscript. you can write as below. > > def demo031(): > def record(): > rows = db(db.employee_sheet.resigned == True).select(limitby=(0,3)) > return [row.id for row in rows.sort(lambda > row:row.e

[web2py] Re: grid: deletion row callback

2014-07-07 Thread 黄祥
pardon me, i'm not sure what do you mean with _javascript_ trigger. please explain more about it. btw, web2py have ondelete (executed on HTML Form Side) and before_delete callback (executed on DAL side). ref: http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-grid http://

[web2py] grid: deletion row callback

2014-07-07 Thread Manuele Pesenti
Hi! is it possible to setup a _javascript_ trigger on grid row deletion event? Possibly capturing the data of the row that will be deleted? thank you in advance. Cheers Manuele -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sour

[web2py] Re: custom group names in web2py

2014-07-07 Thread Leonel Câmara
One way to do it is to append an action to db.auth_user._after_insert where you create the group if it doesn't exist yet and then add the user. Check: http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#before-and-after-callbacks -- Resources: - http://web2py.com -

[web2py] Re: Use of scheduler in place of cron

2014-07-07 Thread Dave S
On Monday, June 23, 2014 11:46:28 PM UTC-7, pbreit wrote: > > I have a function that I want to run every 30 minutes. I would ordinarily > expect to use cron but see that the Web2py book encourages using the > scheduler. But after reviewing the docs several times, I have no idea how > to make t

[web2py] Re: Web2py Views: Multiple images changing in the background of index?

2014-07-07 Thread Dave S
On Monday, June 23, 2014 2:15:12 PM UTC-7, Gideon George wrote: > > Please I need a help, this is the first time I am posting here and I am in > my journey to be the Africa's number one Web2py enthusiast. I am currently > developing my first web2py application and I have less than a week to >

[web2py] Re: Implementing a search engine in web2py

2014-07-07 Thread lokesh
I have a single web2py instance running on my localhost. And I have defined these functions in a controller and displaying the obtained using their respective views. I'm testing them by opening appropriate urls likes localhost:8000/application/controller/function. In first case it returns the ju

[web2py] Dynamic application names in routes.py

2014-07-07 Thread Evandro Oliveira
Hello, people. Awesome group! Just a curiosity. We have an application that is accessible through http://mydomain/{user-account} where every account maps to an application. Our signup and payment systems are other individual applications, ending up with 4 web2py applications - admin - applicat

Re: [web2py] SQLEDITABLE plugin

2014-07-07 Thread kato
I will add a postscript. you can write as below. def demo031(): def record(): rows = db(db.employee_sheet.resigned == True).select(limitby=(0,3)) return [row.id for row in rows.sort(lambda row:row.employee_number)] response.title = 'demo030' response.view = 'plugin_sql

[web2py] Re: Searching for multiple words in SQLFORM.grid

2014-07-07 Thread Cacpacific O
thanks, this is very helpful. On Friday, March 1, 2013 3:19:22 PM UTC+7, Mandar Vaze wrote: > > Hi, > > As you all know, SQLFORM.grid search does not support searching for > multiple words - it throws an error "Invalid Query" > Searching for multiple words may be a common requirement. > I looked

Re: [web2py] Updating database outside web2py

2014-07-07 Thread Johann Spies
On 3 July 2014 06:53, Mayank Kumar wrote: > Hi, > I am working on a project where I need to update the website database > outside web2py, i mean outside an standard HTTP request. For example, I > have another server where TCP request comes, and I need to update one table > in the database. Also,

[web2py] Re: APNSFeedbackWrapper receive method freezes

2014-07-07 Thread Wonton
Hello again Leonel. I'm reading the Scheduler section in web2py docs and I'm a bit confused: - To use the scheduler in a module what should i do? Create a scheduler.py model and pass the scheduler created in the model to the function in my module as I do with my db? - Can I start and stop the

Re: [web2py] RapydScript / RapydML - impressive

2014-07-07 Thread António Ramos
@massimo Does source maps help with coffeescript? http://www.coffeescriptlove.com/2012/04/source-maps-for-coffeescript.html?m=1 Em 16/06/2014 04:26, "Massimo Di Pierro" escreveu: > actually I did not know about this and this is really interesting. > The problem I had with coffeescript was it was

[web2py] Re: redirect(URL('second',vars=dict(name=name)))..could somebody explain this in details thank

2014-07-07 Thread Anthony
name = form.vars.visitor_name redirect(URL('second',vars=dict(name=name))) # i did not get the logic behind vars=dict(name=name))) The above will produce a URL like /myapp/default/second?name=Bazida. This will pass the value of the "name" variable to the second() function. Anthony -- Resourc

[web2py] Re: Login drop down in appadmin while logged in into admin

2014-07-07 Thread Anthony
There are two ways to access appadmin: > > - begin logged into admin and "system administrator". this the usual way. > You get access to appadmin for all the apps. > - begin logged into a specific app and having special privileges: > > http://web2py.com/books/default/chapter/29/09/access-control?s

[web2py] Re: APNSFeedbackWrapper receive method freezes

2014-07-07 Thread Wonton
Oks, then I will study the scheduler and I will try to implement it. Thank you very much for the suggestion. On Monday, July 7, 2014 1:39:57 PM UTC+2, Leonel Câmara wrote: > > Yes you can use the DAL inside the scheduler without any problem, the only > thing you need to pay attention to is to do

[web2py] Editing tables with datatables

2014-07-07 Thread Yebach
Hello I am using datatables plugin to dynamically edit table of workers which are read from database my code on client side is JAVASCRIPT var getTableData = function (){ var table = $('#example').tableToJSON(), // Convert the table into a javascript object datas = JSON.stringify(table); retu

Re: [web2py] redirect(URL('second',vars=dict(name=name)))..could somebody explain this in details thank

2014-07-07 Thread Jonathan Lundell
On 6 Jul 2014, at 7:04 PM, Bazida wrote: > Hi, I was doing some tutorial from the web2py book, i ran into this following > code > > def first(): > form = SQLFORM.factory(Field('visitor_name', requires=IS_NOT_EMPTY())) > if form.process().accepted: > name = form.vars.visitor_name

[web2py] Re: APNSFeedbackWrapper receive method freezes

2014-07-07 Thread Leonel Câmara
Yes you can use the DAL inside the scheduler without any problem, the only thing you need to pay attention to is to do a commit if you do any changes to the DB. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c

[web2py] Re: I have 2 simple newbie question from the introduction book..help

2014-07-07 Thread 黄祥
On Monday, July 7, 2014 6:29:05 AM UTC+7, Bazida wrote: > > >- *Question one:* > > Hello {{=request.vars.visitor_name}} > > What is the purpose of vars here, what it does. > > > request.vars: a gluon.storage.Storage object containing all request parameters. ref: http://web2py.com/books/

[web2py] Re: How to host a website from web2py homepage on pythonanywhere.com?

2014-07-07 Thread Massimo Di Pierro
https://www.pythonanywhere.com/try-web2py/ On Sunday, 6 July 2014 06:46:09 UTC-5, Ritesh Bhat wrote: > > Hi everyone, > I am a beginner and am using the web2py framework.for the first time. I > would like to host a website from my web2py page on to pythonanywhere.com > and i am not able to figur

[web2py] Re: Implementing a search engine in web2py

2014-07-07 Thread Massimo Di Pierro
Can you tell us more about your setup? Do you have one server? Multiple processes? Did you try it form the web2py shell? On Saturday, 5 July 2014 06:28:33 UTC-5, lokesh wrote: > > I'm using whoosh backend with plugin_haystack in my application. > But the search function is working only if there i

[web2py] Re: MySQL - OperationalError: Error on rename (errno: 150)

2014-07-07 Thread Massimo Di Pierro
No. web2py does not automatically delete indexes. You have to do it manually. Sorry. Please open a ticket about this. On Friday, 4 July 2014 17:44:53 UTC-5, José Antonio Salazar Montenegro wrote: > > I realize this is an ancient topic, but I'm having the very same error > migrating a MySQL tabl

[web2py] redirect(URL('second',vars=dict(name=name)))..could somebody explain this in details thank

2014-07-07 Thread Bazida
Hi, I was doing some tutorial from the web2py book, i ran into this following code def first(): form = SQLFORM.factory(Field('visitor_name', requires=IS_NOT_EMPTY())) if form.process().accepted: name = form.vars.visitor_name redirect(URL('second',vars=dict(name=name))) # i

Re: [web2py] SQLEDITABLE plugin

2014-07-07 Thread 'kato' via web2py-users
Hi fabiano. It is not possible to pass a query currently. But "record" parameter is so callable, please set there. Please see to the demo5 . thanks. 2014年7月6日日曜日 15時19分04秒 UTC-3 Fabiano Almeida: > > Hi kato! > > How to use SQLEDITA

[web2py] How to host a website from web2py homepage on pythonanywhere.com?

2014-07-07 Thread Ritesh Bhat
Hi everyone, I am a beginner and am using the web2py framework.for the first time. I would like to host a website from my web2py page on to pythonanywhere.com and i am not able to figure out the same. Any help in this regard will be very helpful. Thankyou. -- Resources: - http://web2py.com - h

[web2py] I have 2 simple newbie question from the introduction book..help

2014-07-07 Thread Bazida
- *Question one:* Hello {{=request.vars.visitor_name}} What is the purpose of vars here, what it does. - *Question two:* default/first.html What is the point of default here. Why we have to declare it everytime. Can't we just create first.html. Thank you for taking time t

[web2py] plugin_editable_jqgrid is not saving or adding new record - but its deleting

2014-07-07 Thread Peter
https://github.com/parroit/editablejqgrid/blob/master/models/plugin_editable_jqgrid.py I have been struggling to get this plugin to work out of the box but its not saving changes. On pressing enter key it just dims the window and nothing happens. This is happening even with their sample project.

[web2py] How to make so that the user can enter (add) a single address.

2014-07-07 Thread Капылов Данил
How to make so that the user can enter (add) a single address. And configure the "create an address" if more than one address to redirect to main page -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.googl

[web2py] Re: Login drop down in appadmin while logged in into admin

2014-07-07 Thread Massimo Di Pierro
There are two logins: 1) login into admin which gives you access to appadmin as well 2) login into your application. appadmin is part of your application and shows you whether you are logged into the application There are two ways to access appadmin: - begin logged into admin and "system administ

[web2py] custom group names in web2py

2014-07-07 Thread James Lamb
Hello, I am trying to get custom group names to work properly in web2py. I am using 2.9.5-stable+timestamp.2014.03.16.02.35.39 (Running on Apache/2.2.22 (Ubuntu), Python 2.7.3) I am trying to understand how when a user signs up the group they get added to is partly created by the organisation n

[web2py] Re: IS_TIME() validator behavior with whitespaces surrounding meridiem

2014-07-07 Thread Niphlod
I don't see any particular issues as long as you include the relevant test cases changed. TBH, the current validator is "good" because the default time widget doesn't use the format with the space within, but, again, I don't see any issues including the "parsing" for the "additional" format. O

[web2py] Login drop down in appadmin while logged in into admin

2014-07-07 Thread Annet
When I login to: https://admin.mydomain.com/admin/default/site The menu contains an item Logout. When I go to: https://admin.mydomain.com/myapp/appadmin/index The menu contains a drop down menu Login with the items: Lost password? Forgot username? and Login, I am already logged in, so why log