Fw: [Zope] Login counter for each user
Martin Koekenberg
zope at digital-adventures.nl
Wed Oct 20 17:44:23 EDT 2004
Hello,
Ok, I found that my self. I'm not a Python programmer, that's my problem ;-)
'Logincount' is an int, how to do something linke LoginCount = Login Count +1
get the current value
+1
Store the new value.
Martin Koekenberg
----- Original Message -----
From: David Hassalevris
To: Martin Koekenberg ; zope at zope.org
Sent: Monday, October 18, 2004 12:19 AM
Subject: Re: [Zope] Login counter for each user
Martin,
Google is your friend! I found this in 2 seconds by entering "manage_change_properties" into Google::
Quoting from the source ../lib/python/OFS/PropertyManager.py:
def manage_editProperties(self, REQUEST):
"""Edit object properties via the web.
The purpose of this method is to change all property values,
even those not listed in REQUEST; otherwise checkboxes that
get turned off will be ignored. Use manage_changeProperties()
instead for most situations.
"""
def manage_changeProperties(self, REQUEST=None, **kw):
"""Change existing object properties.
Change object properties by passing either a mapping object
of name:value pairs {'foo':6} or passing name=value parameters
"""----- Original Message -----
From: Martin Koekenberg
To: zope at zope.org
Sent: Sunday, October 17, 2004 1:31 PM
Subject: [Zope] Login counter for each user
Hello,
I want to count every time a user logs-in.
I've a user map with the user profile in a DTML document. There are also 2 property's (Last login and logincount)
I've also a python script for these 2 property's.
But how can I do this
Logincount = logincount + 1
in the following python script:
doc=getattr(context, soid)
doc.manage_changeProperties(logincount=logincount + 1) ????????
doc.manage_changeProperties(lastlogin=sodate)
Simple questing with (I think) a simple answer, but for me a great help.
Thanks,
Martin Koekenberg
----------------------------------------------------------------------------
_______________________________________________
Zope maillist - Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20041020/ea4085af/attachment.htm
More information about the Zope
mailing list