[web2py] Re: Scheduler error: Exception in thread Thread-1 and connection is closed

2015-11-21 Thread kenny c
I think there is timeout issue on the scheduler and I am not sure which one it is.. Seems to me that the Scheduler stops if it takes longer than 5 minutes in regardless of the value of timeout saved in the task row. On Saturday, November 21, 2015 at 8:12:05 PM UTC-5, kenny c wrote: > > HI, I am

[web2py] Scheduler, run code first of each month

2015-11-21 Thread Jason Solack
Hello, i'm aware of being able to set the period in seconds we'd like a task executed in the scheduler... but i'm wondering if there's a way to have the scheduler fire a task on the 1st of each month or if cron is required for that behavior. Thank you for your input Jason -- Resources: - ht

[web2py] Scheduler error: Exception in thread Thread-1 and connection is closed

2015-11-21 Thread kenny c
HI, I am not sure what causes this issue.. I am running Web2py with Postgresql, I am getting this exception in thread while running a scheduler. and I get InterfaceError("Connection is closed") . I am wondering if Postgresql has timeout setting or scheduler timeout? (I made sure that timeout i

[web2py] Re: Using orderby in IS_IN_DB with a foreign key.

2015-11-21 Thread 黄祥
yes you are right, thanks for corrected me best regards, stifan On Sunday, November 22, 2015 at 2:24:53 AM UTC+7, Anthony wrote: > > On Saturday, November 21, 2015 at 2:19:02 PM UTC-5, 黄祥 wrote: >> >> please try : >> IS_IN_DB(db, db.auth_user.id, db.auth_user._format, orderby = >> db.auth_user.f

[web2py] Re: Using orderby in IS_IN_DB with a foreign key.

2015-11-21 Thread Anthony
On Saturday, November 21, 2015 at 2:19:02 PM UTC-5, 黄祥 wrote: > > please try : > IS_IN_DB(db, db.auth_user.id, db.auth_user._format, orderby = > db.auth_user.first_name) > I don't think that will help in this case, as the field(s) in questions are references to the db.mentor table, not the db.au

[web2py] Re: Using orderby in IS_IN_DB with a foreign key.

2015-11-21 Thread 黄祥
please try : IS_IN_DB(db, db.auth_user.id, db.auth_user._format, orderby = db.auth_user.first_name) if not work, perhaps you modif your auth_user table (first_name field into something else) best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http

[web2py] Re: Using orderby in IS_IN_DB with a foreign key.

2015-11-21 Thread Anthony
Are you saying you don't want to sort by the labels at all, but by some field(s) in auth_user that are otherwise not visible to the user? If so, I don't think you'll be able to do that with IS_IN_DB. Instead, build (and order) your set of values and labels manually, and then use the IS_IN_SET v

[web2py] Re: Compile .less files?

2015-11-21 Thread Massimo Di Pierro
web2py does not compile them. You can compile them yourself and the add them to import files. All web2py allows you to do is to include them and than you have JS compile them clientside with less.js http://lesscss.org/ (not included) On Friday, 20 November 2015 00:52:05 UTC-6, Thee Cherry wrote

[web2py] Re: cx_oracle web2Py on windows

2015-11-21 Thread Massimo Di Pierro
Are you running web2py from source? On Friday, 20 November 2015 00:52:05 UTC-6, rochdi hassine wrote: > > I tried to connect web2py to my Oracle database. > I have deployed web2py on a windows environment where python was already > installed with cx_oracle. > But web2py haven't run with Oracle ca

[web2py] Routes on error - 401 redirect to login

2015-11-21 Thread Liam
I am creating a web2py application and I am using Auth for login. Some of my controllers have functions that should be publicly accessible, but may sometimes attempt to access data that requires authorisation, in which case I raise HTTP 401. If the user is already logged in, it raises a 403. I

[web2py] Using orderby in IS_IN_DB with a foreign key.

2015-11-21 Thread Hilton Shumway
I'm building a site with a number of different tables linked to the auth_user table, namely mentors, judge, etc. A few different tables link indirectly to auth_user through foreign keys to those tables, for example abstract has a foreign key to mentor, which has a foreign key to auth_user. Now,

Re: [web2py] Re: web2py 2.0 DAL no longer usable for mysql stored procedures

2015-11-21 Thread Dániel Finta
Hi! Just want to ask how long this still takes to fix? We like to use stored procedures for MySQL queries. After an executesql( "CALL... everything gives this error - even commit() and rollback(). This only happens if the procedure wants to give back a result. I have tried to fetch it manually

[web2py] Catching module exception

2015-11-21 Thread Edward Suárez
Hi, I have a problem trying to catch an exception of this module Grokzen/redis-py-cluster this is the code: from rediscluster.exceptions import RedisClusterException def getToken(key): try: token = redis.get(key) if token != None:

[web2py] Re: how come i can't INPUT append?

2015-11-21 Thread Leonel Câmara
To delete you do the same thing you do in a dict you use del del in_fn['_disabled'] or, does that simply set the attribute to empty string? Yes that's what your solution does -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source c

[web2py] Nginx Gateway Timeout

2015-11-21 Thread Mark Billion
It takes a while to process certain pdf creation requests and the Nginx server is throwing a 504 error. Its atop ubuntu 14.04 w web2py -- it was set up using the included w2p scripts. I am sure that this is a simple question, but my searching has only located answers about some PHP function...

[web2py] Re: executesql issue

2015-11-21 Thread Pierre
Thanks Richard & Anthony Now, I understand better what's a sql injection If YOU read this message : stay away from SQL injection and also from SQL intrusion !!! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https:

[web2py] Re: how come i can't INPUT append?

2015-11-21 Thread lucas
and you would delete the attribute altogether by? in_fn['_disabled'] = '' or, does that simply set the attribute to empty string? lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/

[web2py] Re: how come i can't INPUT append?

2015-11-21 Thread Leonel Câmara
Append is supposed to "append" HTML elements to the list of children of an element, its argument should be an HTML element not a keyword arg. Obviously you would not want to append to an Input element anyway. You can set attributes in web2py HTML helpers like you set keys in a dictionary so wha

[web2py] how come i can't INPUT append?

2015-11-21 Thread lucas
hello one and all, how come i can't? in_fn = INPUT(_type='text', _name='fn', _value=l.followup_notes, _class='text', _style='text-align: left; width: 100%; height: 16px; padding: 2px;', _rows='1') if completed: in_fn.append(_disabled='disabled') where th

[web2py] how come i can't TD append?

2015-11-21 Thread lucas
hello one and all, how come i can't? in_fn = INPUT(_type='text', _name='fn', _value=l.followup_notes, _class='text', _style='text-align: left; width: 100%; height: 16px; padding: 2px;', _rows='1') if completed: in_fn.append(_disabled='disabled') where th

[web2py] REST API POST Return non-dict creates an obscure error message

2015-11-21 Thread James Burke
I recently upgraded an application on Pythonanywhere.com to: Version 2.12.3-stable+timestamp.2015.08.19.00.18.03 Part of the application uses jQuery to post files to a web2py REST API. After the upgrade I noticed that I kept getting this unhelpful error 500 message: PythonAnywhere: something w

[web2py] Re: Field set the default value +1 on insert

2015-11-21 Thread Bart van Berkel
Hello my friends, Thanks for the inspiration. The answer from Craig, looks to me a good idea how i can do it. many thanks, Bart -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/l