I guess it depends on your desired HTML. If you subclass a Widget from
tw.forms.FormField, then it should be rendered as part of the form.
Diez
> I need to display a line of text within a form. I'm using help_text
> for that currently, but, it would render much more nicely if I had a
> Widget that put a label and the text as if it was a form field.
You want a Label field. I notice this isn't in the docs, but it works just fine.
Paul
> label = Label(text='text to display')
> works, and places the text in the table row and sets colspan=2
Cool
> I believe in fields.py,
> suppress_label = True
> should probably be set in class Spacer.
Yes, I think you're right. I don't really touch tw 0.9 these days, but
someone will probably apply this.
> label = Label(label_text='Label to display', text='display text in
> second column')
You can use:
label = Label(suppress_label=False, label_text='Label to display',
text='display text in second column')
And your solution works just fine too.
> However, if the documentation is autogenerated from the source, how
> did these classes get omitted? Thank you for the pointer to them.
It's not fully autogenerated, the sphinx source has a line for each
widget that's included. It would be a simple change to add these
widgets.
Paul
Might be - but as nobody cared to update the docs for the last release anyway,
it's a kind of a moot point. And actually a reason for me not to care to much
about 0.9 as well.
Diez
> Might be - but as nobody cared to update the docs for the last release anyway,
> it's a kind of a moot point. And actually a reason for me not to care to much
> about 0.9 as well.
Do you mean the docs were updated in the repository, but no-one
updated the website? If so, I should be able to hop on and do it, just
let me know.
Paul
Yep, that's what I mean. I asked for it weeks ago (also for a tw.dynforms
release, as that was forgotten), but Chris (or anybody else, but he was the
one pushing out the release) didn't react. Nor did I get access to the
machine myself, as it was planned several months ago.
Add the lack of any credits given to me for being responsible (in good and
bad) for most of the work on 0.9.8, and you have one fed up developer who now
maintains his own fork.
I work on bugfixes that result from my work at the 0.9.8 release, as I stand
by my code. But that's pretty much it.
Diez
> Yep, that's what I mean. I asked for it weeks ago
Ok, I've just updated ToscaWidgets and tw.forms. I'll hold on
tw.dynforms, pending release.
> (also for a tw.dynforms
> release, as that was forgotten)
Happy in principle to do this. I don't want to rush doing a release,
it's a bugger when that gets messed up. Should be able to do it over
the weekend though.
> Nor did I get access to the
> machine myself, as it was planned several months ago.
Lets take this one to private mail.
> Add the lack of any credits given to me for being responsible (in good and
> bad) for most of the work on 0.9.8, and you have one fed up developer who now
> maintains his own fork.
I think you got some great features in. It's a shame you feel fed up,
but, well, I understand where you're coming from. I'm actually
terrified of modifying tw0.9 code, it seems way too easy to break
things.
Take care bud,
Paul