ok, next week I will try to make something out of this. If anyone likes this idea and wants to suggest something, now is the time. Massimo, your idea is really interesting but probably requires some kind of "sync", so that the user can change things in the HTML and see it reflected in the YAML tree, you suggest. This seems fertile ground to build/integrate a lot of things on top of it. Maybe I will divide it in stages, I don't know...
Thanks, Best regards On Apr 11, 3:19 pm, mdipierro <[email protected]> wrote: > This is fantastic. > I think this should be integrated in web2py or at least provide a > plugin for it (assuming there is a pure pythonyamlparser with > compatible license and I think yes) > > I also think, along this line there is even more we can do: > > *) use theyamlalso to define which actions are needed, which crud > forms and crud selects should be in each action, what their parameters > should be, which default layout to use (downloaded from web), > *) edit theyamlusing a tree-like gui > *) save the state so that the yams stays attached to the generated app > *) Instead of generating code, provide an alternative scaffolding app > that generates models dynamically using the example > inhttp://groups.google.com/group/web2py/msg/97ebeff3781e6739 > > In the end the entire app can re presented as a tree: > > - models > - db > - table 1 > - field 1 > - field 2 > - type > - length > - validator > - widget > - widget attrbute > - table 2 > - field 3 > - controllers > - index: > - authentication: everybody > - show in menu: yes > - create form 1 > - for table 1 > - set field2 writable false > - select form 1 > - filter records by query > - show only columns field 1, field 2 > - view > - extends "http://...../web2py.plugin.sleek.w2p" > - h1: "Hello World" > - div > - p: "insert a record below" > - p > - place crud form > - h2: > - div > - p: "selected record" > - place crud select > > On Apr 11, 7:49 am, blackthorne <[email protected]> wrote: > > > > > For some reason the attachment didn't came up. > > Here is the missing code:http://bit.ly/dgv8Qb > > > Best Regards > > > On Apr 11, 1:37 pm, Francisco Ribeiro <[email protected]> wrote: > > > > hi > > > > here is something I have done on web2py so you can define models using > > > theYAMLlang. > > > I also included a 12 min screencast to show how you can use > > > it:http://vimeo.com/10837176 > > > > checkout the template file in models/yaml/template.yml (inside the > > > w2pymt.zip) for options > > > Please send me all comments, questions, critics but keep in mind this is > > > little more than a proof of concept > > > > Enjoy!

