You are not logged in Log in Join
You are here: Home » Members » rossl » External method to create dtml/sql for zclass properties

Log in
Name

Password

 
 

Folder icon External method to create dtml/sql for zclass properties

This is an extremely experimental work in progress. It is recommended only for serious head-banging zope experimenters.


I use it to save myself some typing when I'm building zclass based apps - particularly when I want to be able to switch over to ZSQL methods after finishing the design and user testing - it generates dtml forms and methods for the ZODB and methods for ZSQL - you still need to do lots of gluing to make any of these work, but it sure gets you off to a head start!

This is potentially of interest for a much more sophisticated kind of zclass...but it may be some time before I get around to working on it.

If you want to discuss this code and concept, please whack the wiki here.

It is currently in the form of a relatively crude external method. To use it, you must be able to make a new external method in a zclass and then try it. (if you don't know how to do that, this is definitely not for you yet).

It generates some skeleton dtml and zsql methods using the variables defined on the your zclass Basic property sheet (note - could be extended to others but as is, only the one called Basic is examined).

To install:

  • Copy it into your Extensions subdirectory as extendzclass.py
  • Open an existing zclass
  • Add a new external method
  • Type extendzclass as the id
  • Type makemethods as the function name
  • Type extendzclass as the python module file

View and "try" the new external method.

A bunch of zsql and dtml methods will appear.

Some of these may be useful as skeletons to which you can add your business logic.

Saves a bit of tedious typing and might be useful as part of a future extension of zclasses...


 Title   Type   Size   Modified   Status 
 extendzclasswiki Folder   2000-06-26 published
 Python external method Edit object Software Release   2000-05-20 published