[web2py] Re: a proposal for form improvement

2014-09-09 Thread Leonel Câmara
This is the corresponding JS one optimized for bootstrap 3: jform.widgets['text'] = function(field) { return jform.tag('textarea',{'name':field.name ,'class':'form-control'})(field.value); } Massimo that looks good, however in SQLFORM I can change the textwidget in a very specific

[web2py] Is web2py compatible with Spring Python or Java Spring

2014-09-09 Thread Gurpreet S Anand
I have read the above posts but still wondering if the Spring Python is compatible with web2py. Is it possible you could provide me with a solution to my problem or at least direct me in right direction. Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Launching modal form from onupdate callback (Grid)

2014-09-09 Thread Sarbjit
I am using the Dialog plugin from http://dev.s-cubism.com/plugin_dialog to display modal dialog form. My requirement is that whenever the user edits the Grid record, then I should do some validation on the form contents (I'll be using onvalidate callback for my custom form validation). Once

[web2py] How to add a check-box element in grid (update mode only) using view?

2014-09-09 Thread Sarbjit
I am looking for a example on adding a checkbox field for a grid in update mode only. This checkbox will be used for some decision at the time of form submission and hence I don't want to create a new field in database (since this field is useless there). Is there any way, I can add a checkbox

[web2py] how to iterate through sqlite data and display on web2py

2014-09-09 Thread Maurice Waka
I have several lists in sqlite rows as follows: ROWID x 1['123', '1234', '12345',] 2['abc', 'abcd', 'abcde',] 3['1a2b3c', '1a2b3c4d', '1a2b3c4d5e',] I would like to iterate over these items in a game that matches them with a user input, say when a user prints 123, it prints

[web2py] Re: how to iterate through sqlite data and display on web2py

2014-09-09 Thread Anthony
On Tuesday, September 9, 2014 8:08:00 AM UTC-4, Maurice Waka wrote: I have several lists in sqlite rows as follows: ROWID x 1['123', '1234', '12345',] 2['abc', 'abcd', 'abcde',] 3['1a2b3c', '1a2b3c4d', '1a2b3c4d5e',] How are you storing the lists in a single SQLite

Re: [web2py] Re: how to iterate through sqlite data and display on web2py

2014-09-09 Thread Maurice Waka
Thanks for the input. Yes it is part of a web2py app game. I have about 1000 rows, but when a user types in the keyword(stored in any of the rows) i should get a boolean answer which for now displays the row(different code on this) Regards On Tue, Sep 9, 2014 at 3:30 PM, Anthony

Re: [web2py] Re: how to iterate through sqlite data and display on web2py

2014-09-09 Thread Anthony
On Tuesday, September 9, 2014 8:40:04 AM UTC-4, Maurice Waka wrote: Thanks for the input. Yes it is part of a web2py app game. I have about 1000 rows, but when a user types in the keyword(stored in any of the rows) i should get a boolean answer which for now displays the row(different code

[web2py] insert and update SQLFORM.factory

2014-09-09 Thread Greg Vaughan
I am trying to do a combined update and insert using SQLFORM.factory with some redirects for good measure. Everything works fine except the update which fails to alter the record in question. @auth.requires_login() def remote_check(): j_id=request.args[0] for row in

Re: [web2py] Re: how to iterate through sqlite data and display on web2py

2014-09-09 Thread Maurice Waka
Hey thanks alot! let me work on this then. Kind regards On Tue, Sep 9, 2014 at 3:55 PM, Anthony abasta...@gmail.com wrote: On Tuesday, September 9, 2014 8:40:04 AM UTC-4, Maurice Waka wrote: Thanks for the input. Yes it is part of a web2py app game. I have about 1000 rows, but when a user

Re: [web2py] Re: web2py app as proxy... but how?

2014-09-09 Thread Manuele Pesenti
Il 19/08/14 10:16, Niphlod ha scritto: not really, except that it's not streamed. Are these any shrewdness I have to use when I proxy images? Something like base64 encoding before streaming? Thanks a lot M. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: insert and update SQLFORM.factory

2014-09-09 Thread Anthony
You've got a redirect right before the update code, so it will never get to execute that code. Also, your two tables include a field with the same name (business_name), so putting them both in SQLFORM.factory won't work properly. Anthony On Tuesday, September 9, 2014 9:10:50 AM UTC-4, Greg

[web2py] Re: Launching modal form from onupdate callback (Grid)

2014-09-09 Thread Sarbjit
I tried using the dialog element in the view, but this is also not working. Idea is that when the user submits the gird changes, the dialog will show (modal dialog). But the below code is not working, can some one please point out the problem. {{if grid.update_form:}}

[web2py] Visual CMS MUSE CC - with web2py

2014-09-09 Thread Dmitry Ermolaev
I found the great visual CMS Muse CC https://www.youtube.com/watch?v=ESUPCpOZ5Dc May be it cooperate with python web2py? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: insert and update SQLFORM.factory

2014-09-09 Thread Greg Vaughan
Thanks Anthony, Altered the code to fix those two issues and that took me back to the original problem that I had which is syntax not supported relevant section is now... ... form=SQLFORM.factory(db.job_requests,db.tech_notes,table_name='remote_check' ) if form.process().accepted:

[web2py] Re: insert and update SQLFORM.factory

2014-09-09 Thread Greg Vaughan
Sigh I just realised that I am not specifying a record to update in that code... of course that won't work... On Tuesday, 9 September 2014 23:30:46 UTC+10, Anthony wrote: You've got a redirect right before the update code, so it will never get to execute that code. Also, your two tables

[web2py] Re: SOAP API authentication

2014-09-09 Thread Stefan van den Eertwegh
Could it be so that it passes and processed the models with basic auth? Because in the model there is a auth.is_logged_in() check and sets some parameters which now not are set.. I hope to hear from you! Op maandag 1 september 2014 05:32:39 UTC+2 schreef Matheus Cardoso: You can find your

[web2py] Re: Launching modal form from onupdate callback (Grid)

2014-09-09 Thread Derek
Yes, you cannot do that, you are mixing javascript (LOAD) with Python. You have to make the changes to the view, not the controller. On Tuesday, September 9, 2014 4:24:27 AM UTC-7, Sarbjit wrote: I am using the Dialog plugin from http://dev.s-cubism.com/plugin_dialog to display modal dialog

[web2py] Re: validate_and_insert my new best friend

2014-09-09 Thread Derek
You might want to look at Google Refine if you are dealing a lot with text file data sources. https://code.google.com/p/google-refine/ It's a very useful tool, and makes massaging text data easy. On Saturday, September 6, 2014 1:16:59 AM UTC-7, Joe Barnhart wrote: File this under stupid but

Re: [web2py] Re: web2py app as proxy... but how?

2014-09-09 Thread Niphlod
nope. base64 is just a way to turn binary into text, and you want to stream a binary, not the text that represents it in base64. On Tuesday, September 9, 2014 3:27:41 PM UTC+2, Manuele wrote: Il 19/08/14 10:16, Niphlod ha scritto: not really, except that it's not streamed. Are these any

[web2py] Re: web2py setup scripts for windows

2014-09-09 Thread Niphlod
well, to be fair nginx config takes ~80 rows and other ~20 for uwsgi and another ~10 for putting uwsgi under upstart. apache is ~40 lines. Are they more flexible ? Yep. Let's not forget that if wfastcgi.py was embeddable in web2py as an adapter (but I didn't check the license), 10 clicks OR 4

[web2py] db.commit() taking too long to update records

2014-09-09 Thread Luciano Laporta Podazza
Hello, I'm having a strange issue, I have a website that queries data through an ajax call from the server using web2py json services every *5 seconds*. Then from the client I can update some data to the server with this: @service.json def block_user(): data =

[web2py] Re: db.commit() taking too long to update records

2014-09-09 Thread Leonel Câmara
My guess would be that you're using sqlite and the database is locking you. Which is easy to happen if you have a few people requesting updates every 5 seconds and you're trying to write on it, as the write will only go forward once sqlite gets its process an EXCLUSIVE lock which requires all

Re: [web2py] Re: db.commit() taking too long to update records

2014-09-09 Thread Luciano Laporta Podazza
Sorry, I forgot to mention that I'm using MySQL as db engine. Thanks. On Tue, Sep 9, 2014 at 6:45 PM, Leonel Câmara leonelcam...@gmail.com wrote: My guess would be that you're using sqlite and the database is locking you. Which is easy to happen if you have a few people requesting updates

Re: [web2py] Re: web2py app as proxy... but how?

2014-09-09 Thread Manuele Pesenti
Il 09/09/14 22:22, Niphlod ha scritto: nope. base64 is just a way to turn binary into text, and you want to stream a binary, not the text that represents it in base64. I prepared a little example based on my solution. It's a as simple as I can image proxy composed by a module[1] and a

[web2py] Re: db.commit() taking too long to update records

2014-09-09 Thread Leonel Câmara
Then I'm sorry but I have no idea why it's taking so long. You need to profile it. It may just be a question of tuning MySQL, optimizing the tables, etc. Have you tried mysqltuner? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

Re: [web2py] Re: db.commit() taking too long to update records

2014-09-09 Thread Luciano Laporta Podazza
Thanks for your help Leonel. I didn't tried it but I'm talking about a dead simple db structure, it's just updating a few records( like 10 rows or so) on a single table. On Tue, Sep 9, 2014 at 7:24 PM, Leonel Câmara leonelcam...@gmail.com wrote: Then I'm sorry but I have no idea why it's

[web2py] Re: db.commit() taking too long to update records

2014-09-09 Thread villas
If this is in a controller, do you need the line: db.commit() ?? -- 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

Re: [web2py] Re: db.commit() taking too long to update records

2014-09-09 Thread Luciano Laporta Podazza
Perhaps I misunderstood this, but following the web2py manual it says that no recordset is updated until you do db.commit(). Is that right?. On Tue, Sep 9, 2014 at 7:29 PM, villas villa...@gmail.com wrote: If this is in a controller, do you need the line: db.commit() ?? -- Resources: -

[web2py] Re: db.commit() taking too long to update records

2014-09-09 Thread Leonel Câmara
Well that's true, but web2py automatically calls db.commit for you after running the controller. That would not cause the slowdown anyway. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Cannot resolve reference error

2014-09-09 Thread José Eloy
Hi! I'm developing an web2py application that use an external SQL Server database. I can connect to the SQL Server database using migrate=False in those tables I need to access. In addition I create my own tables from web2py (also they connect to SQL Server). My troubles begin when one of my

[web2py] Re: Using html tags inside checkbox labels

2014-09-09 Thread Tauno Metsalu
I found a solution myself for this specific case. I wrote space instead of br / and then used white-space:pre-line in css. More information: http://stackoverflow.com/questions/8661166/custom-css-classes-for-sqlform-widget-input-in-web2py

[web2py] Can I interact with code in Java Springs using web2py?

2014-09-09 Thread Gurpreet Singh Anand
I am a Python developer, but a beginner of web2py. I am creating a financial website which has a calculation engine. This calculation engine has been coded in Java springs. I am stuck at this point and was wondering if web2py is compatible with Java Springs. I would be immensely appreciative

[web2py] Re: RSS is an error! What to do?

2014-09-09 Thread Капылов Данил
Does not work. :-) Error ticket for welcomeTicket ID 127.0.0.1.2014-09-09.11-33-31.6f78e65a-5d28-410e-9111-55ded191b520 type 'exceptions.AttributeError' 'NoneType' object has no attribute 'encode'Версияweb2py™Version 2.9.9-stable+timestamp.2014.09.08.13.16.54 PythonPython 2.7.6:

[web2py] Re: dynamically add rows to html table

2014-09-09 Thread trr
Hi Andrew, I got the point and it works. Thanks for your timely solution. Afterthought: Since I need only to append an empty row to the table for the user to enter data, java script solution avoided the round trip. I found the that here

[web2py] Re: Best way to store tabular data when database isn't really needed?

2014-09-09 Thread Niels Jensen
Good point. I guess I'm just used to storing disposable data in disposable variables. I won't worry too much about it seeing as I already have it working and focus on getting the editing elements working now. Thanks for the feedback. On Monday, 8 September 2014 22:38:39 UTC+1, Derek wrote:

[web2py] Code Coverage Web2Py

2014-09-09 Thread Elliott Hill
I'm trying to get unit tests and code coverage metrics for a web2py app. I'd had a quick stab at doing something myself using the unittest information here (http://www.web2py.com/AlterEgo/default/show/260). This got me unit tests that run within the web2py framework and then exit. These

[web2py] get hidden input value in controller

2014-09-09 Thread trr
I have a hidden input in form. I set the hidden value in client by java script. But I am not able to get the value in request.vars or request.post_vars in controller. It returns None. How to get the hidden input values in controller.? I generate the form in controller and is post method. --

[web2py] Re: a proposal for form improvement

2014-09-09 Thread Massimo Di Pierro
I agree. I have not implemented but I was planning to add this feature. On Tuesday, 9 September 2014 03:44:30 UTC-5, Leonel Câmara wrote: This is the corresponding JS one optimized for bootstrap 3: jform.widgets['text'] = function(field) { return jform.tag('textarea',{'name':field.name

[web2py] IS_INT_IN_RANGE() weirdness

2014-09-09 Thread Joe Barnhart
Did anyone notice that the range for the INT validator is min = value max, while the validator for FLOAT is min = value = max? Since the max value is not actually in the range of the INT validator, it means you can't do this: IS_INT_IN_RANGE(1,1) The above will fail every time, for all time.

[web2py] Customize SQLFORM.grid

2014-09-09 Thread Luciano Laporta Podazza
Hello, I would like to take advantage of SQLFORM.grid search, listing and pagination capabilities to generate a listing from a table, but I need to customize the resulting rows like this: