Ricardo, not, in my oppinion.

First, because this approach is used by a developer, who knows how
table columns are named. He owns the source code, right? ;-)

Second, because it's designed to be used mainly in models/ files, to
organize methods of a table. Again, we face the 1st point, above.




On Thu, May 2, 2013 at 10:44 AM, Ricardo Pedroso <[email protected]> wrote:
> On Wed, May 1, 2013 at 10:34 PM, Vinicius Assef <[email protected]> wrote:
>> I created a decorator to allow binding a function to a Table instance.
>>
>> IMHO, this helps organizing models, creating something similar to
>> Django's managers.
>>
>> To an example, see: https://gist.github.com/viniciusban/5497532
>>
>> To get an scaffolding application with organized model files and this
>> decorator embedded, visit https://github.com/viniciusban/my_welcome
>>
>> Hope this helps somebody.
>>
>> Massimo, what do you think about embedding this decorator (or
>> something better) in web2py, to allow creating table methods?
>
> Hi Vinicius,
>
> Does it make sense to check the attribute existence in the instance
> before setting it?
> or add a safe=True/False arg to check or not?
>
> Ricardo
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to