[Zope] creating object in local dir from add form in product dir

John Hunter jdhunter@ace.bsd.uchicago.edu
Mon, 25 Mar 2002 15:57:54 -0600


>>>>> "John" == John Hunter <jdhunter@ace.bsd.uchicago.edu> writes:

    John> I am developing several ZClasses in a Products dir.  I want
    John> managers to be able to instantiate some of the ZClasses from
    John> the /manage interface and users to be able to instantiate
    John> others from a non-manage URL.  Users will access

    John> http://some.host:8080/path/to/MedBio305

    John> where MedBio305 is an instance of my ZClass Course which has
    John> a Method index_html that allows users to view the folder.
    John> Within that index_html file, I have some links which point
    John> to the add form of a Project ZClass that I want users to be
    John> able to instantiate:

    John> <a
    John> href="/Control_Panel/Products/Course/Project_addForm>upload</a></td>

    John> My Project_addForm calls a python script add method.  I want
    John> that script to instantiate a Project ZClass in
    John> /path/to/MedBio305/, but

OK, the example on p139-140 of The Zope Book where a
SmallAnimals/kangarooMouse has the Zoo/Vet/vaccinate script applied to
it solved this one for me.

 <a href="Control_Panel/Products/Course/path/to/MedBio305/Project_addForm>upload</a></td>

works because the last object before the script is the context, in
this case MedBio305

Cheers,
John Hunter