[Zope] Login counter for each user

Cliff Ford Cliff.Ford at ed.ac.uk
Mon Oct 18 02:46:44 EDT 2004


There was a recent comment to the effect that you should not use a 
property to store a count because each increment adds a copy of the 
whole object to the ZODB. Use a database instead.

Cliff

Martin Koekenberg wrote:
> 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 
> Logincoun = 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 )


More information about the Zope mailing list