Add a function to parse model.
Update database module, to fix the function of templates.