[web2py] SQLFORM.widget form field length style change after submit

2016-07-13 Thread 黄祥
let say i have a code *models/db.py* db.test.name.requires = IS_NOT_EMPTY() db.test.address.requires = IS_NOT_EMPTY() db.test.name.widget = lambda field,value: SQLFORM.widgets.string.widget(field, value, _placeholder = T('Name should be filled') ) db.test.address.widget = lambda field,value: SQL

[web2py] Re: Nginx & The Welcome App

2016-07-13 Thread pbreit
I think the path to web2py is typically specified in the uwsgi ini file. Something like: pythonpath = /home/www-data/web2py/ Even if you don't use it, the install script can be helpful to look at: https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh -- Resour

Re: [web2py] Hide flash message after some elapsed time instead of on click

2016-07-13 Thread Jim Brouzoulis
Thank you very much for your help! (...and sorry for the late reply) It didn't work at first but then I noticed a typo: the class should be '.w2p_flash'. Regards // Jim Den måndag 11 juli 2016 kl. 10:49:08 UTC+2 skrev Massimiliano: > > Hi Jim, > I’m doing it in this way: > > Edit static/web2p

Re: [web2py] Re: How to display intermediate Data at html page, if function will run till 6-10 hours.

2016-07-13 Thread Dave S
On Wednesday, July 13, 2016 at 12:30:16 PM UTC-7, Chetan Jain wrote: > > while running this file, db is locked. > What to do in such case? > > I find this answer: > > if you can, use a separate db for the scheduler. SQLite doesn't handle > well concurrent writes (with default operational capabil

Re: [web2py] Re: How to display intermediate Data at html page, if function will run till 6-10 hours.

2016-07-13 Thread Chetan Jain
while running this file, db is locked. What to do in such case? I find this answer: if you can, use a separate db for the scheduler. SQLite doesn't handle well concurrent writes (with default operational capabilities), so having the scheduler operating on the same database of your "insertion" of

Re: [web2py] Re: How to display intermediate Data at html page, if function will run till 6-10 hours.

2016-07-13 Thread Chetan Jain
is this the correct command to run : python web2py.py -S social -M -X -R applications/social/private/sms_queue.py? Best, Chetan Jain On Thu, Jul 14, 2016 at 12:43 AM, Dave S wrote: > > > On Wednesday, July 13, 2016 at 12:03:31 PM UTC-7, Chetan Jain wrote: >> >> Finally, as described in Chapter

Re: [web2py] Re: How to display intermediate Data at html page, if function will run till 6-10 hours.

2016-07-13 Thread Dave S
On Wednesday, July 13, 2016 at 12:03:31 PM UTC-7, Chetan Jain wrote: > > Finally, as described in Chapter 4, we need to run the mail_queue.py > script as if it were inside a controller in our app: > > 1 > > python web2py.py -S app -M -N -R applications/app/private/mail_queue.py > > where -S app

Re: [web2py] Re: How to display intermediate Data at html page, if function will run till 6-10 hours.

2016-07-13 Thread Chetan Jain
Finally, as described in Chapter 4, we need to run the mail_queue.py script as if it were inside a controller in our app: 1 python web2py.py -S app -M -N -R applications/app/private/mail_queue.py where -S app tells web2py to run "mail_queue.py" as "app", -M tells web2py to execute models, and -N

Re: [web2py] Re: How to display intermediate Data at html page, if function will run till 6-10 hours.

2016-07-13 Thread Dave S
On Wednesday, July 13, 2016 at 11:52:51 AM UTC-7, Chetan Jain wrote: > > python web2py.py -S social -M -N -R > applications/social/private/sms_queue.py > Usage: python web2py.py > > web2py.py: error: no such option: -N > > What are you expecting -N to do? The actual command line options are li

Re: [web2py] Re: How to display intermediate Data at html page, if function will run till 6-10 hours.

2016-07-13 Thread Chetan Jain
python web2py.py -S social -M -N -R applications/social/private/sms_queue.py Usage: python web2py.py web2py.py: error: no such option: -N Best, Chetan Jain On Wed, Jul 13, 2016 at 11:39 PM, Dave S wrote: > > > On Wednesday, July 13, 2016 at 9:31:13 AM UTC-7, Chetan Jain wrote: >> >> Hi Anthon

Re: [web2py] Re: How to display intermediate Data at html page, if function will run till 6-10 hours.

2016-07-13 Thread Dave S
On Wednesday, July 13, 2016 at 9:31:13 AM UTC-7, Chetan Jain wrote: > > Hi Anthony, > > >Scenario is : I've to send a 'status' SMS to a phone_number after every > 30 minutes and Append its Status statement on a webpage, Since I have to > send SMS after every 30 minutes, I have to call func

[web2py] Re: Nginx & The Welcome App

2016-07-13 Thread Dave S
On Wednesday, July 13, 2016 at 5:48:21 AM UTC-7, Mark Billion wrote: > > Nginx redirects my users from the website to the > website/welcome/indexmy app is t4. Ive tried to configure the Web2py > sites enabled to fix it, but it fails. Here is the w2p sites enabled > fileany thoughts w

[web2py] Re: onvalidation error for nonSQLFORM but request.vars

2016-07-13 Thread lucas
so what do you think? couldn't code be added to allow for the search and DIV(red error box) on the final html form/DOM regardless of if the field exists in the original SQLFORM? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

Re: [web2py] Re: How to display intermediate Data at html page, if function will run till 6-10 hours.

2016-07-13 Thread Chetan Jain
Hi Anthony, Scenario is : I've to send a 'status' SMS to a phone_number after every 30 minutes and Append its Status statement on a webpage, Since I have to send SMS after every 30 minutes, I have to call function after 30 minutes each. This is what i'm trying to implement, I've already coded

[web2py] Re: Nginx & The Welcome App

2016-07-13 Thread pbreit
Yeah, I think either need to rename your app directory "init" or add a routes.py file in your web2py directory with: routers = dict( BASE = dict(default_application='myapp'),) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: Nginx & The Welcome App

2016-07-13 Thread Antonio Salazar
Have you changed your default application? http://web2py.com/books/default/chapter/29/04/the-core#Application-init On Wednesday, July 13, 2016 at 7:48:21 AM UTC-5, Mark Billion wrote: > > Nginx redirects my users from the website to the > website/welcome/indexmy app is t4. Ive tried to confi

[web2py] Re: Angularjs calls to web2py rest api

2016-07-13 Thread botasservice
I've tried this type of view (default/index.html): [[ myData.id ]] var app = angular.module('myApp', []); app.controller('testCtrl',function($scope,$http){ $http.get("http://127.0.0.1:8000/api/test/10";).then(function(res

[web2py] Re: Nginx & The Welcome App

2016-07-13 Thread Jim S
So, it's getting to your web2py site and displaying the welcome app instead of yours, right? If that is the case, then what does your routes.py look like? I use routes.py to direct traffic to the correct application. -Jim On Wednesday, July 13, 2016 at 7:48:21 AM UTC-5, Mark Billion wrote: >

[web2py] Re: creating an accessible file with public access

2016-07-13 Thread Aydin
OK, I could read the file. The permission of it was OK; it was that I had a typo in my url. if someone wants to change the permission of a file os.chmod can do it. I'm gonna go with the external sharing of the databases tho. On Tuesday, July 12, 2016 at 4:03:53 PM UTC-4, Aydin wrote: > > I'm us

[web2py] Nginx & The Welcome App

2016-07-13 Thread Mark Billion
Nginx redirects my users from the website to the website/welcome/indexmy app is t4. Ive tried to configure the Web2py sites enabled to fix it, but it fails. Here is the w2p sites enabled fileany thoughts would be much appreciated. server { listen 80; server_n

[web2py] Re: How to implement token based restful api in web2py

2016-07-13 Thread botasservice
Massimo, i've downloaded your example with APIMaker and getting error: json() got an unexpected keyword argument 'indent' File "applications\collection2\modules\apimaker.py", line 294, in process return response.json(res, indent=2)+'\n' вторник, 12 июля 2016 г., 11:39:18 UTC+3 пользователь