We (Sahana-Eden) use to do such things with web2py, in connection with
a RESTful API.

See for example:
http://vita.sahanafoundation.org/eden/pr/person/1
http://vita.sahanafoundation.org/eden/pr/person/1/address

It can also speak several XML formats, of course, and JSON;
http://vita.sahanafoundation.org/eden/pr/person/1.xml
http://vita.sahanafoundation.org/eden/pr/person.json

The code behind that looks like:

Person Model:
http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/annotate/head%3A/models/02_pr.py#L2
http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/annotate/head%3A/models/04_pr.py#L2

The actual Person controller:
http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/annotate/head%3A/controllers/pr.py#L101

HTML frontend controller:
http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/annotate/head%3A/models/01_crud.py#L763

Backend extensions:
http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/annotate/head%3A/modules/s3xrc.py#L2

Regards,
Dominic

On 3 Sep, 13:38, "portly.shor...@googlemail.com"
<portly.shor...@googlemail.com> wrote:
> Is it possible to edit a parent + child model as a single form and
> automatically create both the parent and respective children in the
> database.
>
> As an example, say I have a Person model and the person can have
> multiple Addresses. Is it possible to create a Person and add several
> addresses on a single form at the same time.
>
> Out of the box with Web2Py I know this is not possible but as it is a
> common situation I'm sure someone has already solved this particular
> problem.
>
> Many Thanks in advance for any help.
>
> Portly.

Reply via email to