Re: [web2py] web2py 2.16.01 legacy databases

2018-01-25 Thread 'DenesL' via web2py-users
Hi Ovidio, the issue is that appadmin seems to be generating improper links to display records in legacy databases. The sample code given to reproduce it, although not from a real scenario is syntactically correct. Can anyone else reproduce the issue?. Thanks, Denes On Wednesday, January 24,

[web2py] Re: auth.messages.subject

2018-01-25 Thread 'DenesL' via web2py-users
While doing what in auth?. you might be able to set one the default subjects in Auth.default_messages, namely: ['verify_email_subject', 'reset_password_subject', 'retrieve_username_subject', 'bulk_invite_subject', 'retrieve_two_factor_code_subject', 'retrieve_password_subject'] On Wednesday,

Re: [web2py] web2py 2.16.01 legacy databases

2018-01-25 Thread Ovidio Marinho
Be clearer, which databases are you using as a legacy? And what kind of operation do you want to do? [image: http://itjp.net.br] http://itjp.net.b r *Ovidio Marinho Falcao Neto* ovidio..

[web2py] Using args with default function in controller

2018-01-25 Thread 'Yan Wong' via web2py-users
I have a non-default controller with a default function, index(), which uses the index.html view, and which accepts arguments that begin with an @ sign. When I go to www.mysite.org/controller/index/@arg1 it rightly fires off the index() function with args = ["@arg1"]. And when I go to www.mysit

Re: [web2py] web2py 2.16.01 legacy databases

2018-01-25 Thread 'DenesL' via web2py-users
MS SQL server 2012 (at the top of my first post) using *appadmin* to display tables/records. Clear enough?. On Thursday, January 25, 2018 at 9:33:51 AM UTC-5, Ovidio Marinho wrote: > > Be clearer, which databases are you using as a legacy? And what kind of > operation do you want to do? > > > >

[web2py] Enabling or disablink link on a grid "on the fly"

2018-01-25 Thread Andrea Fae'
Hello guys! I have a grid like this form = SQLFORM.grid(query, args=[tipologia], fields=[db.ticket.id, db.ticket.created_on, db.asset.tipo, db.asset.seriale, db.asset.modello,db.asset.nome, db.asset.uo, db.asset.is_active, db.ticket.anomalia, db.ticket.chiuso, db.ticket.risoluzione], links = [

Re: [web2py] SQLFORM IS_NOT_EMPTY validator dependent on the value of another request vara

2018-01-25 Thread tim . nyborg
You need to use the onvalidation option in SQLFORM to do validation spanning several columns: def _validate_other(form): if form.vars.select_field == 'Other' and not form.vars.other: form.errors.other = 'Please provide a value' form = SQLFORM(table, onvalidation=_validate_other) for

[web2py] Re: auth.messages.subject

2018-01-25 Thread Anthony
There is no auth.messages.subject. However, there are more specific auth.messages for particular types of emails sent by Auth. You can find them listed at http://web2py.com/books/default/chapter/29/09/access-control#Auth-Settings-and-messages or https://github.com/web2py/web2py/blob/623f3b99

[web2py] Re: Using args with default function in controller

2018-01-25 Thread Anthony
See https://github.com/web2py/web2py/blob/master/examples/routes.parametric.example.py#L41. You can use the parameter-based router and specify a list of functions associated with the controller in question -- that will allow the router to determine that the arg is really an arg when the functi

Re: [web2py] Re: auth.messages.subject

2018-01-25 Thread Mark Billion
This was awesome and Marcelo's answer was perfect (yours, as always Anthony, is spot on too). On Thu, Jan 25, 2018 at 12:53 PM, Anthony wrote: > There is no auth.messages.subject. However, there are more specific > auth.messages for particular types of emails sent by Auth. You can find > them li

[web2py] Re: web2py IDE

2018-01-25 Thread Mirek Zvolský
If you use a simple editor only, it is similar as the work with web2py integrated environment. You can just create and edit python files. Of course the suitable editor must be special for Python writting: It must at least convert the Tab into 4 spaces. And work with utf-8. If you want more, then

Re: [web2py] web2py 2.16.01 legacy databases

2018-01-25 Thread Ovidio Marinho
https://stackoverflow.com/questions/337503/whats-the-best-practice-for-primary-keys-in-tables?rq=1 Em quinta-feira, 25 de janeiro de 2018, 'DenesL' via web2py-users < web2py@googlegroups.com> escreveu: > MS SQL server 2012 (at the top of my first post) using *appadmin* to > display tables/record

Re: [web2py] Forcing SSL/HTTPS

2018-01-25 Thread Yi Liu
I would like to update this highly ranked post: I created a new model secure.py and add: FORCED SSL # session.secure() if not request.is_https: redirect(URL(scheme='https', args=request.args, vars=request.vars)) # I skipped the cro