I'm going for the module approach, I find that easier to organize. 
Actually I did define some tables like you suggested but I thought maybe 
his way was a more pythonic or proper one.

Thanks for your answer.



On Thursday, March 2, 2017 at 8:49:28 PM UTC+1, Anthony wrote:
>
> Looks like you would define those methods in your model classes (when 
> needed). I would say this whole approach is overly complex, though. If you 
> want to avoid the overhead of defining models, first simply set 
> lazy_tables=True 
> <http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Lazy-Tables>.
>  
> If that's not enough, then try conditional models 
> <http://web2py.com/books/default/chapter/29/04/the-core#Conditional-models>. 
> Finally, if you would like to move model definitions to modules, you can do 
> so by simply wrapping standard web2py db.define_table calls inside a 
> function rather than using the complex class-inheritance-based approach 
> shown in this slice.
>
> Anthony
>
> On Thursday, March 2, 2017 at 10:01:09 AM UTC-5, Lars wrote:
>>
>> Hi,
>>
>> Could someone please explain to me how to use hooks in that code ? I 
>> can't find where the set_ functions are defined : so I guess I have to 
>> write them but where ? And what are they different from the define_ ones ?
>>
>>
>> http://www.web2pyslices.com/slice/show/1479/model-less-apps-using-data-models-and-modules-in-web2py
>>
>> Thank you
>>
>

-- 
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 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/d/optout.

Reply via email to