Use UserDb, and then make some quick hacks to the database structure and to the various forms. If it is your first time inside a Zope module, it might take you a few hours to work it out, but it is easy to make changes from there. The forms are in the .dtml documents in the Product directory, and teh queries are at the bottom of UserDb.py. Enjoy. Actually, I suppose that current wisdom would say that you should use the Generic User Folder to do this, but I have no experience whatsoever with that product, and UserDb is solid and easy to work with. --sam scott kaplan wrote:
Hi All, I have a question about adding additional information to a user object (or another way to do this) I want to have an attribute for each user. i.e. each user will have a subject attribute, so when they view a certain page, only messages of that subject appear
Since this is only one bit of info, I don't want to make a separate permission for each subject, because that would be very un-extensible
So what's the best way to do this:
1)Do i try to hack info into the authenticated user object (A follow-up question is how do i go about doing this, where is that object defined?)
2) Do i associate each user with a database entry with the additional info (This seems like a bit of overkill for my purposes)
3)Do i add the information into the product I am working with (while this would work, i am not how to insure the information between then user folder and my product are the same)
Or do I do it some other way? I was just wondering what people think. Thanks a lot -Scott Kaplan
On Mon, 6 Dec 1999, Michel Pelletier wrote:
-----Original Message----- From: jiva@devware.com [mailto:jiva@devware.com] Sent: Sunday, December 05, 1999 1:32 AM To: zope@zope.org Subject: [Zope] Return values for html display?
So, I have set up some external methods that do some stuff, and I ultimately want to display html from them. However, I find the only way I can do this is to return it from my function. print() seems only to send it to the zserver log.
Actually, it writes it to stdout, which end up in the logs.
Soooo, my question is, is this by design?
Yes.
Is there some way to get print() to actually shoot html to the page the end user sees?
Probably not.
Is there a reason I wouldn't want to do this?
No, it's quite useful. What you're looking for is RESPONSE.write(). Note, error's don't get sent to the browser in their usualy nicely formated way if you use RESPONSE.write(). Everything else works the same however (ie, the transaction gets aborted, the exception can be caught by a <dtml-try> etc..)
-Michel
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope No cross posts or HTML encoding! (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope No cross posts or HTML encoding! (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )