Re: [web2py] Re: web2py behind socks proxy

2016-08-30 Thread Saifuddin Rangwala
So here is my deployment scenario for web2py: web2py is running on AWS. I have a 4 node setup on AWS: 1 load balancer, 2 webpy behind nginx with uwsgi and 1 postgres database. nginx is behind the load balancer. All outgress traffic(except local network) from web2py and database nodes has been

[web2py] how to change color and case of form buttons

2016-08-30 Thread Alex Glaros
how to change colors and letter-case in form below form = FORM.confirm('Sure you want to delete this comment?',{'Back':URL(extra_controller)}) My view displays two black converted-to-upper case buttons. Is that they way they are intended to look or am I missing a CSS sheet? thanks, Alex

Re: [web2py] Best way to pre-populate a database on start-up

2016-08-30 Thread Dave S
On Tuesday, August 30, 2016 at 2:48:01 PM UTC-7, Niphlod wrote: > > fabfile ATM is a show-off, and we can't put in there code related to an > app which doesn't exist :P > It should be possible to put a comment block in the fabfile that shows what might be done, but it would still require

[web2py] Re: how to obtain clean URL string

2016-08-30 Thread Dave S
On Tuesday, August 30, 2016 at 3:46:21 PM UTC-7, Alex Glaros wrote: > > .load file sends parent URL to a controller in long form, including alll > parts of the URL: > controller_to_return_to=request.env.http_web2py_component_location > > controller then does a redirect to parent > > how to

[web2py] how to obtain clean URL string

2016-08-30 Thread Alex Glaros
.load file sends parent URL to a controller in long form, including alll parts of the URL: controller_to_return_to=request.env.http_web2py_component_location controller then does a redirect to parent how to get the abreviated form of the URL? The original var controller_to_return_to looks

[web2py] web2py on Android

2016-08-30 Thread Jurgis Pralgauskis
Hi, just curious, anybody tried sth like this (web2py + webview) http://inclem.net/2016/05/07/kivy/python_for_android_webview_support/ ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Best way to pre-populate a database on start-up

2016-08-30 Thread Niphlod
fabfile ATM is a show-off, and we can't put in there code related to an app which doesn't exist :P We can't pin each and every thread a "useful" information is written, as I really don't see how 40 pinned threads will contribute to web2py's knowledge for - and especially - newbies. IMHO at

Re: [web2py] Best way to pre-populate a database on start-up

2016-08-30 Thread Richard Vézina
To be added to the fabfile.py of web2py maybe?! On Tue, Aug 30, 2016 at 3:53 PM, Richard Vézina wrote: > Don't have privileges, but this is a good thread and should be marked as > informative somehow... > > Richard > > On Tue, Aug 30, 2016 at 2:24 PM, Dave S

Re: [web2py] Best way to pre-populate a database on start-up

2016-08-30 Thread Richard Vézina
Don't have privileges, but this is a good thread and should be marked as informative somehow... Richard On Tue, Aug 30, 2016 at 2:24 PM, Dave S wrote: > > > On Tuesday, August 30, 2016 at 6:58:43 AM UTC-7, Richard wrote: >> >> Seems alright do you have issue with this? I

Re: [web2py] Best way to pre-populate a database on start-up

2016-08-30 Thread Niphlod
+1 for Dave . with isempty() in a model you're executing a query for each and every request for absolutely NO REASON. This are activities that needs to be carried on on a post-deployment fire-only-when-needed scenario, and outside the web environment. On Tuesday, August 30, 2016 at 8:24:53 PM

[web2py] Re: scheduler task_id assigned to multiple workers

2016-08-30 Thread Niphlod
if 24cores 200+ GB RAM is the backend, how many transactions per second is that thing handling ? I saw lots of ultrabeefy servers that were poorly configured, hence did have poor performances, but it'd be criminal to blame on the product in that case (also, one the person who configured it).

Re: [web2py] Best way to pre-populate a database on start-up

2016-08-30 Thread Dave S
On Tuesday, August 30, 2016 at 6:58:43 AM UTC-7, Richard wrote: > > Seems alright do you have issue with this? I would put a blank line > between model definition and the "if isempty()". > > I production, once the system get initialize you should remove those > populating fixture to save

[web2py] Re: scheduler task_id assigned to multiple workers

2016-08-30 Thread Jason Solack
the machine is plenty big... another note, when we use mysql on a weaker machine the deadlocks go away, so i feel that this must be something related to MSSQL On Tuesday, August 30, 2016 at 11:48:42 AM UTC-4, Niphlod wrote: > > when the backend has orrible performances :D > 12 workers with the

[web2py] Re: scheduler task_id assigned to multiple workers

2016-08-30 Thread Niphlod
when the backend has orrible performances :D 12 workers with the default heartbeat are easily taken care by a dual core 4GB RAM backend (without anything beefy on top of that). On Tuesday, August 30, 2016 at 5:41:01 PM UTC+2, Jason Solack wrote: > > So after more investigation we are seeing that

[web2py] Re: scheduler task_id assigned to multiple workers

2016-08-30 Thread Jason Solack
So after more investigation we are seeing that our load balanced server with processes runnin on all three machines are causing a lot of deadlocks in MSSQL. Have you seen that before? On Friday, August 19, 2016 at 2:40:35 AM UTC-4, Niphlod wrote: > > yep. your worker setup clearly can't stably

[web2py] Re: custom update form multiple tables and list:string

2016-08-30 Thread Yoel Benitez Fonseca
Solved in some extend: The problem is that each widget is initialized with the record values on the SQLFORM constructor if any, in the case you need to pre-populate the form (http://web2py.com/books/default/chapter/29/07/forms-and-validators#Pre-populating-the-form) it work flawless for all

Re: [web2py] Best way to pre-populate a database on start-up

2016-08-30 Thread Richard Vézina
Seems alright do you have issue with this? I would put a blank line between model definition and the "if isempty()". I production, once the system get initialize you should remove those populating fixture to save execution time as the get execute at each request. What could wizely do is put all

Re: [web2py] Best way to pre-populate a database on start-up

2016-08-30 Thread Yoel Benitez Fonseca
You can use a .CSV file. What i have used to do is: 1.- Define the tables that are being pre-populate. 2.- Insert all the data with appadmin. 3.- Using the appadmin export the data to a .CSV (db_colors.csv) file and put it in the private folder of your app. 4.- Do the same thing you are doing

[web2py] Best way to pre-populate a database on start-up

2016-08-30 Thread Ben Lawrence
At the moment to pre-populate a database, I place this in the db.py model file: db.define_table('color', Field('name','string'), Field('code','string'), format='%(name)s') if db(db.color).isempty(): # create instance of table for k,v in

[web2py] Re: TAG helper and unnamed argument

2016-08-30 Thread Kirill Shatalaev
> > > So, @Kirill, there's no way but ending up with _pubdate='' will give you a > syntactically equivalent markup. > > >>> Well, I see now. Sleazy, but correct. Thank you. P.S. Not sure about others, but we russians have joke about man visiting doctor and "sleazy"... -- Resources: -

[web2py] auth event logging for password reset

2016-08-30 Thread Ivan
After looking at the event logging behaviour for a password reset request, I think that: 1. the default message for the request should be 'User %(id)s Password reset *requested*' (because the psw is not yet changed) 2. it seems that the log message when the user change his password (by the

[web2py] Re: uploads of large files

2016-08-30 Thread Mirek Zvolský
Thank you, Niphlod. I use nginx on production. No idea how current pure solution will behave: -> list of cgi.FieldStorage -> item.value But I will see in praxis. Such solution is good for me, because user can with Ctrl-A mark the whole folder - exactly what I need (it is a data import).

[web2py] Re: Value error when forcing AM/PM time with time field

2016-08-30 Thread H. Das
Ok I found the problem. It turns out if I use IS_NOT_EMPTY(), the submitted time field values get treated like a string rather than a datetime.time object. Instead I changed requires to IS_TIME to get the intended result. On Monday, August 29, 2016 at 10:00:21 PM UTC-4, H. Das wrote: > >

[web2py] I have to manually refresh browser to see load data after submitting form.

2016-08-30 Thread Alex Glaros
What am I doing wrong? After posting a comment: First I see a "Success!" flash that I can't locate source of, and page doesn't refresh (load doesn't display). I hit "refresh page" and I see the correct session flash 'Comment Approved.' from my code and load data correctly displays. thanks,

Re: [web2py] Re: Value error when forcing AM/PM time with time field

2016-08-30 Thread Kiran Subbaraman
Example usage for IS_TIME is detailed in the code: https://github.com/web2py/web2py/blob/a2354addec5a45ea6180528d2b8024588a106743/gluon/validators.py#L2125 Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Tue, 30-08-2016 11:42 AM, H. Das

[web2py] Re: Value error when forcing AM/PM time with time field

2016-08-30 Thread H. Das
Unfortunately it doesn't look like IS_TIME has a format argument. That is odd. from the stacktrace: Field("start_time", "time", requires=IS_TIME(format="%I:%M")), TypeError: __init__() got an unexpected keyword argument 'format' On Tuesday, August 30, 2016 at 1:22:45 AM UTC-4, Dave S wrote: