durusmail: quixote-users: Customization of Quixote2 "Form" appearence
Customization of Quixote2 "Form" appearence
2008-04-04
2008-04-04
2008-04-06
2008-04-06
Re: Customization of Quixote2 "Form" appearence
2008-04-05
2008-04-05
2008-04-07
Customization of Quixote2 "Form" appearence
Ian Forbes
2008-04-06
Hi David

Thanks to you and all others who have responded on this issue.

Binger David wrote:

> Is there something preventing your Form subclass from overriding the
> Form methods that use these direct imports?

I tried this, and it gets the job done, eventually. I ended up
sub-classing a number of procedures, both from widget.py and form.py.
This may be the "correct" way but it is not very elegant.

I was tempted to subclass widget.render(), but that would require
rewriting every widget definition based on the Widget class as well as
every procedure in Form that refers to a Widget object. A small change
can have a lot of ramifications.

> If you are feeling violent, you could just assign your substitute
> Widget classes into the form and widget modules.

I tried this too. Basically I created local copies of form.py and
widget.py and tweaked import statements and "render" routines. This is
the most pragmatic approach, but least desirable with regards to "future
proofing".

Whatever the approach, you cannot get much done without spending a lot
of time studying the source code in form.py and widget.py.

> When we need special rendering, we usually manage to do it with css
> changes.

I have not looked at style sheets. Is there any Quixote related
documentation on style sheets available. Eg cookbook examples, howto,
sample application etc?

How do other frameworks handle forms? Is there anything to be learnt
from the form code in QP. Is there anything equivalent in competing
frameworks like Tubogears and Pylons?

Thanks


Ian

reply