Oh, right. Cool.

On Wednesday, May 1, 2013 6:13:17 PM UTC-4, viniciusban wrote:
>
> Yes, completely different. 
>
> Virtual fields/methods are defined at row level and receives row as 
> argument. @make_member_of() defines a method at table level. 
>
> For references, see this slide: 
> http://effectivedjango.com/slides/tutorial/models.html#5 
> And this documentation: 
> https://docs.djangoproject.com/en/1.5/topics/db/managers/ 
>
> TL;DR version: managers are functions that make common queries in a 
> table, avoiding code repetition throughout an application. 
>
> -- 
> Vinicius Assef 
>
>
> On Wed, May 1, 2013 at 6:52 PM, Anthony <[email protected] <javascript:>> 
> wrote: 
> > Is this different from using Field.Method: 
> > http://web2py.com/books/default/chapter/29/06#New-style-virtual-fields 
> > 
> > Anthony 
> > 
> > 
> > On Wednesday, May 1, 2013 5:34:48 PM UTC-4, viniciusban 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? 
> >> 
> >> -- 
> >> Vinicius Assef 
> > 
> > -- 
> > 
> > --- 
> > 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] <javascript:>. 
> > 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