Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/okfn/ckan
Browse files Browse the repository at this point in the history
  • Loading branch information
rossjones committed Aug 20, 2012
2 parents d8a2b5f + c7cdab4 commit 58d2769
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
28 changes: 28 additions & 0 deletions ckan/config/deployment.ini_tmpl
Expand Up @@ -196,6 +196,34 @@ ckan.feeds.author_name =
# If not set, then the value in `ckan.site_url` is used.
ckan.feeds.author_link =

## File Store
#
# CKAN allows users to upload files directly to file storage either on the local
# file system or to online ‘cloud’ storage like Amazon S3 or Google Storage.
#
# If you are using local file storage, remember to set ckan.site_url.
#
# To enable cloud storage (Google or S3), first run: pip install boto
#
# @see http://docs.ckan.org/en/latest/filestore.html

# 'Bucket' to use for file storage
#ckan.storage.bucket = my-bucket-name

# To enable local file storage:
#ofs.impl = pairtree
#ofs.storage_dir = /my/path/to/storage/root/directory

# To enable Google cloud storage:
#ofs.impl = google
#ofs.gs_access_key_id =
#ofs.gs_secret_access_key =

# To enable S3 cloud storage:
#ofs.impl = s3
#ofs.aws_access_key_id = ....
#ofs.aws_secret_access_key = ....

## Webstore
## Uncommment to enable datastore
# ckan.datastore.enabled = 1
Expand Down
2 changes: 1 addition & 1 deletion ckan/controllers/storage.py
Expand Up @@ -270,7 +270,7 @@ def get_metadata(self, label):
qualified=False
)
if url.startswith('/'):
url = config.get('ckan.site_url','').rstrip('/') + '/' + url
url = config.get('ckan.site_url','').rstrip('/') + url

if not self.ofs.exists(bucket, label):
abort(404)
Expand Down
2 changes: 1 addition & 1 deletion ckan/lib/search/__init__.py
Expand Up @@ -233,7 +233,7 @@ def clear(package_reference=None):
log.debug("Clearing search index for dataset %s..." %
package_reference)
package_index.delete_package({'id': package_reference})
else:
elif not SIMPLE_SEARCH:
log.debug("Clearing search index...")
package_index.clear()

Expand Down
4 changes: 2 additions & 2 deletions ckan/templates/package/read.rdf
Expand Up @@ -25,8 +25,8 @@
<dcat:accessURL rdf:resource="${ rsc_dict['url'] }"/>
<dct:format py:if="rsc_dict.get('format')">
<dct:IMT>
<rdf:value>rsc_dict.get('format')</rdf:value>
<rdfs:label>rsc_dict.get('format')</rdfs:label>
<rdf:value>${rsc_dict.get('format')}</rdf:value>
<rdfs:label>${rsc_dict.get('format')}</rdfs:label>
</dct:IMT>
</dct:format>
<dct:title py:if="rsc_dict.get('name')">${rsc_dict.get('name')}</dct:title>
Expand Down
3 changes: 3 additions & 0 deletions doc/filestore.rst
Expand Up @@ -36,6 +36,9 @@ after the ``[app:main]`` line::
# directory on disk for data storage (should be empty)
ofs.storage_dir = /my/path/to/storage/root/directory

You must also set ``ckan.site_url`` to your CKAN instance's base URL, e.g.
``http://scotdata.ckan.net``.

Cloud Storage
-------------

Expand Down

0 comments on commit 58d2769

Please sign in to comment.