[ckan-dev] Modify resource URL
SUPPORT OPENCITIES, Bústia Compartida
support.opencities at upf.edu
Wed Jun 5 14:35:24 UTC 2013
Hi Sean,
Sorry for the delay of my answer. I was working in many things these days.
I did try to modify the resource URL with your instructions, but it didn't
work, i couldn't change anything.
The things i done:
1.First of all, I modify the example_idatasetform plugin.py and i added the
lines that you bring me. I add this in the class ExampleIDatasetFormPlugin:
--------------------------------------------------------------------------------
def form_to_db_schema(self):
schema = super(ExampleIDatasetFormPlugin, self).form_to_db_schema()
schema['url'].append(my_url_converter)
return schema
def my_url_converter(value, context):
value = 'http://opencities.edu'
return value
--------------------------------------------------------------------------------------
2. I put activate the plugin in the production.ini and i restart the
Apache2. The ckan it's work OK but when i create a dataset and i put the
url "www.google.es", when is finish the url don't change to the '
http://opencities.upf.edu.
I do something wrong?.
My CKAN 2.0 is installeld in a Ubuntu 12.04 64bits.
Thanks you very much, and sorry now for the delay and my bad english.
2013/5/10 Sean Hammond <sean.hammond at okfn.org>
> > If you need any more help getting this working, would you mind posting
> > your question to the ckan tag on stackoverflow.com? That way the
> > question can be answered publicly, and the answer might be useful to
> > others how find it.
>
> Ack, sorry, I got confused, didn't realise you'd posted this to the
> mailing list. Let us know how you can get on with the solution
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130605/da440f64/attachment.html>
More information about the ckan-dev
mailing list