If you benefit from web2py hope you feel encouraged to pay it forward by contributing back to society in whatever form you choose!

  • 0
    rochacbruno  9 years ago

    That is just an example, for better result, it is nice to have a DataBase class to define db, it should use Singleton to insure only one db instance defined.

    replies (1)
    • mirko 7 years ago

      Hi Bruno, I really loved this slice but can you please show how to create such a DataBase class using Singleton ? Many thanks!

Commented on:

Models are a very special web2py feature, but they like as scripts running on every request. Now with modules we can improve web2py performance with a more Pythonic code base.

Hosting graciously provided by:
Python Anywhere