smlacombe / sageo

A rewriting of check_mk multisite web interface with the Flask web framework
GNU General Public License v3.0
16 stars 1 forks source link

Optimize database operations #8

Open smlacombe opened 11 years ago

smlacombe commented 11 years ago

SqlAlchemy and WTFormsAlchemy have many mecanisms to facilitate database in/out operations. Ex: To get the object from a form, we could just, according to the creator of WTForms-Alchemy, do this:

def get_view(self):
        view = View()
        self.populate_obj(view)
        return view

However, the view returned, contains objects that are not originaly contained inside. This is the case with sorters and groupers that magically appears in the view object. This is resulting into some difficulties to get the objects commited. Thus, to facilitate code maintenance, we must find a better way to update the objects.

Related issue https://github.com/kvesteri/wtforms-alchemy/issues/32