Open starius opened 13 years ago
I'm not super motivated to add this, as it's not something I really need in my projects. However I'm open if someone wants to fork and send a pull request :)
It may be worth looking at for 0.3 .. once the plugin system is done, it would fit will with that I think.
I've had a go at this .. I was thinking to update Wt::Dbo::addField to take an enum of the editing field type 'lineedit', 'textedit', 'number spinner', etc.
Another way might be to have a lineedit for everything text .. and maybe query the max/average length of the data in the db and cache that somewhere.
I'll know more after I have the PagePlugin working.
IMHO, witty-plus should provide admin interface for editing any models, used by dbo::Session. It would be thing as Django Admin (one of great features of django): the admin could view models, edit entries (probably, with some limitations), use relations between models.
Probably this widget could use dbo::QueryModel. QueryModel itself is good feature of Wt, but it is too low-level, so developer of application has to write a lot for each model. The aim of model admin is to simplify it.