[kforge-user] Deleting services/projects bug?

John Bywater john.bywater at appropriatesoftware.net
Mon Sep 10 13:30:23 BST 2007


Gunnar Johansson wrote:
> Hi,
>
> It appears that deletion of services and projects doesn't delete the  
> actual files and directories - is this a bug?
>   

No, not a bug. The files /are/ removed when the domain objects are 'purged'.

Otherwise, the entity is considered to be in the 'deleted' state, and 
capable of receiving and responding to an undelete() message.

Deleted objects are available from the getDeleted() function on the 
domain model registers, and implement the undelete() method:

 >>> registry.plugins.create('myplugin')
 >>> del(registry.plugins['myplugin'])
 >>> p = registry.plugins.getDeleted().['myplugin']
 >>> p.undelete()
 >>> registry.plugins['myplugin']

We don't have a model-wide 'empty trash bin'-type feature yet, where all 
'deleted' objects would be 'purged'. But we do have 'Aggregates' 
relationships in the domain model classes, so e.g. deleting a project 
will delete all memberships and services:

http://project.knowledgeforge.net/kforge/trac/browser/trunk/src/kforge/dom/project.py
(Albeit not actually refactored to be coded with domainmodel's 
'AggregatesMany' attribute class, yet.)

Best wishes,

John.


> Gunnar Johansson
>
>   




More information about the kforge-user mailing list