April 23 2008posted by Santi

Creating KMKey Patterns

A KMKey Pattern is the way to say how we can work on each type of our projects or files. It is like an object type, plus a workflow, plus a set of tasks, plus a set of subojects, plus permissions definition, plus documents to generate, etc. Similar concepts, in other areas, are business patterns or ISO 9000 process definitions. ...

April 2 2008posted by Santi

Managing newnesses

When working in group, it's important to be notified of changes that others do and we are interested on.    When working with a lot of data, it's also important not to be disturbed by notifications referencing objects we are not interested on.   In KMKey, we name that logic newnesses management.

Nowadays, KMKey 3 trunk has a simple notifications framework, ...

March 24 2008posted by Santi

Managing permissions in KMKey

Permission management in Zope is so flexible that it's necessary to define a way of work to obtain good results.  We want KMKey 3 to be able to have projects in any place in a tree of containers.   And we also want people to access in many ways:

   1. Someone could have access to the root of containers ...

March 6 2008posted by Santi

Render widgets from own code

CPSSchema's allows to render automatic pages for edit, create or view objects, based on defined portal_layouts. But, how we can render directly the widgets in theese layouts, so we can write our own page template ?  Using KMKey it's simple, just inherit your view from Products.KMKeyCore.baseview.KMKeyBaseView, and use the renderWidget function:

  
    def renderWidget(self, layout_id, widget_id, proxy=None, ...

February 22 2008posted by Santi

Debugging Zope 2.9+

In Zope 2.9, the refresh feature doesn't work, so the best way to debug when developing is:

   1. Run your zope using bin/runzope, and use CTRL-C to restart every time you want to test your changes

   2. Use import pdb; pdb.set_trace() wherever you want in your code. This will break the zope execution in that point ...

February 4 2008posted by Santi

Expressions in CPS and KMKey

When configuring CPS in the ZMI, there are a lot of places where you can write TALES expressions. In each case, the available bindings are different, and it's difficult to remember it. Here there is a list of available expressions:

Expressions used in Default Value of Fields

        mapping = {
            'field': self,
            'datamodel': datamodel,
            ...

January 30 2008posted by Santi

Cataloging and indexing in CPS

For Zope developers is usual to inherit from CatalogAware and overload index_object or reindex_object methods. In CPS, due to the existence of a IndexationManager, that does this work. The main reason of this manager is ensure that object indexation is done just once per object and transaction, resulting in a better performance. All this is explained in CPSCore/doc/transaction_managers.txt

It's ...

January 15 2008posted by Santi

Manage Relations within CPSSchemas

ent asked question is how to use CPSSchemas to manage relations between objects. We have not found another way that the use of “Internal Link Widget”, which has no guarantee about the deletion of linked object, or the one described here: http://www.cps-project.org/sections/documentation/users/creer_document_flexible , which is not a relation, but a containment of repetitive fields.


So, we ...

December 12 2007posted by Santi

Subversion Repository Structure

Subversion Repository Structure

Since I have recently discovered a new useful subversion feature named svn:externals, I have used it to create the new KMKey 3 repository. The feature consist in to assign a property to a svn directory that is used to fetch modules from other paths in the repository, or even from other subversion repositories. ...

November 21 2007posted by Santi

How to internationalize in KMKey

As you know, we use CPS as platform, but we also want to use Five when possible, so most of code produced be ready to jump to new versions of Zope.   One of firsts doubts when beginning to develop over CPS is how to internationalize our code.   CPS 3.4 uses Localizer, not Zope 3 internationalitzation utilities.   The better aproach was ...