[Cubicweb] Correct use of the 'person' cube

Nicolas Chauvat nicolas.chauvat at logilab.fr
Thu Jul 12 22:43:21 CEST 2012

On Thu, Jul 12, 2012 at 09:24:05AM +0200, St├ęphane Bugat wrote:

> I've started to reshape my datamodel but discovered that there was
> already a 'UserAccount' entity defined in cubicweb-blog (although it
> was not directly visible on the SVG website scheme...).

I wrote this. :)

> I really have difficulties to understand how all this works. It
> seems that UserAccount is somehow linked to CWUser but the
> 'sobjects.py' file in cw-blog is hard to embrace.

At some point, I add a "internet newspaper" application on my laptop
that I would use to gather all the articles of my news feeds and all
the tweets of my contacts in one place.

Since a news article can be modeled as a blogentry and a tweet as a
microblogentry, I wrote the first version of the datafeed extension
that downloads everything, parses everything and creates
(micro)blogentry entities.

In sobjects, you'll find the code related to downloading and parsing
the feeds and tweets and storing the data locally.

I took the opportunity to try to fix the CWUser-as-a-person mistake
and have a distinct UserAccount entity. This entity exist only in the
blog cube. My goal was to show in the blog cube that it could work and
use it to convince the other developers of CW that we should plan the
switch at the global level.

Short answer is CWUser != UserAccount, you may just ignore UserAccount
for what your are doing at the moment (unless I misunderstood what you
are trying to achieve, which is not an option to rule out too
quickly... just show me your code :).

Nicolas Chauvat

logilab.fr - services en informatique scientifique et gestion de connaissances  

More information about the Cubicweb mailing list