Hello, I've made this example using the DAL with Flask, the goal was just to show how the DAL may be used alone in other projects without depending on web2py.
I thought about doing this example using GTK or other Python project, but at the time seemed more useful to use a different web framework. I know that the code is weird and not very "Pythonic", but the goal was not to create a "marriage" or an official recipe of hoe to do that. That was made just to show a quick example of using DAL StandAlone. I do not have much experience with Flask (as I have with web2py), but I like a little of how things are done in Flask. but I believe the way to do this in web2py is equally good. And things like Wizards, plugins and other kind of tools is important too. 2010/10/27 VP <vtp2...@gmail.com> > I saw this marriage between web2py and Flask (a strange one, I'll give > you that)... but I'm thinking web2py might be able to improve its > syntax/convention as follows. > > Here's Flask: > > @app.route('/insertdog/<name>/<age>/<owner>') > def insertdog(name,owner,age): > # other things > > > Here's web2py: > > def insertdog(): > name, owner, age = request.args(0), request.args(1), > request.args(2) > # these variables might need to be further (type)validated > > > I think there's something not very elegant about this. Ideally, this > is what I want to see in web2py > > def insertdog(name, owner, age): > # request.args should be automatically assigned to these arguments > > > Isn't this a lot nicer? Will this be feasible? Does it contract or > mess up other web2py's ways of doing things? > > If not, can this be done? > > Honestly, I think this is where the money is... at least more so than > the cube2py, wizard thingies. :-) > -- http://rochacbruno.com.br