[web2py] uwsgi: strange messages

2015-02-02 Thread Martin Weissenboeck
Two questions about uwsgi: *(1) Server one: *I have installed nginx+uwsgi using the script on a test server. web2py works fine, but the uwsgi.log file shows a new entry every second (marked red). And there is a warning (green) - how can I run uWSGI not as root? This is the logfile after a restart

[web2py] insecure string pickle

2015-02-02 Thread Dmitry Ermolaev
Error ticket for "admin"Ticket ID 127.0.0.1.2015-02-03.07-40-32.4dc31e25-5b8c-4c78-b525-2a58b4ff7015 insecure string pickleВерсияweb2py™Version 2.9.12-stable+timestamp.2015.01.17.06.11.03PythonPython 2.7.6: C:\Python27\python.exe (prefix: C:\Python27)Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11

Re: [web2py] Re: Handling (2006, 'MySQL server has gone away') from Scheduler, pythonanywhere

2015-02-02 Thread Kiran Subbaraman
Looks similar to this open-issue: https://github.com/web2py/web2py/issues/733 Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Tue, 03-02-2015 2:47 AM, Niphlod wrote: uhm. does pythonanywhere even support a running process outside the web one

[web2py] Re: web2py + maps. Any sugestion?

2015-02-02 Thread nick name
Also have a look at: https://github.com/jwass/mplleaflet Seems to also make Matplotlib-style plots work well with leaflet. haven't tried it yet, but it looks awesome. On Monday, January 19, 2015 at 7:42:30 AM UTC+2, Carlos A. Armenta Castro wrote: > > Im trying to work with maps for a vehicle t

[web2py] Re: Memory leaks in web2py : how do you track them ?

2015-02-02 Thread Michele Comitini
I have been using this sometimes ago, if there is a cyclic reference or a stale reference of some sort, it help to spot it. https://groups.google.com/d/msg/web2py-developers/Rd8hC5aFRZo/UTxZHjAwWcUJ http://mg.pov.lt/objgraph/ Il giorno lunedì 2 febbraio 2015 22:48:17 UTC+1, Louis Amon ha scritto

[web2py] Re: variable query

2015-02-02 Thread José Eloy
Sorry for my delay in answer. Anthony: Your solution works well: db(db.articulos.id.belongs(list_of_ids)).select() Creating a list of ids and using belongs was the correct for me. Thanks guys for the help. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://gi

[web2py] Re: Default value (Not in table) in Dropdown

2015-02-02 Thread Omi Chiba
Thanks. It worked great!!! On Monday, February 2, 2015 at 4:07:36 PM UTC-6, Niphlod wrote: > > that's pretty obvious. look at what you're trying to render in the > view! > > > {{for model in models:}} > {{=" selected='selected'" if model.Name==request.vars.model_name else > ""}

[web2py] Re: Default value (Not in table) in Dropdown

2015-02-02 Thread Niphlod
that's pretty obvious. look at what you're trying to render in the view! {{for model in models:}} {{=model.Name}} {{pass}} at the very least, if you want to keep the same code in the view, you should have the controller pass a list with a Storage() that has a "Name" at

Re: [web2py] How to mimic routes.py with nginx

2015-02-02 Thread Michele Comitini
Il giorno lunedì 2 febbraio 2015 12:29:00 UTC+1, alex ha scritto: > > Michele, > > Thank you for quick answer! > > If I put in nginx server directive: > > location ~ ^/AAA(/.*)?$ { rewrite ^.*$ http://example.com/app/ctr/fnc > break ; } > > and leave web2py/applications/app/routes.py with onl

[web2py] Re: Default value (Not in table) in Dropdown

2015-02-02 Thread Omi Chiba
In my controller, can I just add the default value in controller something like below? If possible, this is the easiest one for me. Though I will get error I do this. *controller* if request.vars.model_name: models = db(db.KR_Lead.ModelName == request.vars.model_name).select(db.KR_

[web2py] Re: Default value (Not in table) in Dropdown

2015-02-02 Thread Niphlod
building it by hand kinda slows things down a lot (boilerplate alert). Thankfully, we all know HTML, but bring! Having a widget displaying a default value (that won't get accepted) is pretty damn easy with IS_IN_SET(..., zero='choose me...') with html and the requirement of

[web2py] Re: Submit current form prior to logout?

2015-02-02 Thread Niphlod
that works only if your controller accepts basically any data (very "low barrier" on validation). My usecase scenario didn't ever involve the user not knowing it's submitting data, and I'd treat "half-filled forms" with a dedicated controller to clean/purge/mark_as_unreliable data what's coming

[web2py] Re: Handling (2006, 'MySQL server has gone away') from Scheduler, pythonanywhere

2015-02-02 Thread Niphlod
uhm. does pythonanywhere even support a running process outside the web one ? BTW: all "kinky" calls to the db are fail-safed in the scheduler (see "wrapped_*" functions), to alleviate locking (albeit primarely for sqlite). This has the added benefit of making the scheduler more resilient again

[web2py] Re: mssql connection URGENT!

2015-02-02 Thread Omi Chiba
Thanks! On Monday, February 2, 2015 at 3:06:05 PM UTC-6, Niphlod wrote: > > uhm. Technically having more than one instance of mssql running on the > same ip is possible (multiple named instances) but it involves a totally > different connection handshake. > If you don't specify different port n

[web2py] Re: Memory leaks in web2py : how do you track them ?

2015-02-02 Thread Niphlod
> @niplhod do you know if is there a way to integrate memory profiling in > travis-ci?? > > I don't see it in any of the docs. if you have something in mind that will print out something as a value, we could print an alarm on a crafted build if some value passes a threshold, but that's prett

[web2py] Default value (Not in table) in Dropdown

2015-02-02 Thread Omi Chiba
For example, I have a list models table and build a dropdown list from it but I want dropdown show something like "SELECT Model", then pick the model. I don't want to register the "SELECT Model" record in table. What's the easiest and clean way to do? I have 5 drop down list so ideally when I c

[web2py] Re: mssql connection URGENT!

2015-02-02 Thread Niphlod
uhm. Technically having more than one instance of mssql running on the same ip is possible (multiple named instances) but it involves a totally different connection handshake. If you don't specify different port numbers, you can still have them "dynamic" but you have to resort to have SQL Serve

[web2py] Re: trouble with like

2015-02-02 Thread Niphlod
try to see what db(db.mytable.id)._select(db.table.myfield.like('%.mp3')) prints out On Monday, February 2, 2015 at 9:39:20 PM UTC+1, weheh wrote: > > I had a query > > db.mytable.myfield.like('%.mp3') > > where the actual field contents were "mytable.myfield.cypher1.cypher2.mp3" > and it w

[web2py] Re: Question about web2py roadmap.

2015-02-02 Thread Dave S
I find this post to be a lot clearer in terms of understanding what Joe is getting after than the posts earlier in the thread. I'm thinking that SQLFORM already takes a lot of the drudgery out of form design, and so I'm missing what Joe thinks is missing. I haven't used the MS web design tools

[web2py] Re: Adding the number of day to a date

2015-02-02 Thread Anthony Smith
Hi Sorry misunderstood the question. T2.completed_date is triggered when someone enters the date the task is completed on. cheers On Tuesday, 3 February 2015 06:35:00 UTC+11, Dave S wrote: > > > > On Sunday, February 1, 2015 at 12:13:54 AM UTC-8, Anthony Smith wrote: >> >> Hi Richard >> >> the

[web2py] trouble with like

2015-02-02 Thread weheh
I had a query db.mytable.myfield.like('%.mp3') where the actual field contents were "mytable.myfield.cypher1.cypher2.mp3" and it worked OK. But now it's non-functional. After replacing the query with the following db.mytable.myfield.endswith('.mp3') everything is working fine again. What ha

[web2py] Re: mssql connection URGENT!

2015-02-02 Thread Omi Chiba
Thank you for the reply. I found that that problem was why it doesn't accept IP Address instead of Named Instance and fixed the SQL Server configuration to use static IP to connect SQL Server. I can't connect to my servers SQL database via an IP Address http://dba.stackexchange.com/questions/62

[web2py] OT: Firefox complaint

2015-02-02 Thread Dave S
This isn't a web2py problem, but it does show up when I'm testing or using my web2py code, so there's a chance that it could be ameliorated by web2py with an appropriate header inclusion, or something. But even without that, it will feel good to grouse out loud: Firefox makes an orderly exit

Re: [web2py] Re: Memory leaks in web2py : how do you track them ?

2015-02-02 Thread Richard Vézina
appointment app where having memory leaks https://github.com/mdipierro/web2py-appliances/tree/master/AppointmentManager https://groups.google.com/d/msg/web2py/u-eU-2vhims/1u3fOnqPoUMJ https://groups.google.com/d/msg/web2py/QbR7pY3xHuM/rOyuHhVmbjYJ Richard On Mon, Feb 2, 2015 at 2:26 PM, Massim

[web2py] Re: Adding the number of day to a date

2015-02-02 Thread Dave S
On Sunday, February 1, 2015 at 12:13:54 AM UTC-8, Anthony Smith wrote: > > Hi Richard > > the trigger is T2.completed_date+T1.with_holding = T2.withhold_until > > I am reasonably new to web2py, can get though most things, but this has me. > > I think Richard was asking what event causes T2 to b

[web2py] Re: mssql connection URGENT!

2015-02-02 Thread Massimo Di Pierro
The problem is that since you did not specify a name for the .table files you get default (nobody does). default is a hash of the db uri so if you change it the .table files break. If this is just a change in the name but the tables are already in the database, the you should enable a fake_migr

Re: [web2py] Newby Question

2015-02-02 Thread Richard Vézina
I wasn't know Massimo put them online, but thers is also his vid : http://www.web2py.com/examples/default/videos/ Many hours of tutorial... :) Richard On Mon, Feb 2, 2015 at 2:30 PM, Richard Vézina wrote: > The whole chapter 7 (http://web2py.com/books/default/chapter/29/07/) > > Is basically

Re: [web2py] Newby Question

2015-02-02 Thread Richard Vézina
The whole chapter 7 (http://web2py.com/books/default/chapter/29/07/) Is basically that!! If you follow example step by step you should better understand how it works... You can have a read of chapter 3 ( http://web2py.com/books/default/chapter/29/03/) And the chapter 1 ( http://web2py.com/books/

[web2py] Re: Handling (2006, 'MySQL server has gone away') from Scheduler, pythonanywhere

2015-02-02 Thread Massimo Di Pierro
Did you put any dal query in a try... except? I am recently seeing people do this a lot and it very wrong. On Monday, 2 February 2015 05:09:47 UTC-6, Ian Ryder wrote: > > Hi, I've got a showstopper running scheduler on pythonanywhere - every few > hours it drops out with: > > Traceback (most rec

[web2py] Re: Memory leaks in web2py : how do you track them ?

2015-02-02 Thread Massimo Di Pierro
What application is this? Are you using cache.ram or a cache decorator? That would cause this. On Sunday, 1 February 2015 03:18:05 UTC-6, Louis Amon wrote: > > I have a web2py server running on heroku. > > So far my server had little traffic, and Heroku being a cloud PaaS service > means they pu

Re: [web2py] Newby Question

2015-02-02 Thread Eric
Richard, Thank you for your kind response. I did find the SQLFORM example and got it to present the form and accept a file. I'm still struggling with an overall idea of how things work in Web2py (and perhaps the web itself). Is there a resource that clearly describes what happens when a page is

[web2py] Re: Submit current form prior to logout?

2015-02-02 Thread lillian
Yeah that's basically what I came up with between posting and seeing your reply, except I'm letting the code in my controller do the actual db update (its that same code used if the user had clicked on submit) and then I redirect based on what UI element called submit (submit button? do the no

[web2py] Handling (2006, 'MySQL server has gone away') from Scheduler, pythonanywhere

2015-02-02 Thread Ian Ryder
Hi, I've got a showstopper running scheduler on pythonanywhere - every few hours it drops out with: Traceback (most recent call last): File "/web2py/gluon/shell.py", line 272, in run exec(python_code, _env) File "", line 1, in File "/web2py/gluon/scheduler.py", line 719, in loop self.wrapped_

[web2py] mssql connection URGENT!

2015-02-02 Thread Omi Chiba
The below connection statement was working fine and the SQL Servers's instance was HELPDESK/HELPDESK. dbh = DAL("mssql2://username:password@HELPDESK/HS2000CS", migrate_enabled=False) Now, our vendor change the name of instance to HELPDESK/HELPDESK_VM. I tried, dbh = DAL("mssql2://username:pa

[web2py] Re: Groupby year on date field

2015-02-02 Thread Moiz Nagpurwala
trangely, this is what I get with the same app, same data, same code, both on pythonanywhere and my local machine. On Saturday, January 31, 2015 at 3:14:22 AM UTC+5:30, Niphlod wrote: > > >

[web2py] Re: ckeditor : how to make read only, how to remove the toolbar in a dynamic way

2015-02-02 Thread Tim Nyborg
Depends on how you're implementing the widget. I've got a CKEditor widget as follows (pretty much a glorified copy of text.widget with the ckeditor class): class CKEditor(FormWidget): _class = 'ckeditor' @classmethod def widget(cls, field, value, **attributes): """

[web2py] Re: Memory leaks in web2py : how do you track them ?

2015-02-02 Thread Michele Comitini
@Leonel you should make a PR of this. We have a program profiler, a memory profiler would be great! @niplhod do you know if is there a way to integrate memory profiling in travis-ci?? Il giorno lunedì 2 febbraio 2015 00:35:50 UTC+1, Leonel Câmara ha scritto: > > If you have pool_size defined

[web2py] Re: syntax error in update command

2015-02-02 Thread Alex Glaros
thanks Niphlod works perfectly; how could I miss that? much appreciated Alex -- 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

[web2py] Re: syntax error in update command

2015-02-02 Thread Niphlod
the syntax is db(q).update(fieldname=something) you instead are trying to do db(q).update(tablename.fieldname=something) On Sunday, February 1, 2015 at 8:54:21 PM UTC+1, Alex Glaros wrote: > > anyone see why this update line doesn't work? > > db(db.auth_user.id == auth.user_id).update(auth_us

Re: [web2py] How to mimic routes.py with nginx

2015-02-02 Thread al ex
Michele, Thank you for quick answer! If I put in nginx server directive: location ~ ^/AAA(/.*)?$ { rewrite ^.*$ http://example.com/app/ctr/fnc break ; } and leave web2py/applications/app/routes.py with only routes_out = ( ('/app/ctr/fnc', r'/AAA'), ) everytime I call /AAA it gets rewritte

Re: [web2py] How to mimic routes.py with nginx

2015-02-02 Thread Michele Comitini
you still need your routes.py in place: routes_out = ( ('/app/ctr/fnc', r'/AAA'), ) 2015-02-02 11:23 GMT+01:00 al ex : > I have setup this route in /web2py/applications/app > > routes_in = ( > (r'/AAA/?', '/app/ctr/fnc'), > ) > > routes_out = ( > ('/app/ctr/fnc', r'/AAA'), > > ) >

[web2py] How to mimic routes.py with nginx

2015-02-02 Thread al ex
I have setup this route in /web2py/applications/app routes_in = ( (r'/AAA/?', '/app/ctr/fnc'), ) routes_out = ( ('/app/ctr/fnc', r'/AAA'), ) With rockets, on localhost, it works fine. On production server nginx 1.7.9, uwsgi 2.0.8, python 2.7.6, if I repeatedly refresh /AAA, sometimes

Re: [web2py] ckeditor : how to make read only, how to remove the toolbar in a dynamic way

2015-02-02 Thread Serge Bourgeois
in stead of 'now' and 'edit', read 'new' or 'edit' ... 2015-02-01 10:25 GMT+01:00 Serge Bourgeois : > I just implemented the ckeditor plugin. It looks great, but I need help > (example if possible) showing how to hide the ckeditor toolbar for some > text fields, for instance in a controller with