• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mapping ORM database to create forms automagically?

#1
[eluser]gh0st[/eluser]
As part of the Modular CMS we are building we are finding we are repeating a lot of boilerplate code; whilst most of this can be extendable via MY_Controller; the main problem seems to be creating forms on the fly from database tables, similar to Scaffolding or PEAR's QuickForm.

IE:
/module/blog/admin/editor/edit/1
/module/news/admin/add/
/module/gallery/admin/add/

Rather than doing all this over and over isn't there a way to rapidly do scaffolding on the ORM database and build up forms, including image uploads; include and handle relationships, etc?

This way we don't have to repeat basic functionality; or have something we can use out-of-the-box and not worry so much on repeating boiler plate code.

In django you can define ImageFields, TextFields, etc and it will generate the stuff for you.

Ideally, we'd like it to pick up the fields from the DB, generate forms for us to use or extend.

Any notes/help on this would be great.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.