[Web-SIG] Standalone WSGI form framework

Daniel Miller millerdev at gmail.com
Fri Mar 17 02:32:22 CET 2006


Alan Kennedy wrote:
> [Alan Kennedy]
>> I'm looking for a framework-independent form library. I'm using the
>> Quixote forms library at the moment, inside my own framework, but
>> would ideally like something more WSGI oriented, so that it is easier
>> to mock and unittest.
> 
> [Daniel Miller]
>> I actually wrote a few simple classes on top of CherryPy that exposes
>> the Spring webmvc Controller interface as well as the
>> SimpleFormController class (those are the two main building blocks
>> I found most useful in Spring's WebMVC). My SimpleFormController
>> implementation uses FormEncode for validation. I'd be willing to
>> share the code if you're interested.
> 
> I'd be very interested to see that, and potentially use it, if you're
> willing ...

Sure. You can download it here:
http://www.openpolitics.com/pieces/files/cherrymvc_r83.zip

A few additional notes:
- I have (temporarily?) named the project CherryMVC. This will probably change in the future (ideas welcome).
- There is an experimental WebStack implementation (StackMVC) as well. It has not been tested at all.
- I'd like to make this into a more generic WSGI framework that is not directly tied to CherryPy, but I haven't taken time to do that yet.

If you make improvements that you'd like to share, by all means send them over so I can put them in the main codebase.


> 
> [Daniel Miller]
>> I think "the one true web framework" could be made for Python if
>> someone took the best ideas from Spring WebMVC and made a few
>> component-ized building blocks on top of which complex and widely
>> varied applications could be built.
> 
> ...
> 
>> However, to make this possible we'd most likely need a standard
>> request object (or at least an interface definition).
> 
> ISTM that WSGI eliminates the need for that. Is there any specific
> thing you have in mind that WSGI doesn't cover?

Not that I know of, it's just a bit low-level (i.e. I want a nicer API than the WSGI env). Maybe the new request object in Paste will do?

~ Daniel



More information about the Web-SIG mailing list