Thank you,

yes, this is a little more than a proof of concept but my idea is to
extend it has needed. There could even be a "template manager" where
people could associate options with parts of the model to be included
(integrated with the web interface). To make things clear, I think a
good practice would be to define models in a yaml file, and model
methods, labels and helpers in a second python file (that would import
the generated code)...

one more thing:
I gave an option (not documented in the screencast) called "dbline".
Instead of defining a database with its variables explicitly, you can
just define the dbline directly, such as:
db:
  name: db
  dbline: mysql://username:passw...@localhost/test

Unfortunately (or not), I may take some time to answer in the next
week because I'll go for vacation to Sicily (have you heard of
it? ;)...

Best Regards

On Apr 11, 3:19 pm, mdipierro <mdipie...@cs.depaul.edu> 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 python yaml parser with
> compatible license and I think yes)
>
> I also think, along this line there is even more we can do:
>
> *) use the yaml also 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 the yaml using 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 <francisco....@gmail.com> 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 <francisco....@gmail.com> wrote:
>
> > > hi
>
> > > here is something I have done on web2py so you can define models using 
> > > the YAML lang.
> > > 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!


-- 
To unsubscribe, reply using "remove me" as the subject.

Reply via email to