Kevin Dangoor, el jueves 22 de diciembre a las 16:22 me escribiste:
>
> These things are really rough and the audio is a little too quiet...
> but I really wanted to get something out there so that we can talk
> more about widgets/forms/free, but extensible CRUD.
>
> http://www.turbogears.org/docs/devcasts.html
>
> Hopefully, these will give an idea of the features and we can do a bit
> more concrete comparison with other solutions.
Great devcasts!
What about moving (or at least giving the option) form_order to
sqlwidgets(sqlclass, form_order=None), so you can avoid mixing up the
model and controller. You can add the extra parameter to DataController
too. I know sometimes (when you use the form in several places) it could
be much more comfortable to specify it directly in the model, but when you
just add a DataController, you can perfectly put the form_order there
(once).
And maybe it could be even better to have an option to set the order
directly in the template (because after all this is a view issue). I don't
really know how to implement it, but I think the form.insert() would be
the perfect place (like ${form.insert(widget_order=('pageName', 'data'))}).
This could be used too to use declarative forms, this way you don't care
about the widget ordering in a form and you can do something like:
class MyForm(TableForm):
pageName = TextField()
data = TextField()
MyForm.__dict__ would still be unordered but that's fine, because you just
type form.insert(widget_order=('pageName', 'data')) in the template and
get it ordered.
And this way you get the view, model and controller well separated (I
don't really care how the widgets are orderen in the form, that's the user
interface designer problem ;)
Just a wild idea...
--
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
.------------------------------------------------------------------------,
\ GPG: 5F5A8D05 // F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05 /
'--------------------------------------------------------------------'
Que barbaridad, este país se va cada ves más pa' tras, más pa' tras...
-- Sidharta Kiwi