Re: [web2py] multiple controllers

2016-08-09 Thread Massimo Di Pierro
Actually this is literally "Rocket" science. :-) On Monday, 8 August 2016 10:09:03 UTC-5, icodk wrote: > > Thanks Richard > I fixed it by restarting the Rocket server. > Sorry, not a rocket science, I should be able to figure it out. > > On Monday, August 8, 2016 at 3:47:55 PM UTC+2, Richard wrot

[web2py] Re: Ubuntu 16.04 - installation script stops

2016-08-09 Thread LMK
You can modify below lines in the script: From: /etc/init.d/nginx start start uwsgi-emperor To: service nginx start service emperor.uwsgi start (coz no longer init.d and upstart in ubuntu 16.04) On Monday, August 8, 2016 at 11:09:51 PM UTC+6:30, mweissen wrote: > > I have tried to setup a new

[web2py] Re: Email not working

2016-08-09 Thread Massimo Di Pierro
There is some problem with Gmail security settings. I am not sure what they are. It stopped working at some point less than one year ago. I have been using spakpostmail since then with no issues: server = smtp.sparkpostmail.com:587 sender = login = tls= true ssl= false

Re: [web2py] multiple controllers

2016-08-09 Thread icodk
+1 On Tuesday, August 9, 2016 at 10:05:02 AM UTC+2, Massimo Di Pierro wrote: > > Actually this is literally "Rocket" science. :-) > > On Monday, 8 August 2016 10:09:03 UTC-5, icodk wrote: >> >> Thanks Richard >> I fixed it by restarting the Rocket server. >> Sorry, not a rocket science, I should

[web2py] Re: Ubuntu 16.04 - installation script stops

2016-08-09 Thread Martin Weissenboeck
Thank you for this script. I am using a dedicted server from noez.de and it is possible to choose one of a lot of operating systems. I have choosen Ubuntu 16.04. I have tried: wget https://gist.githubusercontent.com/niphlod/8a13025001363657f0201b2a15dad41c/raw/482fd6973d3c73c415c610dcaf64cd6d8327c

[web2py] Re: Ubuntu 16.04 - installation script stops

2016-08-09 Thread Niphlod
ahem. maybe a dos2unix first solves it. On Tuesday, August 9, 2016 at 11:39:56 AM UTC+2, mweissen wrote: > > Thank you for this script. I am using a dedicted server from noez.de and > it is possible to choose one of a lot of operating systems. I have choosen > Ubuntu 16.04. > > I have tried: > w

[web2py] Re: Get Distinct dates

2016-08-09 Thread Marlysson Silva
Use of a SET in list returned of result. Em segunda-feira, 8 de agosto de 2016 15:21:58 UTC-3, madhu nomula escreveu: > > Hello, > > In Web2py database we have date entries. Need to get distinct dates and > bind to a dropdown control. But I am unable to get : > > Please find code below: > Contro

[web2py] Re: Ubuntu 16.04 - installation script stops

2016-08-09 Thread Mirek Zvolský
If you have lot of time, you can test if this script works: https://github.com/zvolsky/web2py/blob/zvolsky_rejected/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh Here I try use systemctl instead of start. Dne pondělí 8. srpna 2016 18:39:51 UTC+2 mweissen napsal(a): > > I have tried to setup a

[web2py] Re: Ubuntu 16.04 - installation script stops

2016-08-09 Thread Mirek Zvolský
Or maybe all is properly installed but the service control command is unknown. So you can just try the systemctl command from bottom of (patched) script: sudo systemctl restart nginx sudo systemctl restart emperor.uwsgi Dne úterý 9. srpna 2016 14:03:18 UTC+2 Mirek Zvolský napsal(a): > > If

[web2py] Re: Ubuntu 16.04 - installation script stops

2016-08-09 Thread Martin Weissenboeck
Ok, I'll try it. It takes only about 15 minutes to get new "fresh" server. Am 09.08.2016 14:03 schrieb "Mirek Zvolský" : > > If you have lot of time, you can test if this script works: > > https://github.com/zvolsky/web2py/blob/zvolsky_rejected/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh > > Here I

[web2py] Re: web2py admin - cannot install plugin - bug??

2016-08-09 Thread Mirek Zvolský
Yes, .w2p. It is my plugin, I have packed it in one web2py app using admin (and in ark I see all ~5 files inside), In second app I am trying to install/unpack it. Plugin is in attachment. I have renamed all files to managegroups (without underscore) too, to see if problem isn't the 2nd undersco

[web2py] Re: Get Distinct dates

2016-08-09 Thread Niphlod
let the backend do set operations: it's by far faster than pure python (saves bandwith, too) On Tuesday, August 9, 2016 at 12:49:35 PM UTC+2, Marlysson Silva wrote: > > Use of a SET in list returned of result. > > Em segunda-feira, 8 de agosto de 2016 15:21:58 UTC-3, madhu nomula > escreveu: >>

[web2py] Re: Get Distinct dates

2016-08-09 Thread Marlysson Silva
Backend: database or language programming? Em terça-feira, 9 de agosto de 2016 09:59:37 UTC-3, Niphlod escreveu: > > let the backend do set operations: it's by far faster than pure python > (saves bandwith, too) > > On Tuesday, August 9, 2016 at 12:49:35 PM UTC+2, Marlysson Silva wrote: >> >> Use

[web2py] Re: Get Distinct dates

2016-08-09 Thread Niphlod
database. On Tuesday, August 9, 2016 at 3:08:20 PM UTC+2, Marlysson Silva wrote: > > Backend: database or language programming? > > Em terça-feira, 9 de agosto de 2016 09:59:37 UTC-3, Niphlod escreveu: >> >> let the backend do set operations: it's by far faster than pure python >> (saves bandwit

[web2py] Re: Ubuntu 16.04 - installation script stops

2016-08-09 Thread Ron Chatterjee
Does someone has a similar script for sun solaris? -- 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 subscribed to

[web2py] Re: Email not working

2016-08-09 Thread Ron Chatterjee
Fastmail works too. -- 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 subscribed to the Google Groups "web2py-us

[web2py] Setting process title at web2py startup

2016-08-09 Thread Michael Ellis
I'm running web2py in conjunction with a suite of other, independent, python processes. In development I often want to 'ps' or kill the entire suite from the command line. I've found the Python setproctitle module really useful for prepending a common label to all the process titles. In each

[web2py] Reading date from controller to view in web2py

2016-08-09 Thread madhu nomula
Hi, I am trying to read date output from controller, but I am getting value in View as decimal values: controller Code: rowslistPeriod = db(( (db.AM.resource_id==db.auth_user.id)& (db.auth_user.id==auth.user.id) ).select(db.auth_user.first_name,db.db.Solut

[web2py] How to access class variable in web2py like we do in flask?

2016-08-09 Thread Ron Chatterjee
I am trying to convert the mini chat flask application to web2py. link: https://github.com/sdiehl/minichat (1) in the flask code, I can access rooms. and users. %flask output. users {u'test': <__main__.User object at 0x03A7F198>} When I do a conversion in web2py, I can't access the clas

[web2py] need code to update db from view to controller.

2016-08-09 Thread madhu nomula
Hi , In Web2 py tool need sample code to update db table(module) from View value to ---> Controller code for updating: View code : ajax('{{=URL('update_data')}}',['org_id','solution_id','activity_id','effort'],'target'); Controller code: def update_data(): for u in request.vars.or

[web2py] Re: Reading date from controller to view in web2py

2016-08-09 Thread Dave S
On Tuesday, August 9, 2016 at 9:09:08 AM UTC-7, madhu nomula wrote: > > Hi, > > I am trying to read date output from controller, but I am getting value in > View as decimal values: > Which DB backend are you using? Can you show your define_table() code? /dps > > controller Code: > >ro

Re: [web2py] Re: Reading date from controller to view in web2py

2016-08-09 Thread madhu nomula
db.define_table('ActivityMapping', Field('mapping_id'), Field('resource_id',db.auth_user), Field('org_id',db.Organization), Field('solution_id',db.Solution), Field('activity_id',db.Activity), Field('acti

[web2py] Re: Reading date from controller to view in web2py

2016-08-09 Thread madhu nomula
db.define_table('AM', Field('mapping_id'), Field('resource_id',db.auth_user), Field('org_id',db.Organization), Field('solution_id',db.Solution), Field('activity_id',db.Activity), Field('activity_date','d

[web2py] Re: Recommendations on where to store translation strings

2016-08-09 Thread Jimbo
Aha, I see. I have probably exercised a lot of my views during development so I got the impression that stating my T's in the models automatically added them to translation. I will investigate the options you proposed, thanks for the pointers! -- Resources: - http://web2py.com - http://web2py.

Re: [web2py] Re: Reading date from controller to view in web2py

2016-08-09 Thread Dave S
On Tuesday, August 9, 2016 at 10:56:48 AM UTC-7, madhu nomula wrote: > > db.define_table('ActivityMapping', > Field('mapping_id'), > Field('resource_id',db.auth_user), > Field('org_id',db.Organization), > Field('solution_id',db.S

Re: [web2py] Re: Reading date from controller to view in web2py

2016-08-09 Thread Niphlod
the problem is not the resultset: it's how it's injected into the view On Tuesday, August 9, 2016 at 8:28:23 PM UTC+2, Dave S wrote: > > > > On Tuesday, August 9, 2016 at 10:56:48 AM UTC-7, madhu nomula wrote: >> >> db.define_table('ActivityMapping', >> Field('mapping_id'), >

Re: [web2py] Re: Reading date from controller to view in web2py

2016-08-09 Thread madhu nomula
Actually my requirement is to compare this result with a value from a dropdown selected item. Could you please suggest me the best option to capture from view to get date instead on decimal forrmat. On Wed, Aug 10, 2016 at 12:28 AM, Niphlod wrote: > the problem is not the resultset: it's how it's

Re: [web2py] multiple controllers

2016-08-09 Thread Richard Vézina
I open this issue : https://github.com/web2py/web2py/issues/1421 It should maybe move into web2py-book issue tracker... Richard On Tue, Aug 9, 2016 at 4:30 AM, icodk wrote: > +1 > > > On Tuesday, August 9, 2016 at 10:05:02 AM UTC+2, Massimo Di Pierro wrote: >> >> Actually this is literally "Ro

Re: [web2py] Re: Email not working

2016-08-09 Thread Valdeck Rowe
Thanks, Will try them out and let you know. "Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts.

[web2py] Re: How to access class variable in web2py like we do in flask?

2016-08-09 Thread Niphlod
The solution lies in knowing web2py's unique execution model (which is BY FAR different from Flask's) AND reading the source code. When faced with the same problem years ago, finding the solution (was already there, as it is now) made me a better coder, so I won't - on purpose - propose a cut&p

[web2py] Re: How can I get a single link to redirect to a view based on user group?

2016-08-09 Thread 黄祥
yes, you are right, thanks for correct me. best regards, stifan On Tuesday, August 9, 2016 at 7:31:34 AM UTC+7, Anthony wrote: > > On Monday, August 8, 2016 at 4:47:00 AM UTC-4, 黄祥 wrote: >> >> pls try (not tested) >> models/db.py >> >> has_membership_bondsman = auth.has_membership('bondsman') >>

[web2py] Re: How to access class variable in web2py like we do in flask?

2016-08-09 Thread Ron Chatterjee
I tried to define those classes in db.py to make them global and accessible. But that didn't work. Not sure if I see any solution to your answer. Am I missing any hint? lol On Tuesday, August 9, 2016 at 4:59:37 PM UTC-4, Niphlod wrote: > > The solution lies in knowing web2py's unique execution m

Re: [web2py] Re: Reading date from controller to view in web2py

2016-08-09 Thread Dave S
On Tuesday, August 9, 2016 at 12:24:11 PM UTC-7, madhu nomula wrote: > > Actually my requirement is to compare this result with a value from a > dropdown selected item. > Could you please suggest me the best option to capture from view to > get date instead on decimal forrmat. > So you're j

[web2py] redirect to caller function

2016-08-09 Thread marchaos
Probably a very basic question, but I wasn't able to find a solution for this. Let's assume I have a bunch of functions associated to views like: def ItemsByID(): items=db(…).select(orderby=…id) return locals() def ItemsByDate(): items=db(…).select(orderby=…date) return locals() the views

[web2py] Re: redirect to caller function

2016-08-09 Thread 黄祥
your requirement is redirect to the link base on *who* was calling add function, so i assume it related with user logged in, and it's membership pls try (not tested): def add(): form = SQLFORM(db…) if form.process().accepted: if auth.has_membership(ItemsById): redirect(URL('ItemsById') ) else: red

[web2py] Re: redirect to caller function

2016-08-09 Thread Dave S
On Tuesday, August 9, 2016 at 3:52:21 PM UTC-7, marchaos wrote: > > Probably a very basic question, but I wasn't able to find a solution for > this. > > Let's assume I have a bunch of functions associated to views like: > > def ItemsByID(): > items=db(…).select(orderby=…id) > return locals() >

[web2py] Re: select() and iterselect()

2016-08-09 Thread 黄祥
base on my first post, what is the best choice in term of performance (memory consuming, faster result) for this case? rows = db(db.account.investor == investor).select(orderby = ~db.account.id) *vs* rows_pie_subscription = db(db.account.investor == investor).iterselect(orderby = ~db.account.id)

Re: [web2py] need code to update db from view to controller.

2016-08-09 Thread Kiran Subbaraman
In the controller, is your code entering the `if` checks? And am guessing the totalrecords is initialized before you do a `totalrecords=totalrecords+1`? Noticed that you are using `update_record` and `update` in your code. Do take a look at this: http://web2py.com/books/default/chapter/29/06/th