The best practice says that:

1. have the latest web2py version
2. create your classes and custom objects in /modules
3. create in /modules a class to hold your settings properties or use
gluon.storage.Storage
4. In models import your modules with your classes and objects (you can use
'current' object to pass data between models and modules)
5. define database tables in models (models are executed alphabetically)
6. Use controllers only do determine the control flow of app, complex code
go to /modules and instantiate/call in controller/model
7. Many HTML HELPERS in controllers
8. Less HTML HELPERS in views
9. take care about security defining the response.generic_patterns and
proper authentication/siganature
10. READ THE BOOK (but not only the book, the source code, the group)



On Fri, Jul 22, 2011 at 2:54 AM, Jagmal <[email protected]> wrote:

> Hi All,
>
> I am new to web2py framework and have been working on a small project
> to set up authentication. In here, I would like to configure default
> options. For ex, I would like to disable registration. I am wondering
> what is a good way to do it.
>
> Should I create a model class and put these default settings there?
> Also, should I be using the same model class to configure DB and other
> application wide settings?
>
> Regards,
> Jagmal




-- 



--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]
[ Aprenda a programar: http://CursoDePython.com.br ]
[ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ]
[ Consultoria em desenvolvimento web: http://www.blouweb.com ]

Reply via email to