[Zope] zope basics

Katherine Allard rlanham@speakeasy.net
Wed, 22 Nov 2000 18:43:56 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0038_01C054B4.2B2A1AC0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Using Zope, I have managed to put together a nice site for friends to =
create folders, pages and upload images, etc. But there are some =
fundamentals that are eluding me.

I am able to 'register' a new user through a form to create a new =
acl_user. But I cannot figure out how to let them login again using that =
name/password and be an AUTHENTICATED_USER with that acl_user =
name--other than Anonymous User. I tried to look at AUTHENTICATION_PATH, =
but my browser wants to download it--an empty file.

I can manage objects using dtml pretty well: create, delete, edit. If I =
can figure out how to authenticate a user, I would like to be able to =
add a property to new objects as they are created: =
(createdby:AUTHENTICATED_USER) so that I can control which objects get a =
checkbox (for delete) and an edit link for a particular user. =
InOtherWords, if a user creates a object, I want that same person to be =
able to go back and delete or edit that object. Anyone else can see it, =
but they won't be able to delete or edit the object.

This confuses me: manage_addProperty takes (id, value, type and =
optionally REQUEST) as args. What is the id? Is it the ID of the object =
that you want to add a property to? Or is it the ID of the new property? =
The Zope Quick Reference doesn't say, but I think it is the property's =
ID.=20

I am trying to learn from looking at the Zope interface work. After =
submitting the add property form, the page url looks like this: =
appRoot/objectname/manage_addProperty. I see that the objectname is =
behind manage_addProperty, I know the value, id and type are passed in =
the REQUEST. How can I take advantage of this following a line like:

<dtml-call expr=3D"manage_addImage(id=3Dtitle, file=3Dfile, =
title=3Dtitle)">

...to add a property to that image?

I found some useful tidbits at a howto page on Zope site somewhere. But =
it was pretty sparse and just whetted my appetite. I am coming from =
NT/IIS ASP world. So I am struggling. Can anyone point me to a richer =
source of samples that will help me get up this hill?

Thanks,
Richard

------=_NextPart_000_0038_01C054B4.2B2A1AC0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4207.2601" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Using Zope, I have managed to put =
together a nice=20
site for friends to create folders, pages&nbsp;and upload images, etc. =
But there=20
are some fundamentals that are eluding me.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am able to 'register' a new user =
through a form=20
to create a new acl_user. But I cannot figure out how to let them login =
again=20
using that name/password and be an AUTHENTICATED_USER with that acl_user =

name--other than Anonymous User. I tried to look at AUTHENTICATION_PATH, =
but my=20
browser wants to download it--an empty file.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I can manage objects using dtml pretty =
well:=20
create, delete, edit. If I can figure out how to authenticate a user, I =
would=20
like to be able to add a property to&nbsp;new objects as they are =
created:=20
(createdby:AUTHENTICATED_USER) so that I can control which objects get a =

checkbox (for delete) and an edit link&nbsp;for a particular user. =
InOtherWords,=20
if&nbsp;a user creates&nbsp;a object, I want that same person&nbsp;to be =
able to=20
go back and delete or edit that object. Anyone else can see it, but they =
won't=20
be able to delete or edit the object.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>This confuses me: manage_addProperty =
takes (id,=20
value, type and optionally REQUEST) as args. What is the id? Is it the =
ID of the=20
object that you want to add a property to? Or is it the ID of the new =
property?=20
The Zope Quick Reference doesn't say, but I think it is the property's=20
ID.&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am trying to learn from looking at =
the Zope=20
interface work. After submitting the add property form, the page url =
looks like=20
this: appRoot/objectname/manage_addProperty. I see that the objectname =
is behind=20
manage_addProperty, I know the value, id and type are passed in the =
REQUEST. How=20
can I take advantage of this following a line like:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>&lt;dtml-call&nbsp;expr=3D"manage_addImage(id=3Dtitle,=20
file=3Dfile, title=3Dtitle)"&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>...to add a property to that =
image?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I found some useful tidbits at a howto =
page on Zope=20
site somewhere. But it was pretty sparse and just whetted my appetite. I =
am=20
coming from NT/IIS ASP world. So I am struggling. Can anyone point me to =
a=20
richer source of samples that will help me get up this =
hill?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Richard</FONT></DIV></BODY></HTML>

------=_NextPart_000_0038_01C054B4.2B2A1AC0--