[web2py] Re: Global formstyle configuration

2012-09-02 Thread Anthony
Are there other examples of potential global configs? For forms, perhaps we could set the default via a formstyle class attribute, which you could then change once in your code. Anthony On Sunday, September 2, 2012 11:27:42 AM UTC-4, viniciusban wrote: I think it would be nice to have some

[web2py] Re: Global formstyle configuration

2012-09-02 Thread Massimo Di Pierro
That would affect all the apps at once. On Sunday, 2 September 2012 10:34:29 UTC-5, Anthony wrote: Are there other examples of potential global configs? For forms, perhaps we could set the default via a formstyle class attribute, which you could then change once in your code. Anthony On

Re: [web2py] Re: Global formstyle configuration

2012-09-02 Thread vinicius...@gmail.com
Anthony, another one would be hide_error. These are settings affect app style of visualization and user interaction. So, it makes sense to be defined once and overriden when necessary. -- Vinicius Assef On 09/02/2012 12:34 PM, Anthony wrote: Are there other examples of potential global

Re: [web2py] Re: Global formstyle configuration

2012-09-02 Thread Bruno Rocha
This should work.. # On models class SQLFORM(SQLFORM): ''' Customized SQLFORM ''' def __init__(self, *args, **kwargs): kwargs.setdefault(formstyle, divs) super(MySQLFORM, self).__init__(*args, **kwargs) On Sun, Sep 2, 2012 at 8:11 PM, vinicius...@gmail.com

[web2py] Re: Global formstyle configuration

2012-09-02 Thread Anthony
On Sunday, September 2, 2012 3:11:16 PM UTC-4, Massimo Di Pierro wrote: That would affect all the apps at once. Oh, yeah, good point. Probably not the best approach. Anthony --

Re: [web2py] Re: Global formstyle configuration

2012-09-02 Thread vinicius...@gmail.com
Yes, Bruno. But wouldn't it be better if it was just a config? On 09/02/2012 09:09 PM, Bruno Rocha wrote: This should work.. # On models class SQLFORM(SQLFORM): ''' Customized SQLFORM ''' def __init__(self, *args, **kwargs): kwargs.setdefault(formstyle, divs)

Re: [web2py] Re: Global formstyle configuration

2012-09-02 Thread Marin Pranjić
Current.response.formstyle maybe? Marin On Sep 2, 2012 9:11 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: That would affect all the apps at once. On Sunday, 2 September 2012 10:34:29 UTC-5, Anthony wrote: Are there other examples of potenti... --