[web2py] Janrain recently broken (and how to fix)

2017-11-15 Thread Anthony
If anyone is using web2py's Janrain integration, it looks like Janrain recently made a change that breaks the web2py code. I submitted a pull request to fix it, but in the meantime, a temporary workaround is to add the following in the user() function (before the call to auth()): if

[web2py] scheduler can't normal run my script

2017-11-15 Thread yytrying
i write a scripy to get some information and use scheduler to auto ,but scheduler is display FAILED,this is my script def redhat(): bug_num ='' try: try: url = 'https://access.redhat.com/security/vulnerabilities' rea = requests.get(url)

[web2py] Re: Failing calculate the average

2017-11-15 Thread mostwanted
U were right man, i calculated my average right below the {{pass}} and now it is able to increment and do the average of course i changed the variables to total and average. Thanks alot Tony On Wednesday, November 15, 2017 at 5:36:19 PM UTC+2, Anthony wrote: > > {{ >> average=0for report in

[web2py] Re: How to get teh last DB Field data

2017-11-15 Thread Leonel Câmara
What are you trying to do exactly? I mean, what's the objective here? -- 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

[web2py] SQLFORM.grid custom form on validation, oncreate not triggered

2017-11-15 Thread Yebach
Hello I have a custom form from SQLFORM.grid. After clicking the submit button onvalidation or oncreate funciton are not triggered - although some fields are validated, but that is even before the my_processing_form function there is no redirect after submit and the record is not

[web2py] Re: Is it possible to translate data in SQLFORM.grid?

2017-11-15 Thread Leonel Câmara
Yebach your code is wrong. db.config.represent = lambda v, r: T(db.config[v].co_note) Should be db.config.co_note.represent = lambda v, r: T(v) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: How to get teh last DB Field data

2017-11-15 Thread Leonel Câmara
You probably have some bug in your code. Is the list of messages in a HTML element with id="target"? If you want put the APP here I'll fix it. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Re: How to get teh last DB Field data

2017-11-15 Thread Maurice Waka
*controller* @auth.requires_login() def view_searches(): form = SQLFORM(Post) if form.process().accepted: #pass response.flash = 'done' if request.vars.message: db.post.insert(message = request.vars.message) db.commit() quiz = db(db.post.author ==

Re: [web2py] Re: How to get teh last DB Field data

2017-11-15 Thread Maurice Waka
addendum: Post = db.define_table('post', Field('author', 'reference auth_user', default=auth.user_id, writable=False, readable=False), Field('message', 'text', requires=IS_NOT_EMPTY(), default ='', notnull=False), auth.signature

[web2py] Re: How to get teh last DB Field data

2017-11-15 Thread Anthony
> controller/default/index.py > ... > form =SQLFORM(Post, formstyle='table3cols') > if request.vars.message: > db.post.insert(message=request.vars.message) > pass > String = '' > for s in db(db.post.author==auth.user.id).select(db.post.ALL): > String = s.message > First, you

Re: [web2py] Re: How to get teh last DB Field data

2017-11-15 Thread Maurice Waka
About db refresh, when i go to the database administration page in the app, and open the post.db page, i have to manually refresh the page to see the latest inserted value which does not match with the returned value as explained. That's why i was thinking of a way to refresh the db after the

[web2py] Re: SQLFORM.grid custom form on validation, oncreate not triggered

2017-11-15 Thread Anthony
The oncreate function is pointless because the only thing it does is conditionally alter the form errors and vars, but then it redirects -- so nothing happens with the altered form errors and vars (the redirect results in a new request, so nothing from the current request is preserved). You

Re: [web2py] Re: How to get teh last DB Field data

2017-11-15 Thread Maurice Waka
Something close to this: https://www.daniweb.com/programming/software-development/threads/310925/refresh-data-base-after-inserting-records On 15 Nov 2017 1:33 PM, "Leonel Câmara" wrote: > What are you trying to do exactly? I mean, what's the objective here? > > -- >

[web2py] Re: Web2py and machine learning - scikit-learn

2017-11-15 Thread Pierre
Is there a reliable way to determine whether or not a library is thread-safe ? what's the web2py method for locking ?(module: thread/threading ? what kind of lock with what option: blocking/non-blocking) ?) thanks -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: scheduler can't normal run my script

2017-11-15 Thread Anthony
How are you starting the scheduler workers? Typically the scheduler is run in the context of a web2py app environment, so the database and tasks are defined in a web2py app. To run the scheduler outside of the web2py context, see

Re: [web2py] Web2Py + VueJS SPA (Webpack)

2017-11-15 Thread Carlos A. Armenta Castro
Hi José, I'm not in a hurry, but I will appreciate so much your help. Thank you! P.S. Your recipe with the Webpack proxyTable is working like a charm in my dev server.  > lso, in webpack.config.babel.js configuration file , if you add > > > devServer: { > host: '127.0.0.1', > port:

[web2py] Re: Failing calculate the average

2017-11-15 Thread Anthony
> > {{ > average=0for report in form: > perc=(float(report.marks)/float(report.total))*float(100)if perc>=75: > grade='A'elif perc>=65: > grade='B'elif perc>=55: > grade='C'elif perc>=45: > grade='D' > > This is where I'm attempting to calculate the average > > average+=perc >