[Zope] trying to do some developing

David Hassalevris bluepaul at earthlink.net
Sun Jul 25 18:54:09 EDT 2004


----- Original Message ----- 
From: "Pupeno" <pupeno at pupeno.com>
To: <zope at zope.org>
Sent: Sunday, July 25, 2004 1:34 PM
Subject: [Zope] trying to do some developing


I'm trying hard to develop an application in Zope and I'm crashing against
brick walls in every step.
It seems I still don't get the philosophy of Zope/web application
development.
How do I know what objects exists when a script I wrote run, and what
classes
those objects belong to and what methods does classes have... that is, the
functionality I have. In php I just had a bunch of variables printable by
phpinfo() and/or print_r (a print all command) to inspect structures and so
on... dir() doesn't work in zope, so, I don't have the standard python way
of
doing this.
My current questions are:
1) How do I get my username and related information ?
Pupeno,

This will get you your roles and username.
<dtml-var "_.SecurityGetUser().getRoles()">
<dtml-var "_.SecurityGetUser().getUserName()">

2) How do I add more methadata to users, like name and e-mail ?
Take a look at Chris Withers' SimpleUserfolder.  With it you can store user
name, password and anything else in an external database or even stored as
folder properties.
I easily found this link with a little googling
http://www.python.org/wiki/pub/EuroPython2004Slides/attachments/EPC2004-ZUF.pdf
ps - Just do not use it from the Zope Root!  Well you can but don't until
your getting good results in a test folder and you have a very good reason.

3) How do I list folders that are owned by the logged in user ?
 An interesting question is "how do I list folders owned by another user".
Your question I think is covered by the Zope Tutorial.  You might want to
read the Zope Book at www.zope.com.

4) How do I redirect the browser to another page ?
<dtml-call "RESPONSE.redirect(URL1+'/')"> is an example.

Thanks.
- -- 



More information about the Zope mailing list