Store a Relation in plone.app.registry

Hi,
is it possible and usefull to store a Relation to a Folderobject as Importtarget for various Contenttypes in the plone.registry? Or should i use a simple TextLine Schema Field for a Path Piece? What i want to do, is the following: I want import, in a Browserview, a RSS Feed from an external Site and i would like to create LinkTypes with Title/URL of the FeedEntries in a Folder. This Folder/Target should be configurable via plone.registry.

I am unclear on whether you want to use the registry to store this. Registry should be reserved for site configuration, or application configuration, IMHO.

I think you ought to consider the following alternatives:

(1) Have your browser view just save an attribute on your content; have that attribute be a PersistentList of title, url pair tuples.

(2) Do same as above, but use annotations (see docs) to store instead of a simple attribute. Not much to gain here.

(3) Use something like rapido and/or souper as a storage layer.

Incidentally, I suggest:

(a) when storing reference to content, prefer its UID to its path. Use plone.uuid.interfaces.IUUID(content) to get the UUID. This is more stable for content that gets moved or renamed (short name / id).

(b) that you write a runscript cronjob to fetch the RSS instead of using something like wget of your view URL on cron..

Sean

A UUID registry entry would fit best and most simple solution. @seanupton already pointed out the advantages of an UUID string, I would not store a relation object in registry - besides that, it's not easily possible.

Hi
It could be that you mix up things a bit here, so:
With 'relation', do you mean: to another Plone object. It seem to me that you might just want a schema.URI, which would then be 'http://path/to/some/other/site.

Storing this in the registry is easy, but I think you should do this only if it you consider this a 'configuration', in other words: some of your views/ content-type will use this information (in several places).