[Schevo-devel] [TUTORIAL] - Create and Evolve a Simple OO Application

Ilias Lazaridis ilias at lazaridis.com
Wed Feb 23 16:04:23 EST 2005


Ilias Lazaridis wrote:
[...]
> Adding a 1:N Relation
> =====================
> 
> add class "Drivers" to "entity.py"

class Driver:
     """Individual human being."""

     name = f.string()
     licenseType = f.string()

     _key(name)

     _icon('.apps.personal')

     _plural('Drivers')

     def __str__(self):
         return self.name


> add "1:n" relation to Cars

naturally, witin OO, this is done with adding a collection.

how is this done within schevo?

[please show only the neccessary code. Remember the context: newcomer, 
avoid excessive domain-knowledge. I just want that it works.]

> [preparation steps]
> 
> cmd: evo run myapp

evo run myapp - --use-disk

> GUI: add 3 Drivers

self-explaining

> GUI: edit cars, assign drivers [Car can be driven by several Drivers]

should be self-explaining, too.

[...]

.




More information about the Schevo-devel mailing list