Re: [web2py] Re: How to implement Gmail Authentication

2015-07-13 Thread Michele Comitini
The code for Google OAuth2 does not need to import oauth2. If you use OAuth2 there is no need to use any external library for oauth. While OAuth1.1 need the oauth2 python external python module (pip install oauth2 as Massimo says). I know it is ridiculous but the confusion arises from the python

[web2py] Re: Convert forms to html helpers

2015-07-13 Thread 黄祥
i think your approached is the most efficient way. please read this discussion : http://stackoverflow.com/questions/8091487/what-are-the-benefits-of-building-html-markup-with-html-helpers-in-web2py best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: format field from m:1 table

2015-07-13 Thread Mirek Zvolský
Thank you, Massimo. Great ! This works: format = lambda r: '%s - %s' % (r.name, r.region_id.name http://r.region.name/) If region_id is None it should be handled again: format = lambda r: '%s - %s' % (r.name, r.region_id.name http://r.region.name/ if r.region_id else '?') Lot of questions in

[web2py] Convert forms to html helpers

2015-07-13 Thread LoveWeb2py
Hello, Is there something within web2py that automatically converts html forms to html HELPER SYNTAX? for example here is my form: div id=checkout-area style=display: none; h4i class=icon-shopping-cart/i Secure Checkout/h4 script type=text/javascript

[web2py] Re: break syntax between 2.8.2 and 2.11.2??

2015-07-13 Thread Paolo Valleri
Hi Simone, it should be fixed in trunk, would you mind to test your code against latest development version of web2py? Paolo On Thursday, July 9, 2015 at 9:33:05 PM UTC+2, Dave S wrote: On Thursday, July 9, 2015 at 5:54:00 AM UTC-7, 黄祥 wrote: please update your web2py, since 2.11.x it

[web2py] Hackathon EBC/FISL16

2015-07-13 Thread Iuri Guilherme dos Santos Martins
As you would confirm here: http://www.ebc.com.br/tecnologia/2015/07/conheca-os-vencedores-do-desafio-hacker-da-ebc-no-fisl-2015 Winners of EBC's Hackathon at FISL16 were both web2py apps. All three of us are from pytche (python dojo) and/or matehackers (hackerspace), in copy. We probably will

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2015-07-13 Thread Anthony
I may be missing something, but I still don't see where sale_order_checkout touches the session (it has a form in the HTML, but it is not a web2py form with a _formkey token, so it doesn't use the session). I don't think your problem is the same as the one discussed in this thread. Which of

[web2py] Re: Convert forms to html helpers

2015-07-13 Thread Anthony
I don't think I've seen any such tools. In general, it is not very common to create large static sections of the DOM using the web2py HTML helpers. They are more useful when you need to generate DOM programmatically (e.g., input some form configuration parameters and automatically produce a

[web2py] Re: using PyCharm

2015-07-13 Thread Alex
I'm still confused why nobody else is bothered by this limitation. Every other IDE and project I worked on so far, the IDE project contains all the files and source code of one application. Then you can set completely independently where the application server is located (e.g. glassfish for a

[web2py] Re: Convert forms to html helpers

2015-07-13 Thread 黄祥
Do you know if there is anything that converts forms automatically? had you already read the book? web2py provides many way to create a form (FORM, SQLFORM, crud, SQLFORM.grid, SQLFORM.factory, form custom) to convert form automatically, i don't think it have. i think the closer method to

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2015-07-13 Thread Anthony
It's not clear this is the same problem, as you have only one form in a component, and the other component doesn't appear to save to the session. Read through the thread to repeat the diagnostics and see if you really are observing the same behavior (which implies the second component is saving

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2015-07-13 Thread 黄祥
i face the same situation, already use the formname and clear session. the form must submit twice to get it work. e.g. *controllers/default.py* def sale_order(): return locals() def sale_order_form(): form = SQLFORM.factory( Field('product', 'reference product',

Re: [web2py] Re: using PyCharm

2015-07-13 Thread Richard Vézina
Alex, I am not sure I follow you... When you let PyCharm set web2py environnement for project for you and it create an .idea folder for your project in the root folder containing the web2py folder... Something like that : project_root/.idea /web2py

[web2py] Re: Convert forms to html helpers

2015-07-13 Thread LoveWeb2py
Parsing!! Not sure how I missed that. Thank you, Anthony. This is exactly what I was looking for. On Monday, July 13, 2015 at 9:41:09 AM UTC-4, Anthony wrote: I don't think I've seen any such tools. In general, it is not very common to create large static sections of the DOM using the web2py

[web2py] Re: Convert forms to html helpers

2015-07-13 Thread LoveWeb2py
Hi Stifan, Thank you for replying. Do you know if there is anything that converts forms automatically? I'd think there would be something to do this by now? On Monday, July 13, 2015 at 7:46:32 AM UTC-4, LoveWeb2py wrote: Hello, Is there something within web2py that automatically converts

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2015-07-13 Thread 黄祥
sale_order_checkout use ajax callback to modify session.sale_order value, that is in the form in the HTML (not web2py form) the form that must submit twice is the one in the first component : sale_order_form which is generated via SQLFORM.factory. the form in second component is responsive

Re: [web2py] Re: Web2py application running very slow on rocket server in production mode

2015-07-13 Thread Dave S
On Saturday, July 11, 2015 at 8:49:39 PM UTC-7, Ramashish Gaurav wrote: Hello Dave, Problem is now solved. A security certificate for the application had to be added in SELinux. Thanks for your interest. Regards, Ramashish Glad to hear you've got it going! /dps On Friday, July

[web2py] Re: Web2py can't connect to mssql via pypyodbc - but possible to connect from idle

2015-07-13 Thread Niphlod
web2py doesn't use freetds by default as a driver, but SQL Server... so if you can connect with freetds with pypyodbc it's not said that the same works within web2py (unless you use the same driver args). That being said, the error no driver available smells. How did you install web2py ? On

[web2py] Re: Web2py can't connect to mssql via pypyodbc - but possible to connect from idle

2015-07-13 Thread Jose
Hi Please see here [1] José [1] https://groups.google.com/forum/#!searchin/web2py/Help$20with$20MSSQL$20Connection/web2py/fFgJMgYHbBQ/ZLji6jjkYzEJ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: AppConfig and Storage

2015-07-13 Thread Niphlod
sorry, what ?!?!?! On Sunday, July 12, 2015 at 11:21:04 PM UTC+2, ermolaev...@gmail.com wrote: in 0.py by using Storage: develop = False develop = 0 develop = '' all is work in appconfig.ini develop = False develop = 0 develop = '' setted as True !!! We need use now it: develop =

[web2py] Re: cron - not work?

2015-07-13 Thread Mark
This CRON: Disabled because no file locking error message means you didn't install pywin32 On Thursday, July 9, 2015 at 4:58:03 AM UTC-4, Dmitry Ermolaev wrote: I use Windows and Apache 2.2 in crontab: #crontab */1 * * * * root *cron/ws_run in controller cron.py: if not

[web2py] Re: Web2py can't connect to mssql via pypyodbc - but possible to connect from idle

2015-07-13 Thread achristoffersen
Thanks. I have web2py installed in a virtual environment. (basically just unzipped in to the venv). `which python` confirms that `python web2py.py` is using the venv python. The error message changes when I out-comment the import pypyodbc statement and just call the DAL directly px = DAL

[web2py] Re: Web2py can't connect to mssql via pypyodbc - but possible to connect from idle

2015-07-13 Thread Niphlod
On Monday, July 13, 2015 at 10:00:08 PM UTC+2, achristoffersen wrote: Hi Jose, Thanks Okay - So if I run python web2py -M I get this: Version 2.11.2-stable+timestamp.2015.05.30.16.33.24 Database drivers available: sqlite3, imaplib, pyodbc, pymysql, pg8000 I guess pyodbc here is

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2015-07-13 Thread 黄祥
hm, sorry, when i open in google groups it appears in web2py-users but in gmail i received it from web2py-developers. k, back to the problems. in web2py-users first report said : If the form has errors, the error messages are displayed after a second submit. So, I need to click two times the

[web2py] Re: New feature in trunk: API tokens

2015-07-13 Thread Derek
It's pretty much like client side cookies for sessions. On Thursday, July 9, 2015 at 10:45:30 PM UTC-7, Massimo Di Pierro wrote: Can you elaborate. I like the current system (I wrote it ;-) but I was considering adding jwt. The question is, is there duplication of functionality? Should jwt

[web2py] Re: Web2py can't connect to mssql via pypyodbc - but possible to connect from idle

2015-07-13 Thread achristoffersen
Hi Jose, Thanks Okay - So if I run python web2py -M I get this: Version 2.11.2-stable+timestamp.2015.05.30.16.33.24 Database drivers available: sqlite3, imaplib, pyodbc, pymysql, pg8000 I guess pyodbc here is really pypyodbc? A Also: Thanks for the pointers. Is your recommendation to use

[web2py] Re: Web2py can't connect to mssql via pypyodbc - but possible to connect from idle

2015-07-13 Thread achristoffersen
Hi again Jose Since my error mesage now says something like: Data source name not found, and no default driver specified') I decided to try the DNS route. I have tried to edit both /usr/share/freetds/freetds.conf and /etc/freetds/freetds.conf. In both cases I added a DNS. That changed nothing.

[web2py] Re: Web2py can't connect to mssql via pypyodbc - but possible to connect from idle

2015-07-13 Thread achristoffersen
Thanks again Niphlod I don't think using SQL server is an option in linux-land? All the examples I have seen uses FreeTDS. On Monday, July 13, 2015 at 6:34:30 PM UTC+2, Niphlod wrote: web2py doesn't use freetds by default as a driver, but SQL Server... so if you can connect with freetds

[web2py] Re: Web2py and support for more than a million of records

2015-07-13 Thread villas
Hi Alfonso You mention 'sqlgrids', but if using SQLFORM.grid do not forget to turn off the search widget. searchable = False. I think the grid should otherwise be fast because I think it paginates the data with limitby. Also be aware of unintended recursive selects. e.g. I've noticed in the

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2015-07-13 Thread 黄祥
already tried to write the dummy session data in (sale_order and sale_order_form) but still same (need submit twice), yet i got some bonus, traceback error said : AttributeError: 'str' object has no attribute 'items' *controllers/default.py* def sale_order(): session.sale_order = 'test'

[web2py] Re: Web2py can't connect to mssql via pypyodbc - but possible to connect from idle

2015-07-13 Thread Niphlod
freetds with (py)pyodbc MUST have freetds as a proxy to connect from a linux host. The trick is understanding what parameters needs to be passed to py(pyodbc) to connect. As mssql is usually used from windows host, the default connectionstring-builder uses parameters that are valuable when

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2015-07-13 Thread Anthony
Did you leave out some code, because the code you have shown for sale_order_checkout includes no form nor any writing to the session? The idea of the dummy data is just to write some nonsense data to the session in the *parent* function: def sale_order(): session.dummy = 'dummy data'

[web2py] Re: Web2py can't connect to mssql via pypyodbc - but possible to connect from idle

2015-07-13 Thread Rowdy
On 13/07/2015 16:02, achristoffersen wrote: (x-post from stackoverflow: http://stackoverflow.com/questions/31371462/web2py-cant-connect-to-mssql-via-pypyodbc-but-possible-to-connect-from-idle) I can connect via 'naked' pypyodbc, but not via the web2py DAL. For a non-web2py application, I

[web2py] Web2py can't connect to mssql via pypyodbc - but possible to connect from idle

2015-07-13 Thread achristoffersen
(x-post from stackoverflow: http://stackoverflow.com/questions/31371462/web2py-cant-connect-to-mssql-via-pypyodbc-but-possible-to-connect-from-idle) I can connect via 'naked' pypyodbc, but not via the web2py DAL. I installed pypyodbc as per these instructions: