[web2py] web2py admin interface ssh tunnel

2013-08-21 Thread Jayadevan M
I am following the recipe to use a new instance of web2py along with ssh tunneling to access the web2py admin interface. The recipe says use the command nohup python web2py --nogui -p 8002 -i 127.0.0.1 -a '' & How can I stop an instance started like this? I am doing a ps for the process and kil

[web2py] web2py how does it get executed

2013-10-01 Thread Jayadevan M
Hi, I followed the deployment recipe posted here - https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-centos64.sh and it works fine. The thing is, I don't get how web2py in actually getting initialized. If I check the process tree, I see nginx3:18 \_ /opt/p

[web2py] Re: web2py how does it get executed

2013-10-02 Thread Jayadevan M
ls gluon/main.py, the real > "executor" that "holds" all the logic for executing merely the web > application, without the "bells and whistles" of the "development mode". > > Sorry for the multiple quotes ^_^ > > If anything remains unclea

[web2py] On moving incremental changes to production

2013-10-03 Thread Jayadevan M
I have deployed version 1 of an application in production. Let us say we used the admin console and created a project (.w2p) file and that was how we deployed it. Which is the best way to roll out the next release? If we use the same approach, it will also move to prod the files under databases

[web2py] Re: On moving incremental changes to production

2013-11-04 Thread Jayadevan M
Let me try rephrasing the question. What is the preferred way of deploying changes in production? On Thursday, October 3, 2013 6:15:44 PM UTC+5:30, Jayadevan M wrote: > > I have deployed version 1 of an application in production. Let us say we > used the admin console and created

[web2py] Databases folder and the files

2013-11-05 Thread Jayadevan M
When I add a table in db.py under models, or makes changes to the table definition, web2py creates a file with the name of the table forming part of the name (for example, for the 'post' table, it created 23c22a0e7a25abd01f10b0f47df2166c_post.table). Then it generates SQL based on the content i

Re: [web2py] Re: Databases folder and the files

2013-11-06 Thread Jayadevan M
Thanks. These files get created by web2py *after* it compares the objects declared under models with the objects in the database? On Wed, Nov 6, 2013 at 10:01 PM, Niphlod wrote: > import pickle > table_file = 'applications/theapp/databases/thetablefile.table' > print pickle.load(open(table_fil

Re: [web2py] Re: Databases folder and the files

2013-11-06 Thread Jayadevan M
created after altering the tables on the underlying instance, so > if any error is found (i.e. the migration is rolled back) they stay the > same. > > > On Thursday, November 7, 2013 3:40:53 AM UTC+1, Jayadevan M wrote: > >> Thanks. These files get created by web2py *after

[web2py] logging in web2py

2013-11-10 Thread Jayadevan M
Hi, We wanted to log user actions in a customized manner. For example "User abc clicked on link http://dsdsdfsdf";, "User user2 rquested access" etc. This, ieally, should be logged into a database table so that we can analyze user behaviour later. Also, in the event of such inserts failing, the

[web2py] change password for all users

2013-11-18 Thread Jayadevan M
Hi, The password for all users are stored in auth_user table. How can I reset the password for all users to the same from back-end (database layer)? Thanks, Jayadevan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - http

[web2py] web2py uwsgi nginx centos virtualized in ubuntu

2013-11-19 Thread Jayadevan M
This may be a networking issue. I have a centos machine running in my Ubuntu (using virtualbox). In the virtualized CentOS box, I have installed web2py, nginx and uwsgi as per the script at https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-centos64.sh I am running the

[web2py] Which is the best way to profile a web2py application? Any tutorial/link will be appreciated

2013-11-20 Thread Jayadevan M
Google told me about runsnakerun and Kcachegrind. Is there something specifically for web2py? Any helpful urls? -- 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

[web2py] web2py, PostgreSQL and exclusive locks

2013-11-23 Thread Jayadevan M
I am testing our web2py application with a few concurrent users. While monitoring the database (PostgreSQL), I can see a number of exclusive locks. The SQL is SET standard_conforming_strings=on Is this expected behaviour? -- Resources: - http://web2py.com - http://web2py.com/book (Documentatio

[web2py] Re: web2py, PostgreSQL and exclusive locks

2013-11-23 Thread Jayadevan M
Is it possible to avoid this? Especially since the default server value is ON since PostgreSQL 9.1 http://www.postgresql.org/docs/9.3/static/runtime-config-compatible.html On Saturday, November 23, 2013 5:23:02 PM UTC+5:30, Jayadevan M wrote: > > I am testing our web2py application with

[web2py] Re: web2py, PostgreSQL and exclusive locks

2013-11-23 Thread Jayadevan M
see exclusive locks. Which locks? Can you say more? > > > > On Saturday, 23 November 2013 05:53:02 UTC-6, Jayadevan M wrote: >> >> I am testing our web2py application with a few concurrent users. While >> monitoring the database (PostgreSQL), I ca

[web2py] Re: web2py, PostgreSQL and exclusive locks

2013-11-24 Thread Jayadevan M
> If a connection is recycled it should not do it again. > > On Saturday, 23 November 2013 22:49:47 UTC-6, Jayadevan M wrote: >> >> Thanks for the reply. OK, let us take this forward on the first one >> (default behaviour). Since the default behaviour is to SET >> s

[web2py] web2py compilation

2013-11-25 Thread Jayadevan M
Hi, I compiled my web2py app to improve performance and it started throwing these errors - Parts of the error message - S'' p45 sS'__doc__' p46 S"'Internal error in the Python interpreter.\\n\\nPleas...ersion, and the hardware/OS platform and version.'" p47 ... sI447 S"raise SystemErro

[web2py] Re: web2py compilation

2013-11-25 Thread Jayadevan M
I compiled from admin which was using the inbuilt rocket server (and using Python 2.7).. When I run uwsg for normal access, it was picking wrong version of Python (2.6). Issue resolved. On Monday, November 25, 2013 5:27:43 PM UTC+5:30, Jayadevan M wrote: > > Hi, > I compiled my web2

[web2py] Re: web2py how does it get executed

2013-11-25 Thread Jayadevan M
d > passing to the webserver the response in "wsgi format"). > > There are handlers for practically all webservers (look at the /handlers > dir), and in your particular case (uwsgi daemon "mode"), the code gets > executed in wsgihandler.py, that in turns c

[web2py] uwsgi threads

2013-11-25 Thread Jayadevan M
The script https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-centos64.sh does UWSGI_OPTIONS="--enable-threads Elsewhere I read that for python, it is better not to enable threads. Anyway, even with this, I see "*** Python threads support is disabled. You can enable

[web2py] DAL pool_size

2013-11-27 Thread Jayadevan M
How long does web2py retain the connections it obtains? -- 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 you are subscrib

Re: [web2py] Re: DAL pool_size

2013-11-27 Thread Jayadevan M
I did. I don't see any mention of how long the connections are retained - 5 seconds/5 minutes? Regards, Jayadevan On Wed, Nov 27, 2013 at 4:58 PM, 黄祥 wrote: > please read the book about connection pooling. > > ref: > > http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer

[web2py] uwsgi respawning

2013-11-27 Thread Jayadevan M
Hi, I used https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-centos64.sh to set up our environment. Probably because of the setting reload-on-as = 256, I see many entries like "{address space usage: 284729344 bytes/271MB} {rss usage: 22147072 bytes/21MB} [pid: 26452|

Re: [web2py] Re: uwsgi respawning

2013-11-27 Thread Jayadevan M
r "template" is a rule of thumb) yes. Alter it if you > feel that your app needs more memory > > > On Wednesday, November 27, 2013 1:04:23 PM UTC+1, Jayadevan M wrote: >> >> Hi, >> I used >> https://github.com/web2py/web2py/blob/master/scripts/ >> se

Re: [web2py] Re: uwsgi respawning

2013-11-27 Thread Jayadevan M
In my case, the rss is pretty OK (a 4 GB machine, 12 workers). But address space is high - {address space usage: 284536832 bytes/271MB} {rss usage: 22073344 bytes/21MB} On Thu, Nov 28, 2013 at 10:00 AM, Roberto De Ioris wrote: > > > OK. My real doubt is more about how uwsgi works. It scanned th

Re: [web2py] Re: uwsgi respawning

2013-11-27 Thread Jayadevan M
Oh, OK. Will do. Thank you. On Thu, Nov 28, 2013 at 10:20 AM, Roberto De Ioris wrote: > > > In my case, the rss is pretty OK (a 4 GB machine, 12 workers). But > address > > space is high - > > {address space usage: 284536832 bytes/271MB} {rss usage: 22073344 > > bytes/21MB} > > And why you are

[web2py] web2py logging

2013-12-03 Thread Jayadevan M
Hi, I am trying to get logging working. Quite a few doubts. This is the entry in logging.conf [logger_myapp] level=INFO qualname=web2py.app.myapp handlers=rotatingFileHandler propagate=0 Where will the log end up? We are using uwsgi and I do see the entries in /var/log/uwsgi/uwsgi.log, along wit

[web2py] Re: Online classes

2013-12-03 Thread Jayadevan M
Great. Thank you Massimo. On Wednesday, December 4, 2013 12:38:54 AM UTC+5:30, Gael Princivalle wrote: > > Thanks a lot Massimo, I'm gone watch all 13 hours ! > > Il giorno martedì 3 dicembre 2013 07:34:18 UTC+1, Massimo Di Pierro ha > scritto: >> >> Hello everybody, >> >> As you know I teach a c

[web2py] sessions2trash cron

2013-12-16 Thread Jayadevan M
I have [uwsgi-cron] command "python /var/www/web2py/web2py.py -Q -S welcome -M -R scripts/sessions2trash.py -A -o" registered as cron task in my uwsgi log (because the cron is mentioned in the config file for uwsgi. Under which user/how can I really see this cron entry? -- Resources: - http:/

[web2py] we2py sql fetch

2013-12-17 Thread Jayadevan M
When I turned on logging for PostgreSQL during testing, I see that the number of fetches goes up dramatically for tables with a large number of rows. For example - 2013-12-17 19:08:03 IST [19893]: [791-1] user=myserrhpa,db=everest1 LOG: duration: 0.093 ms execute fetch from /pg8000_portal_10:

[web2py] Re: we2py sql fetch

2013-12-17 Thread Jayadevan M
ot;select * from myt " rows=db.executesql(sql) return dict(rows=rows) On Tuesday, December 17, 2013 7:46:45 PM UTC+5:30, Massimo Di Pierro wrote: > > You may have hidden recursive selects, for example in a represent function. > > On Tuesday, 17 December 2013 07:41

[web2py] Re: we2py sql fetch

2013-12-17 Thread Jayadevan M
013 08:25:01 UTC-6, Jayadevan M wrote: >> >> No. The number of fetches go up when the number of records go up. It is a >> very simple test case. First I inserted 100 records. >> insert into myt (nm, title) select generate_series(1,100), 'A'; >> >> There was ju

[web2py] Re: we2py sql fetch

2013-12-17 Thread Jayadevan M
I did a pip install psycopg2. If it is there,web2py will use it by default? Now the repeat fetches have disappeared. On Tuesday, December 17, 2013 7:58:26 PM UTC+5:30, Massimo Di Pierro wrote: > > What if you use psycopg2? > > Massimo > > On Tuesday, 17 December 2013 08:25:01

Re: [web2py] Re: sessions2trash cron

2013-12-17 Thread Jayadevan M
https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh#L145 > uwsgi takes care of it with the default setup, with the added bonus that > the user running uwsgi has all the necessary permission to run that script. > > On Tuesday, December 17, 2013 7:04:19 A

[web2py] Re: web2py logging

2013-12-19 Thread Jayadevan M
3:42:07 PM UTC+5:30, Jayadevan M wrote: > > Hi, > I am trying to get logging working. Quite a few doubts. This is the entry > in logging.conf > [logger_myapp] > level=INFO > qualname=web2py.app.myapp > handlers=rotatingFileHandler > propagate=0 > > Where will the l

[web2py] Different applications usiong same set of tables

2014-01-07 Thread Jayadevan M
I have an application app1. I want to create another application - app2 which will use the same set of tables as used by app1. For this, what I have to do is create a tables.py under app2/models and mention migrate=False for the common tables. Is that right? Do I have to set fake_migrate=True a

[web2py] Re: Different applications usiong same set of tables

2014-01-07 Thread Jayadevan M
able files according to your model, so > you'll get (assuming the connection string is identical) exactly the same > files that you can find under app1/databases/ > > On Tuesday, January 7, 2014 12:44:10 PM UTC+1, Jayadevan M wrote: >> >> I have an application app1.

[web2py] auth.enable_record_versioning

2014-01-08 Thread Jayadevan M
A question about record versioning. Is it possible to have this ON and still *not keep* deleted versions of the record in the original table? 2 reasons - 1) When there are tables with a number of deletes, the table will become huge 2) If we are using hand-written SQLs in many places, we have

[web2py] Re: !! NEW ADMIN !!

2014-01-09 Thread Jayadevan M
Hello, How can I 'install' the plugin? On Tuesday, January 7, 2014 2:49:54 AM UTC+5:30, samuel bonill wrote: > > > Admin > > Plus(A-Plus) is a web2py plugin that provides an easy-to-use interface for > man

[web2py] Re: auth.enable_record_versioning

2014-01-09 Thread Jayadevan M
callbacks > > That way you can customize to whatever degree you like what happens when a > row gets deleted/updated/inserted at any step. > > On Thursday, January 9, 2014 3:46:27 AM UTC+1, Jayadevan M wrote: >> >> A question about record versioning. Is it possible to have

[web2py] Re: !! NEW ADMIN !!

2014-01-09 Thread Jayadevan M
Hi, I tried this in my 'test' app which has just 2 tables (blog_post, emp). It worked great. Thanks. When I try in this my actual app with 50+ tables, the list of tables displayed in " 127.0.0.1:8000/

[web2py] scheduler question

2014-01-15 Thread Jayadevan M
A couple of questions about web2py scheduler - 1) I have configured web2py using nginx znd uwsgi on CentOS. These services will automatically restart if the server reboots. How can I ensure that web2py scheduler also restarts? 2) Is this the right way of starting the scheduler from command line?

[web2py] web2py and PostgreSQL drivers

2014-01-16 Thread Jayadevan M
I was using pg8000 with web2py. Recently I installed psycopg2. But web2py is still using pg8000. What could be the reason? The script to start web2py in admin mode has the following - source /opt/python2.7/bin/activate which python python -V pip freeze /var/www/web2py/web2py.py -a password -p

[web2py] Re: web2py and PostgreSQL drivers

2014-01-16 Thread Jayadevan M
:28:11 PM UTC+5:30, Jayadevan M wrote: > > I was using pg8000 with web2py. Recently I installed psycopg2. But web2py > is still using pg8000. What could be the reason? The script to start web2py > in admin mode has the following - > > source /opt/python2.7/bin/activate > whi

[web2py] running scheduler under a user

2014-01-21 Thread Jayadevan M
I wanted to set up the scheduler and execute a few jobs. To prevent the python files being executed by other users, I have added a condition auth.has_membership('scheduler') in the functions. How can I make the scheduler start with a user who in in the scheduler group? Or I am going down the wr

[web2py] google login and scheduler/appadmin etc

2014-01-21 Thread Jayadevan M
I have enabled google login. Once that is done, when I start web2py for admin activities (127.0.0.1) with password, I can go to the admin interface and then to edit of . But from Edit, if I click on database administration, it errors out. That link points to redirects to 127.0.0;1/myapp/appa

[web2py] scheduler files

2014-01-21 Thread Jayadevan M
In web2py, which is the 'right' place to put the python files with scheduler functions? Right now I have it under controllers. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/lis

[web2py] pass as parameter or import

2014-01-21 Thread Jayadevan M
>From my scheduler function under models, I can call my function under modules like this mymodule.myfunction(db) I can also do it this way - In db.py, from gluon import current .. current.db = db In my function in modules, do from gluon import current .. db = curr

[web2py] check for record and proceed with index only scan

2014-01-22 Thread Jayadevan M
I am checking for existence of record in a table cond = db.mytable(id=someid) if not cond : do something This works fine. The query executed selects *all* columns and adds LIMIT 1 OFFSET 0; The LIMIT and OFFSET are OK. Since I want to just check for existence of a record, how can I rewrite th

[web2py] Re: running scheduler under a user

2014-01-22 Thread Jayadevan M
by other users > """ > seems to point to the security of the server itself, that web2py can't > really manage. > > Can you be clearer ? > > On Tuesday, January 21, 2014 10:22:04 AM UTC+1, Jayadevan M wrote: >> >> I wanted to set up the scheduler an

Re: [web2py] check for record and proceed with index only scan

2014-01-22 Thread Jayadevan M
wrote: > Oops. That should be > cond = db(db.mytable.id==someid).select(db.mytable.id) > > > On 22 January 2014 13:50, Johann Spies wrote: > >> cond = db.mytable(id=someid).select(db.mytable.id) >> >> Regards >> Johann >> >> >> On 22 Janu

Re: [web2py] check for record and proceed with index only scan

2014-01-22 Thread Jayadevan M
Sorry. It works (I got something wrong earlier) but the limit has gone away. I just have to ensure that there is ay least one record. On Wed, Jan 22, 2014 at 5:28 PM, Jayadevan M wrote: > I tried that. I get the error - > 'Row' object has no attribute 'select' &g

Re: [web2py] check for record and proceed with index only scan

2014-01-22 Thread Jayadevan M
would like to have is SELECTFROM mytable WHERE (id = someid) LIMIT 1 ; On Wednesday, January 22, 2014 5:36:00 PM UTC+5:30, Jayadevan M wrote: > > Sorry. It works (I got something wrong earlier) but the limit has gone > away. I just have to ensure that there is ay least one record. >

[web2py] web2py db.py db._common_fields.append(auth.signature) value not in database error

2014-01-31 Thread Jayadevan M
In our system with some data in the tables, I added to db.py: db._common_fields.append(auth.signature) This added the requisite columns. But When I try to edit the records from appadmin, I get the error "value not in database" for the signature columns. So I go to psql and update all the "signatu

[web2py] db._common_fields.append(auth.signature) and is_active

2014-01-31 Thread Jayadevan M
I have set db._common_fields.append(auth.signature), but not enabled record_versioning. Will web2py still use is_active column for filtering/fetching data from the tables? By seeing the queries executed in the database log, my conclusion is No, the filter is not applied. Just for confirmation.

[web2py] web2py scheduler

2014-02-02 Thread Jayadevan M
When I queue a taks using - scheduler.queue_task('demo1', pvars=dict(a=1,b=2), repeats = 0, period = 180) how do I know it has been queued? I don't see a record in scheduler_task. By theway, I don't have any worker running. -- Resources: - http://web2py.com - http://web2py.

[web2py] Re: web2py scheduler

2014-02-02 Thread Jayadevan M
y, February 2, 2014 1:05:30 PM UTC+1, Jayadevan M wrote: >> >> When I queue a taks using - >> scheduler.queue_task('demo1', pvars=dict(a=1,b=2), >> repeats = 0, period = 180) >> how do I know it has been queued? I don't see a record

[web2py] web2py scheduler

2014-02-02 Thread Jayadevan M
I have a file job.py under models. In that I have def send_email_invites(): I added a task that says job/send_email_invites. The task errors out saying Traceback (most recent call last): File "/var/www/web2py/gluon/scheduler.py", line 229, in executor "name '%s' not found in scheduler's e

[web2py] Re: web2py scheduler

2014-02-02 Thread Jayadevan M
OK. I shouldn't have 'jobs/send_email_invites' , just 'send_email_invites' On Sunday, February 2, 2014 8:57:18 PM UTC+5:30, Jayadevan M wrote: > > I have a file job.py under models. > In that I have > def send_email_invites(): > I added a task that says

[web2py] web2py mail

2014-02-05 Thread Jayadevan M
When I try to execute the email program, I get this error - web2py - WARNING - Mail.send failure:[Errno 111] Connection refused I think iptables on the machine where web2py is running is blocking the request. Which port should I open to let this through? The code works on my m/c, which does not

[web2py] Re: web2py mail

2014-02-05 Thread Jayadevan M
Yes. I stopped iptables and the program worked. Kindly let me know which port I should open. On Wednesday, February 5, 2014 4:17:28 PM UTC+5:30, Jayadevan M wrote: > > When I try to execute the email program, I get this error - > web2py - WARNING - Mail.send failure:[Errno 111] C

[web2py] Re: web2py mail

2014-02-05 Thread Jayadevan M
Answer was 587. iptables -A OUTPUT -p tcp -m tcp --dport 587 -j ACCEPT On Wednesday, February 5, 2014 4:26:38 PM UTC+5:30, Jayadevan M wrote: > > Yes. I stopped iptables and the program worked. Kindly let me know which > port I should open. > > On Wednesday, February 5, 2014 4:17

[web2py] sessions2trash.py

2014-02-05 Thread Jayadevan M
I have set the sessions2trash script in my web2py.ini (for uwsgi) like this - cron = 0 0 -1 -1 -1 python /var/www/web2py/web2py.py -Q -S myapp -M -R scripts/sessions2trash.py -A -o -v My uwsgi.log says [uwsgi-cron] command "python /var/www/web2py/web2py.py -Q -S myapp -M -R scripts/session

[web2py] Re: sessions2trash.py

2014-02-05 Thread Jayadevan M
you'll see the verbose output (given you're > passing -v as an option) > > On Wednesday, February 5, 2014 2:26:04 PM UTC+1, Jayadevan M wrote: >> >> I have set the sessions2trash script in my web2py.ini (for uwsgi) like >> this - >> >&g

Re: [web2py] Re: sessions2trash.py

2014-02-05 Thread Jayadevan M
Thanks for the reply. Let me provide more info. May be I missed something very basic. I am replying inline to your/Ricardo's comments. "BTW..you're 10 steps ahead.but you're calling it wrongly :-P" I guess I am calling it wrongly. Did not get the 10 steps ahead part "the args of th

[web2py] web2py and prepared statements

2014-02-08 Thread Jayadevan M
When web2py is used with PostgreSQL and psycopg2, are prepared statements sent to the database or the statements will go through the parse/analysis step for each user/call? http://www.postgresql.org/docs/9.2/static/sql-prepare.html -- Resources: - http://web2py.com - http://web2py.com/book (Doc

[web2py] Re: How to do a complex migration?

2014-02-09 Thread Jayadevan M
I am running into issues when changing data from varchar to decimal - S' column "percentage__tmp" is of type numeric but expression is of type character varying\nLINE 1: UPDATE user_academics SET percentage__tmp=percentage;\n ^\nHINT: You will n

[web2py] web2py data type change

2014-02-09 Thread Jayadevan M
I have a field marked integer. In the table definition under models, I changed it to double. But web2py did not attempt any change to the table definition in PostgreSQL - type integer stayed integer. Is this expected? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: web2py and prepared statements

2014-02-09 Thread Jayadevan M
Web2py/psycopg2 does not use prepared statements. Right? On Monday, February 10, 2014 1:41:03 AM UTC+5:30, Niphlod wrote: > > no, it doesn't. > > On Sunday, February 9, 2014 8:39:26 AM UTC+1, Jayadevan M wrote: >> >> When web2py is used with PostgreSQL and psyc

[web2py] Permissions for files

2014-02-10 Thread Jayadevan M
When I work in the development environment (virtualbox centos) and then move the application to production server, I always run into permission issues. The extracted (from tar) files will have userid and grouid as some numbers, or "root". Eventually I do a chown -R nginx to all files under web2

[web2py] scheduler task allocation process

2014-02-11 Thread Jayadevan M
Once in a while, the scheduler is brought down as part of uwsgi reload. Thenscheduler_task and scheduler_run have statuses in RUNNING and I can't get them to start again properly. So I tried deleting all records from scheduler_run, and updating the task table too. But that did not help. Right n

[web2py] web2py scheduler

2014-02-11 Thread Jayadevan M
How can I debug a scheduler task that goes into RUNNING status and never changes to any other status? The same function, when called from web2py in shell mode, does what it is expected to do and exits normally. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://

[web2py] we2py google login - erroring out

2014-03-07 Thread Jayadevan M
We are using google login for authorization. Till a few hours ago, it was working fine. All of a sudden (no code changes, nothing), we started getting tickets. Error is " Cannot parse oauth server response {\n "access_token" : "ya29.1.AADtN_Xz2PgzK2sZozKOvLlHP6QkDc.." Anyone faced such issues

[web2py] Re: we2py google login - erroring out

2014-03-07 Thread Jayadevan M
eturn format? On Friday, March 7, 2014 3:45:52 PM UTC+5:30, Jayadevan M wrote: > > We are using google login for authorization. Till a few hours ago, it was > working fine. All of a sudden (no code changes, nothing), we started > getting tickets. Error is > " Cannot parse

Re: [web2py] Re: we2py google login - erroring out

2014-03-07 Thread Jayadevan M
PM UTC+5:30, Michele Comitini wrote: > > What Content-type is the oauth response from google? > > > 2014-03-07 13:25 GMT+01:00 Jayadevan M > >: > >> Debugged and now we know this is where it is going - >> tokendata = cgi.parse_qs(data) >> tokendata, after this

Re: [web2py] Re: we2py google login - erroring out

2014-03-07 Thread Jayadevan M
you check if this works for you? > > Thank you! > mic > > > > 2014-03-07 14:21 GMT+01:00 Jayadevan M > >: > >> Looks like they changed to >> application/json; charset=utf-8 >> I changed the code from >> >> if not resp_type or resp_t

[web2py] SQLFORM.grid and in-place-update

2014-04-21 Thread Jayadevan M
I am learning how to use SQLFORM.grid. I am able to display a set of records. 1) If the user clicks on Edit for a record, it goes to a new page and also displays all the columns (though I chose only a few fields in the grid). How can I avoid that? 2) Is it possible to update multiple records in

[web2py] Re: SQLFORM.grid and in-place-update

2014-04-21 Thread Jayadevan M
y' else: for row in ids: print row db(db.s_user.id == row).update(is_verified=1) pass pass return '' On Tuesday, April 22, 2014 10:28:27 AM UTC+5:30, Jayadevan M wrote: > > I

[web2py] sqlform.smartgrid applying a filter to the table

2014-04-22 Thread Jayadevan M
How can I apply a filter to smartgrid? My smartgrid will get data from my_table. I want to apply a filter my_table.mycolumn=somevalue. How can this be done? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.

[web2py] Re: sqlform.smartgrid applying a filter to the table

2014-04-22 Thread Jayadevan M
That worked. Thank you. On Tuesday, April 22, 2014 2:37:09 PM UTC+5:30, 黄祥 wrote: > > i think you can achieve it using constraints. > e.g. > def category(): > query = db.category.is_active==True > grid = SQLFORM.smartgrid(db.category, constraints = dict(category = > query) ) > return

[web2py] smartgrid orderby clause

2014-04-22 Thread Jayadevan M
I have an SQLFORM.grid which I modified to SQLFORM.smartgrid. There is a problem, the orderby clause throws an error. Query Not Supported: missing FROM-clause entry for table "s_user" LINE 1: ...RE (user_current_academics.user_id = 11) ORDER BY s_user.fir... ^ No records found If I comment out

[web2py] Re: i am trying send email using web2py with gmail and using smtp setting i have attached all code

2014-04-24 Thread Jayadevan M
Try printing the value in [email] just before the mail command. On Thursday, April 24, 2014 1:29:47 AM UTC+5:30, Jessica Le wrote: > > > I've been getting the following error: > > ***WARNING:web2py:Mail.send failure:[Errno 11004] getaddrinfo failed*** > > for the following code: > > mail

[web2py] web2py logging logging.conf multiple files

2014-08-08 Thread Jayadevan M
I have web2py logging set up using logging.conf like this - args=("logs/my_log.log", "a", 100, 5) But I end up with many small files like this - 166 Aug 8 05:48 my_log.log.1 34011 Aug 8 07:16 my_log.log.2 28650 Aug 8 10:36 my_log.log.3 9593 Aug 8 10:37 my_log.log.4 3222 Au

[web2py] Re: web2py logging logging.conf multiple files

2014-08-10 Thread Jayadevan M
On Sunday, August 10, 2014 8:23:56 AM UTC+5:30, Leonel Câmara wrote: > > That's not really an issue, it's using a rotating log, once log reaches > max size it creates one of those numbered ones, copies the content there > and creates a new one. Your most recent log is the file without a number.