[web2py] Re: web2py 2.15.0b1

2017-07-06 Thread 黄祥
the error traceback about routes in application is fixed with *applications/test/routes.py* from *gluon.*fileutils import abspath from *gluon.*languages import read_possible_languages but the same problem is still exist, (no error occured but the result is not expected), what i expect is

[web2py] Re: web2py 2.15.0b1

2017-07-06 Thread 黄祥
tried routes in applications 1. cp ~/site/web2py/examples/routes.parametric.example.py ~/site/web2py/routes.py 2. cp ~/site/web2py/applications/welcome/routes.example.py ~/site/web2py/applications/welcome/routes.py 3. Start Web2py source ~/site/bin/activate python ~/site/web2py/web2py.py --nogui

[web2py] adapt sqlform.factory into form

2017-07-06 Thread 黄祥
hi, is it possible to adapt sqlform.factory into form? i've tried before but the result is not expected e.g. *controllers/default.py* account = db(db.account.id > 0).iterselect() list_show = [('chart', T('Chart') ), ('product', T('Product') ) ] *# not work no error occured, but the result is

[web2py] Re: web2py 2.15.0b1

2017-07-06 Thread 黄祥
Done in pydal issue _before_insert not work when required=True in latest version Done in web2py issue appadmin errors page didn't show detail information admin page, manage button (dropdown) not work (no errors occured) graph model didn't show the erd like in previous version can't use

[web2py] Re: web2py 2.15.0b1

2017-07-06 Thread Donald McClymont
Excellent work with this and lots of new features. No major issues with doing some testing so far - but just sharing an observation that a field definition along the lines of: below will cause an error if you insert a record and it attempts to use the default value. Field('plan_editor',

[web2py] Re: Any ideas on how to prepare web2py apps for GDPR

2017-07-06 Thread Pbop
Making an app ready for GDPR compliance does not have some checklist and is an ongoing commitment to privacy and security by design. Web2Py aligns well with GDPR in many ways out of the box. Here is a fairly comprehensive toolkit to assist in all of the moving pieces for GDPR compliance from a

Re: [web2py] Update hidden field / id for hidden field

2017-07-06 Thread backseat
You're right, of course.I, too, get frustrated by people asking the wrong question, and now I'm doing it... I have a form that requires a 'from_date' and a 'to_date', which is currently implemented using two fields. I like the idea of using the 'daterangepicker' tool, particularly the

Re: [web2py] Update hidden field / id for hidden field

2017-07-06 Thread Richard Vézina
I don't understand the use case... What the purpose of updating an hidden field? You can certainly create a dom element with an id and hidden it, but the usage for such a field is to manipulate dom element with js before reinject the proper selected data into the proper form field in order to the

[web2py] Update hidden field / id for hidden field

2017-07-06 Thread backseat
I want to use javascript to update a hidden field, but I can't find a way to give a hidden field an id which would make it much easier to update. SQLFORM.factory(..., hidden=dict(a="",b="")) will create the hidden fields, but not with an id. What's the best way to create non-database hidden

[web2py] Re: web2py 2.15.0b1

2017-07-06 Thread Paolo Valleri
Hi Stifan, regarding _before_insert open an issue on https://github.com/web2py/pydal with the example you posted for the other issues, open an issue on https://github.com/web2py/web2py Paolo On Thursday, July 6, 2017 at 2:20:25 AM UTC+2, 黄祥 wrote: > > tried to build from scratch with minimal

[web2py] Re: Dropdown not created using SQLFORM inspite of using references

2017-07-06 Thread Anthony
To get the default dropdown, you must specify the "format" argument when defining the db.room table. Anthony On Thursday, July 6, 2017 at 3:14:12 PM UTC-4, Prashant Tanksali wrote: > > Hi, > > This is my database definition: > >

[web2py] Dropdown not created using SQLFORM inspite of using references

2017-07-06 Thread Prashant Tanksali
Hi, This is my database definition: db.define_table('room',Field('room_size','integer',requires=IS_NOT_EMPTY()), Field('room_nos','integer',requires=IS_NOT_EMPTY()), Field('building',requires=IS_IN_SET(['DH Hill','James B Hunt'])),

[web2py] Re: trigger some js code on successful login

2017-07-06 Thread Anthony
On Thursday, July 6, 2017 at 12:41:23 PM UTC-4, Pierre wrote: > > can't find an easy way out of this > > so far i have : > > auth.settings.login_next = URL('controller','dosomething') > > > but this works only with direct login via top navbar button, not when > login occurs via decorated

[web2py] Re: trigger some js code on successful login

2017-07-06 Thread Leonel Câmara
Not entirely sure what you're trying to do, but what you're looking for is probably auth.settings.login_onaccept the functions you put there are executed before redirection and receive the form as argument. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: Blockquote in markmin

2017-07-06 Thread Richard Vézina
Martin, For the issue you said you resolve, you may consider sending a Pull Request over github... Richard On Tue, Jul 4, 2017 at 2:09 PM, Martin Weissenboeck wrote: > Ok, maybe my explanation was too long. > > Let's look at a simple example: > I have installed >

[web2py] trigger some js code on successful login

2017-07-06 Thread Pierre
can't find an easy way out of this so far i have : auth.settings.login_next = URL('controller','dosomething') but this works only with direct login via top navbar button, not when login occurs via decorated controller function : @auth.requires_login() def func(): pass -- Resources:

[web2py] Re: change login page layout

2017-07-06 Thread Peter
Hi Anthony, I wasn't sure if what I was doing was just a hack or how far it might impact. e.g if the application included some function with 'user' in the name like 'def ..user..()' it too would pick up the alternate layout (I think). Peter -- Resources: - http://web2py.com -

[web2py] Re: show form errors in html form

2017-07-06 Thread icodk
Thanks Antony You have to include code in the view to conditionally show the error > messages when they are present If I use the alternative you mentioned I will have to manipulate the inputs classes because I am using query.payment.js to validate and format some of the fields. If the code

[web2py] Re: Web2py Cron depreciado ?

2017-07-06 Thread Leonel Câmara
A alternativa é usar o scheduler do web2py ( http://www.web2py.com/books/default/chapter/29/04#web2py-Scheduler ), nota que podes não ter problemas continuando a usar o cron mesmo que isso não seja recomendado. Da próxima vez, por favor escreve a tua pergunta em Inglês, repara que este grupo

Re: [web2py] Re: function lazy_user at ...

2017-07-06 Thread Anthony
I would think it would make more sense to use the _before_update callback. Then you could simply select the records to be updated and add the relevant fields to the update fields before the update happens. Instead, though, I would probably just handle it all more explicitly -- before making the

[web2py] Re: change login page layout

2017-07-06 Thread Anthony
> {{if not 'user' in request.env.path_info:}} > {{extend 'layout.html'}} > {{else:}} > {{extend 'mylayout.html'}} > {{pass}} > Presumably this goes in the user.html view, so why bother with the conditional logic and not just use: {{extend 'mylayout.html'}} Anthony --

[web2py] Re: show form errors in html form

2017-07-06 Thread Anthony
You have to include code in the view to conditionally show the error messages when they are present. Alternatively, you can use this approach to creating custom form markup: http://web2py.com/books/default/chapter/29/07/forms-and-validators#Custom-forms. Using the form.custom.widget.fieldname

[web2py] Web2py Cron depreciado ?

2017-07-06 Thread felipe . marcos
Li que o Cron no web2py está depreciado, isso traria problemas caso eu atualize meu projeto não é ? Qual é a alternativa para o procedimento ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] show form errors in html form

2017-07-06 Thread icodk
I build a form like explained in : http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-in-HTML which man that I build an html form in the view and doesn't pass the form to the view The form has a name field In my onvalidation function I set form.errors.name="Name is not

[web2py] Re: Any ideas on how to prepare web2py apps for GDPR

2017-07-06 Thread Pierre
for cryptographists and "bunker" amateurs : http://bitwiseshiftleft.github.io/sjcl/ -- 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

[web2py] Re: change login page layout

2017-07-06 Thread Pierre
very useful thanks !! *will also use request.env.path_info to conditionally load js files*I had forgotten *user.html*silly me( beating myself. ) *« Le désert croît… malheur à qui protège le désert ! » F.Nietzsche* -- Resources: - http://web2py.com -

[web2py] Re: web2py 2.15.0b1

2017-07-06 Thread Dave S
On Thursday, July 6, 2017 at 2:31:03 AM UTC-7, Dave S wrote: > > > > On Thursday, July 6, 2017 at 2:27:05 AM UTC-7, Dave S wrote: >> >> >> On Tuesday, July 4, 2017 at 11:55:21 PM UTC-7, Massimo Di Pierro wrote: >>> >>> Please help us test the new web2py: >>> >>> >>>

[web2py] Re: web2py 2.15.0b1

2017-07-06 Thread Dave S
On Tuesday, July 4, 2017 at 11:55:21 PM UTC-7, Massimo Di Pierro wrote: > > Please help us test the new web2py: > > https://mdipierro.pythonanywhere.com/examples/static/nightly/web2py_src.zip > > https://mdipierro.pythonanywhere.com/examples/static/nightly/web2py_osx.zip >

[web2py] Re: web2py 2.15.0b1

2017-07-06 Thread 黄祥
just curious how do you shipping the package, for example, i just found there is fabfile.py in the root of web2py folder on github, but not in the web2py_src.zip i want to test fabfile.py too, and must grab it from github, not from the source one thanks and best regards, stifan -- Resources:

[web2py] Re: web2py 2.15.0b1

2017-07-06 Thread Dave S
On Thursday, July 6, 2017 at 2:27:05 AM UTC-7, Dave S wrote: > > > On Tuesday, July 4, 2017 at 11:55:21 PM UTC-7, Massimo Di Pierro wrote: >> >> Please help us test the new web2py: >> >> >> https://mdipierro.pythonanywhere.com/examples/static/nightly/web2py_src.zip >> >> >>

[web2py] Re: web2py 2.15.0b1

2017-07-06 Thread Dave S
On Tuesday, July 4, 2017 at 11:55:21 PM UTC-7, Massimo Di Pierro wrote: > > Please help us test the new web2py: > > https://mdipierro.pythonanywhere.com/examples/static/nightly/web2py_src.zip > > https://mdipierro.pythonanywhere.com/examples/static/nightly/web2py_osx.zip >

Re: [web2py] Re: web2py 2.15.0b1

2017-07-06 Thread Dave S
On Wednesday, July 5, 2017 at 2:01:06 AM UTC-7, Ramos wrote: > > on windows, in admin, the "Manage" Button does not pull dow.. > Also seen on older Fedora newer Firefox. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: web2py 2.15.0b1

2017-07-06 Thread Dave S
On Wednesday, July 5, 2017 at 7:22:21 PM UTC-7, 黄祥 wrote: > 2. http://127.0.0.1:8000/welcome/appadmin/d3_graph_model > graph model didn't show the erd like in previous version : > - relation between table not shown > - table fields shown is stacked with another table name > > Also seen on

[web2py] Re: DAL pg8000 adapter and JSON type

2017-07-06 Thread lyn2py
In addition, I have installed and using psycopg2 driver. I still run into the error: (column "json_string__tmp" is of type json but expression is of type text LINE 1: UPDATE "data_table" SET "json_string__tmp"="json_string"... ^ HINT: You

Re: [web2py] Re: web2py 2.15.0b1

2017-07-06 Thread Martin Weissenboeck
Hi, nice to have a new version. The problems with markmin2html remain, see issue 1671 https://github.com/web2py/web2py/issues/1671 A short summary - an ordered list inside a blockquote does not work: A controller: def mmtest(): t=""" --- This is an ordered list: + Item 1 +