[ckan-dev] Packaging theme and model customisations

Wayne Witzel III wwitzel3 at gmail.com
Thu Feb 17 18:40:24 UTC 2011


On Feb 10, 2011 5:40 AM, "Seb Bacon" <seb.bacon at gmail.com> wrote:
>
> 3) An extension to the package model (two extra fields which aren't
> implemented with PackageExtras
>
> (I realise for (3) PackageExtras would probably be the way to go, but
> for various reasons might not be practical in this case).

I was talking about this just the other day. If you look at the
ckanext-community plugin I've started with an idea on this. I think if it
cannot use PackageExtras , you may consider a table for your extension that
uses the Package.id as a primaryjoin in the mapper using your own metadata.
Then your plugin isn't changing ckan core (which they shouldn't be if you
ask me) and by not using ForiegnKey in the table defination you keep your
plugin out of the db migrations so there is less headache there. Also if you
need to add an attribute to a model that it doesn't have, but is just a join
condition and you don't need permanent storage, you can reflect the ckan
model and use your own metadata and mapper to add what ever attributes or
overrides you want.

Then it is on the maintainer of the plugin to ensure it works with newer
versions of ckan.

Sent from mobile, sorry for any mistakes or hard to understand run on
sentences.

Take care,

Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20110217/fa3737de/attachment-0002.html>


More information about the ckan-dev mailing list