[ckan-changes] commit/ckan: 5 new changesets

Bitbucket commits-noreply at bitbucket.org
Mon Sep 5 17:50:53 UTC 2011


5 new changesets in ckan:

http://bitbucket.org/okfn/ckan/changeset/c95d45140368/
changeset:   c95d45140368
branch:      release-v1.4.3
user:        dread
date:        2011-09-05 17:15:40
summary:     [model][s]: #1310 Fix for api get of approved revision.
affected #:  3 files (1.8 KB)

--- a/ckan/model/__init__.py	Mon Sep 05 12:50:42 2011 +0100
+++ b/ckan/model/__init__.py	Mon Sep 05 16:15:40 2011 +0100
@@ -243,7 +243,7 @@
         ('timestamp', strftimestamp(revision.timestamp)),
         ('message', revision.message),
         ('author', revision.author),
-        ('approved_timestamp',revision.approved_timestamp)
+        ('approved_timestamp', strftimestamp(revision.approved_timestamp)),
         ))
     if include_packages:
         revision_dict['packages'] = [getattr(pkg, ref_package_by) \


--- a/ckan/tests/functional/api/model/test_revisions.py	Mon Sep 05 12:50:42 2011 +0100
+++ b/ckan/tests/functional/api/model/test_revisions.py	Mon Sep 05 16:15:40 2011 +0100
@@ -13,14 +13,17 @@
     reuse_common_fixtures = True
     
     def test_register_get_ok(self):
-        # Check mock register behaviour.
+        # Comparison list - newest first
+        revs = model.Session.query(model.Revision).\
+               order_by(model.Revision.timestamp.desc()).all()
+        assert revs
+
+        # Check list of revisions
         offset = self.revision_offset()
         res = self.app.get(offset, status=200)
-        revs = model.Session.query(model.Revision).all()
-        assert revs, 'There are no revisions in the model.'
-        res_dict = self.data_from_res(res)
-        for rev in revs:
-            assert rev.id in res_dict, (rev.id, res_dict)
+        revs_result = self.data_from_res(res)
+
+        assert_equal(revs_result, [rev.id for rev in revs])
 
     def test_entity_get_ok(self):
         rev = model.repo.history().all()[-2] # 2nd revision is the creation of pkgs
@@ -44,6 +47,13 @@
         res = self.app.get(offset, status=404)
         self.assert_json_response(res, 'Not found')
 
+    def test_entity_get_301(self):
+        # see what happens when you miss the ID altogether
+        revision_id = ''
+        offset = self.revision_offset(revision_id)
+        res = self.app.get(offset, status=301)
+        # redirects "/api/revision/" to "/api/revision"
+
 class TestRevisionsVersion1(Version1TestCase, RevisionsTestCase): pass
 class TestRevisionsVersion2(Version2TestCase, RevisionsTestCase): pass
 class TestRevisionsUnversioned(UnversionedTestCase, RevisionsTestCase): pass


--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ckan/tests/models/test_revision.py	Mon Sep 05 16:15:40 2011 +0100
@@ -0,0 +1,44 @@
+import datetime
+
+from nose.tools import assert_equal
+
+from ckan.tests import *
+import ckan.model as model
+
+# NB Lots of revision tests are part of vdm. No need to repeat those here.
+
+class TestRevision:
+    @classmethod
+    def setup_class(cls):
+        # Create a test package
+        rev = model.repo.new_revision()
+        rev.author = 'Tester'
+        rev.timestamp = datetime.datetime(2020, 1, 1)
+        rev.approved_timestamp = datetime.datetime(2020, 1, 2)
+        rev.message = 'Test message'
+        pkg = model.Package(name='testpkg')
+        model.Session.add(pkg)
+        model.Session.commit()
+        model.Session.remove()
+
+        revs = model.Session.query(model.Revision).\
+               order_by(model.Revision.timestamp.desc()).all()
+        cls.rev = revs[0] # newest
+
+    @classmethod
+    def teardown_class(cls):
+        model.repo.rebuild_db()
+
+    def test_revision_as_dict(self):
+        rev_dict = model.revision_as_dict(self.rev,
+                                          include_packages=True,
+                                          include_groups=True,
+                                          ref_package_by='name')
+        
+        assert_equal(rev_dict['id'], self.rev.id)
+        assert_equal(rev_dict['author'], self.rev.author)
+        assert_equal(rev_dict['timestamp'], '2020-01-01T00:00:00')
+        assert_equal(rev_dict['approved_timestamp'], '2020-01-02T00:00:00')
+        assert_equal(rev_dict['message'], self.rev.message)
+        assert_equal(rev_dict['packages'], [u'testpkg'])
+        


http://bitbucket.org/okfn/ckan/changeset/e49781cb74fd/
changeset:   e49781cb74fd
branch:      release-v1.4.3
user:        dread
date:        2011-09-05 19:17:37
summary:     [model][xs]: #1310 Fixed the fix for api get of approved revision.
affected #:  1 file (90 bytes)

--- a/ckan/model/__init__.py	Mon Sep 05 16:15:40 2011 +0100
+++ b/ckan/model/__init__.py	Mon Sep 05 18:17:37 2011 +0100
@@ -22,7 +22,7 @@
 from package_relationship import *
 from changeset import Changeset, Change, Changemask
 import ckan.migration
-from ckan.lib.helpers import OrderedDict
+from ckan.lib.helpers import OrderedDict, datetime_to_date_str
 
 # set up in init_model after metadata is bound
 version_table = None
@@ -243,7 +243,9 @@
         ('timestamp', strftimestamp(revision.timestamp)),
         ('message', revision.message),
         ('author', revision.author),
-        ('approved_timestamp', strftimestamp(revision.approved_timestamp)),
+        ('approved_timestamp',
+         datetime_to_date_str(revision.approved_timestamp) \
+         if revision.approved_timestamp else None),
         ))
     if include_packages:
         revision_dict['packages'] = [getattr(pkg, ref_package_by) \


http://bitbucket.org/okfn/ckan/changeset/9107df7b0aca/
changeset:   9107df7b0aca
user:        dread
date:        2011-09-05 19:18:55
summary:     [merge] from release-1.4.3.
affected #:  3 files (1.9 KB)

--- a/ckan/model/__init__.py	Mon Sep 05 12:50:42 2011 +0100
+++ b/ckan/model/__init__.py	Mon Sep 05 18:18:55 2011 +0100
@@ -22,7 +22,7 @@
 from package_relationship import *
 from changeset import Changeset, Change, Changemask
 import ckan.migration
-from ckan.lib.helpers import OrderedDict
+from ckan.lib.helpers import OrderedDict, datetime_to_date_str
 from vdm.sqlalchemy.base import SQLAlchemySession
 
 # set up in init_model after metadata is bound
@@ -301,7 +301,9 @@
         ('timestamp', strftimestamp(revision.timestamp)),
         ('message', revision.message),
         ('author', revision.author),
-        ('approved_timestamp',revision.approved_timestamp)
+        ('approved_timestamp',
+         datetime_to_date_str(revision.approved_timestamp) \
+         if revision.approved_timestamp else None),
         ))
     if include_packages:
         revision_dict['packages'] = [getattr(pkg, ref_package_by) \


--- a/ckan/tests/functional/api/model/test_revisions.py	Mon Sep 05 12:50:42 2011 +0100
+++ b/ckan/tests/functional/api/model/test_revisions.py	Mon Sep 05 18:18:55 2011 +0100
@@ -13,14 +13,17 @@
     reuse_common_fixtures = True
     
     def test_register_get_ok(self):
-        # Check mock register behaviour.
+        # Comparison list - newest first
+        revs = model.Session.query(model.Revision).\
+               order_by(model.Revision.timestamp.desc()).all()
+        assert revs
+
+        # Check list of revisions
         offset = self.revision_offset()
         res = self.app.get(offset, status=200)
-        revs = model.Session.query(model.Revision).all()
-        assert revs, 'There are no revisions in the model.'
-        res_dict = self.data_from_res(res)
-        for rev in revs:
-            assert rev.id in res_dict, (rev.id, res_dict)
+        revs_result = self.data_from_res(res)
+
+        assert_equal(revs_result, [rev.id for rev in revs])
 
     def test_entity_get_ok(self):
         rev = model.repo.history().all()[-2] # 2nd revision is the creation of pkgs
@@ -44,6 +47,13 @@
         res = self.app.get(offset, status=404)
         self.assert_json_response(res, 'Not found')
 
+    def test_entity_get_301(self):
+        # see what happens when you miss the ID altogether
+        revision_id = ''
+        offset = self.revision_offset(revision_id)
+        res = self.app.get(offset, status=301)
+        # redirects "/api/revision/" to "/api/revision"
+
 class TestRevisionsVersion1(Version1TestCase, RevisionsTestCase): pass
 class TestRevisionsVersion2(Version2TestCase, RevisionsTestCase): pass
 class TestRevisionsUnversioned(UnversionedTestCase, RevisionsTestCase): pass


--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ckan/tests/models/test_revision.py	Mon Sep 05 18:18:55 2011 +0100
@@ -0,0 +1,44 @@
+import datetime
+
+from nose.tools import assert_equal
+
+from ckan.tests import *
+import ckan.model as model
+
+# NB Lots of revision tests are part of vdm. No need to repeat those here.
+
+class TestRevision:
+    @classmethod
+    def setup_class(cls):
+        # Create a test package
+        rev = model.repo.new_revision()
+        rev.author = 'Tester'
+        rev.timestamp = datetime.datetime(2020, 1, 1)
+        rev.approved_timestamp = datetime.datetime(2020, 1, 2)
+        rev.message = 'Test message'
+        pkg = model.Package(name='testpkg')
+        model.Session.add(pkg)
+        model.Session.commit()
+        model.Session.remove()
+
+        revs = model.Session.query(model.Revision).\
+               order_by(model.Revision.timestamp.desc()).all()
+        cls.rev = revs[0] # newest
+
+    @classmethod
+    def teardown_class(cls):
+        model.repo.rebuild_db()
+
+    def test_revision_as_dict(self):
+        rev_dict = model.revision_as_dict(self.rev,
+                                          include_packages=True,
+                                          include_groups=True,
+                                          ref_package_by='name')
+        
+        assert_equal(rev_dict['id'], self.rev.id)
+        assert_equal(rev_dict['author'], self.rev.author)
+        assert_equal(rev_dict['timestamp'], '2020-01-01T00:00:00')
+        assert_equal(rev_dict['approved_timestamp'], '2020-01-02T00:00:00')
+        assert_equal(rev_dict['message'], self.rev.message)
+        assert_equal(rev_dict['packages'], [u'testpkg'])
+        


http://bitbucket.org/okfn/ckan/changeset/436d9a5aec7a/
changeset:   436d9a5aec7a
user:        dread
date:        2011-09-05 19:22:04
summary:     [model,controllers][s]: Deprecate model.str[f|p]timestamp.
affected #:  5 files (799 bytes)

--- a/ckan/controllers/api.py	Mon Sep 05 18:18:55 2011 +0100
+++ b/ckan/controllers/api.py	Mon Sep 05 18:22:04 2011 +0100
@@ -4,7 +4,7 @@
 from webob.multidict import UnicodeMultiDict
 
 from ckan.lib.base import BaseController, response, c, _, gettext, request
-from ckan.lib.helpers import json
+from ckan.lib.helpers import json, date_str_to_datetime
 import ckan.model as model
 import ckan.rating
 from ckan.lib.search import query_for, QueryOptions, SearchError, DEFAULT_OPTIONS
@@ -382,7 +382,7 @@
             elif request.params.has_key('since_time'):
                 since_time_str = request.params['since_time']
                 try:
-                    since_time = model.strptimestamp(since_time_str)
+                    since_time = date_str_to_datetime(since_time_str)
                 except ValueError, inst:
                     return self._finish_bad_request('ValueError: %s' % inst)
             else:


--- a/ckan/controllers/package.py	Mon Sep 05 18:18:55 2011 +0100
+++ b/ckan/controllers/package.py	Mon Sep 05 18:22:04 2011 +0100
@@ -14,6 +14,7 @@
 
 from ckan.logic import get_action, check_access
 from ckan.logic.schema import package_form_schema
+from ckan.lib.helpers import date_str_to_datetime
 from ckan.lib.base import request, c, BaseController, model, abort, h, g, render
 from ckan.lib.base import etag_cache, response, redirect, gettext
 from ckan.authz import Authorizer
@@ -195,7 +196,7 @@
                 context['revision_id'] = revision_ref
             else:
                 try:
-                    date = model.strptimestamp(revision_ref)
+                    date = date_str_to_datetime(revision_ref)
                     context['revision_date'] = date
                 except TypeError, e:
                     abort(400, _('Invalid revision format: %r') % e.args)


--- a/ckan/model/__init__.py	Mon Sep 05 18:18:55 2011 +0100
+++ b/ckan/model/__init__.py	Mon Sep 05 18:22:04 2011 +0100
@@ -1,4 +1,6 @@
 import warnings
+import logging
+
 from pylons import config
 from sqlalchemy import MetaData, __version__ as sqav
 from sqlalchemy.schema import Index
@@ -25,6 +27,8 @@
 from ckan.lib.helpers import OrderedDict, datetime_to_date_str
 from vdm.sqlalchemy.base import SQLAlchemySession
 
+log = logging.getLogger(__name__)
+
 # set up in init_model after metadata is bound
 version_table = None
 
@@ -285,6 +289,7 @@
     raises ValueError if any of the numbers are out of range.
     '''
     # TODO: METHOD DEPRECATED - use ckan.lib.helpers.date_str_to_datetime
+    log.warn('model.strptimestamp is deprecated - use ckan.lib.helpers.date_str_to_datetime instead')
     import datetime, re
     return datetime.datetime(*map(int, re.split('[^\d]', s)))
 
@@ -293,12 +298,13 @@
     a pretty printed string, use ckan.lib.helpers.render_datetime.
     '''
     # TODO: METHOD DEPRECATED - use ckan.lib.helpers.datetime_to_date_str
+    log.warn('model.strftimestamp is deprecated - use ckan.lib.helpers.datetime_to_date_str instead')
     return t.isoformat()
 
 def revision_as_dict(revision, include_packages=True, include_groups=True,ref_package_by='name'):
     revision_dict = OrderedDict((
         ('id', revision.id),
-        ('timestamp', strftimestamp(revision.timestamp)),
+        ('timestamp', datetime_to_date_str(revision.timestamp)),
         ('message', revision.message),
         ('author', revision.author),
         ('approved_timestamp',


--- a/ckan/tests/functional/api/test_package_search.py	Mon Sep 05 18:18:55 2011 +0100
+++ b/ckan/tests/functional/api/test_package_search.py	Mon Sep 05 18:22:04 2011 +0100
@@ -322,18 +322,6 @@
         res_dict = self.data_from_res(res)
         assert res_dict['count'] == 1, res_dict
 
-    def test_strftimestamp(self):
-        import datetime
-        t = datetime.datetime(2012, 3, 4, 5, 6, 7, 890123)
-        s = model.strftimestamp(t)
-        assert s == "2012-03-04T05:06:07.890123", s
-
-    def test_strptimestamp(self):
-        import datetime
-        s = "2012-03-04T05:06:07.890123"
-        t = model.strptimestamp(s)
-        assert t == datetime.datetime(2012, 3, 4, 5, 6, 7, 890123), t
-
 class TestPackageSearchApi1(Api1TestCase, PackageSearchApiTestCase): pass
 class TestPackageSearchApi2(Api2TestCase, PackageSearchApiTestCase): pass
 class TestPackageSearchApiUnversioned(PackageSearchApiTestCase, ApiUnversionedTestCase): pass


--- a/ckan/tests/functional/api/test_revision_search.py	Mon Sep 05 18:18:55 2011 +0100
+++ b/ckan/tests/functional/api/test_revision_search.py	Mon Sep 05 18:22:04 2011 +0100
@@ -1,3 +1,5 @@
+from ckan.lib.helpers import datetime_to_date_str
+
 from ckan.tests.functional.api.base import *
 from ckan.tests import TestController as ControllerTestCase
 
@@ -46,7 +48,7 @@
         revs = model.Session.query(model.Revision).all()
         # Check since time of first.
         rev_first = revs[-1]
-        params = "?since_time=%s" % model.strftimestamp(rev_first.timestamp)
+        params = "?since_time=%s" % datetime_to_date_str(rev_first.timestamp)
         res = self.app.get(offset+params, status=200)
         res_list = self.data_from_res(res)
         assert rev_first.id not in res_list
@@ -54,7 +56,7 @@
             assert rev.id in res_list, (rev.id, res_list)
         # Check since time of last.
         rev_last = revs[0]
-        params = "?since_time=%s" % model.strftimestamp(rev_last.timestamp)
+        params = "?since_time=%s" % datetime_to_date_str(rev_last.timestamp)
         res = self.app.get(offset+params, status=200)
         res_list = self.data_from_res(res)
         assert res_list == [], res_list


http://bitbucket.org/okfn/ckan/changeset/8cfc63944bf2/
changeset:   8cfc63944bf2
user:        dread
date:        2011-09-05 19:49:32
summary:     [merge].
affected #:  68 files (2.8 KB)

--- a/ckan/config/deployment.ini_tmpl	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/config/deployment.ini_tmpl	Mon Sep 05 18:49:32 2011 +0100
@@ -74,16 +74,16 @@
 # CKAN QoS monitoring
 ckan.enable_call_timing = false
 
-# Location of RDF versions of packages
+# Location of RDF versions of datasets
 #rdf_packages = http://semantic.ckan.net/record/
 
-# Location of licenses group (defaults to local Python licenses package)
+# Location of licenses group (defaults to local Python licenses dataset)
 #licenses_group_url = http://licenses.opendefinition.org/2.0/ckan_original
 
-# Package form to use
+# Dataset form to use
 package_form = standard
 
-# Hide certain extras fields from package read form:
+# Hide certain extras fields from dataset read form:
 # package_hide_extras = for_search_index_only
 
 # API configuration
@@ -103,9 +103,9 @@
 # extra_template_paths = %(here)s/my-templates
 # extra_public_paths = %(here)s/my-public
 
-# Package form integration
-#package_edit_return_url = http://another.frontend/package/<NAME>
-#package_new_return_url = http://another.frontend/package/<NAME>
+# Dataset form integration
+#package_edit_return_url = http://another.frontend/dataset/<NAME>
+#package_new_return_url = http://another.frontend/dataset/<NAME>
 
 
 # Turn on messaging with carrot, default to false


--- a/ckan/config/routing.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/config/routing.py	Mon Sep 05 18:49:32 2011 +0100
@@ -38,6 +38,7 @@
     # CKAN API versioned.
     register_list = [
             'package',
+            'dataset',
             'resource',
             'tag',
             'group',
@@ -154,7 +155,7 @@
 
     map.connect('/api/2/util/user/autocomplete', controller='api',
         action='user_autocomplete')
-    map.connect('/api/2/util/package/create_slug', controller='api', action='create_slug',
+    map.connect('/api/2/util/dataset/create_slug', controller='api', action='create_slug',
                 conditions=dict(method=['GET']))
     map.connect('/api/2/util/tag/autocomplete', controller='api', action='tag_autocomplete',
                 conditions=dict(method=['GET']))
@@ -168,15 +169,17 @@
     ## /END API
     ###########
 
-    map.redirect("/packages", "/package")
-    map.redirect("/packages/{url:.*}", "/package/{url}")
-    map.connect('/package', controller='package', action='search')
+    map.redirect("/packages", "/dataset")
+    map.redirect("/packages/{url:.*}", "/dataset/{url}")
+    map.redirect("/package", "/dataset")
+    map.redirect("/package/{url:.*}", "/dataset/{url}")
+    map.connect('/dataset', controller='package', action='search')
 
     ##to get back formalchemy uncomment these lines
     ##map.connect('/package/new', controller='package_formalchemy', action='new')
     ##map.connect('/package/edit/{id}', controller='package_formalchemy', action='edit')
 
-    map.connect('/package/{action}', controller='package',
+    map.connect('/dataset/{action}', controller='package',
         requirements=dict(action='|'.join([
             'list',
             'new',
@@ -184,9 +187,9 @@
             'search'
             ]))
         )
-    map.connect('/package', controller='package', action='index')
-    map.connect('/package/{action}/{id}/{revision}', controller='package', action='read_ajax')
-    map.connect('/package/{action}/{id}', controller='package',
+    map.connect('/dataset', controller='package', action='index')
+    map.connect('/dataset/{action}/{id}/{revision}', controller='package', action='read_ajax')
+    map.connect('/dataset/{action}/{id}', controller='package',
         requirements=dict(action='|'.join([
         'edit',
         'authz',
@@ -195,7 +198,7 @@
         'history_ajax',
         ]))
         )
-    map.connect('/package/{id}', controller='package', action='read')
+    map.connect('/dataset/{id}', controller='package', action='read')
     # group
     map.redirect("/groups", "/group")
     map.redirect("/groups/{url:.*}", "/group/{url}")


--- a/ckan/controllers/api.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/controllers/api.py	Mon Sep 05 18:49:32 2011 +0100
@@ -139,7 +139,6 @@
         context = {'model': model, 'session': model.Session, 'user': c.user}
         model.Session()._context = context
         return_dict = {'help': function.__doc__}
-
         try:
             request_data = self._get_request_data()
         except ValueError, inst:
@@ -180,10 +179,13 @@
         action_map = {
             'revision': get_action('revision_list'),
             'group': get_action('group_list'),
+            'dataset': get_action('package_list'),
             'package': get_action('package_list'),
             'tag': get_action('tag_list'),
             'licenses': get_action('licence_list'),
+            ('dataset', 'relationships'): get_action('package_relationships_list'),
             ('package', 'relationships'): get_action('package_relationships_list'),
+            ('dataset', 'revisions'): get_action('package_revision_list'),
             ('package', 'revisions'): get_action('package_revision_list'),
         }
 
@@ -206,7 +208,9 @@
             'revision': get_action('revision_show'),
             'group': get_action('group_show_rest'),
             'tag': get_action('tag_show_rest'),
+            'dataset': get_action('package_show_rest'),
             'package': get_action('package_show_rest'),
+            ('dataset', 'relationships'): get_action('package_relationships_list'),
             ('package', 'relationships'): get_action('package_relationships_list'),
         }
 
@@ -215,6 +219,7 @@
         data_dict = {'id': id, 'id2': id2, 'rel': subregister}
 
         for type in model.PackageRelationship.get_all_types():
+            action_map[('dataset', type)] = get_action('package_relationships_list')
             action_map[('package', type)] = get_action('package_relationships_list')
         log.debug('show: %s' % context)
 
@@ -239,13 +244,16 @@
     def create(self, ver=None, register=None, subregister=None, id=None, id2=None):
 
         action_map = {
+            ('dataset', 'relationships'): get_action('package_relationship_create'),
             ('package', 'relationships'): get_action('package_relationship_create'),
              'group': get_action('group_create_rest'),
+             'dataset': get_action('package_create_rest'),
              'package': get_action('package_create_rest'),
              'rating': get_action('rating_create'),
         }
 
         for type in model.PackageRelationship.get_all_types():
+            action_map[('dataset', type)] = get_action('package_relationship_create')
             action_map[('package', type)] = get_action('package_relationship_create')
 
         context = {'model': model, 'session': model.Session, 'user': c.user,
@@ -289,11 +297,14 @@
     def update(self, ver=None, register=None, subregister=None, id=None, id2=None):
 
         action_map = {
+            ('dataset', 'relationships'): get_action('package_relationship_update'),
             ('package', 'relationships'): get_action('package_relationship_update'),
+             'dataset': get_action('package_update_rest'),
              'package': get_action('package_update_rest'),
              'group': get_action('group_update_rest'),
         }
         for type in model.PackageRelationship.get_all_types():
+            action_map[('dataset', type)] = get_action('package_relationship_update')
             action_map[('package', type)] = get_action('package_relationship_update')
 
         context = {'model': model, 'session': model.Session, 'user': c.user,
@@ -331,11 +342,14 @@
 
     def delete(self, ver=None, register=None, subregister=None, id=None, id2=None):
         action_map = {
+            ('dataset', 'relationships'): get_action('package_relationship_delete'),
             ('package', 'relationships'): get_action('package_relationship_delete'),
              'group': get_action('group_delete'),
+             'dataset': get_action('package_delete'),
              'package': get_action('package_delete'),
         }
         for type in model.PackageRelationship.get_all_types():
+            action_map[('dataset', type)] = get_action('package_relationship_delete')
             action_map[('package', type)] = get_action('package_relationship_delete')
 
         context = {'model': model, 'session': model.Session, 'user': c.user,
@@ -390,7 +404,7 @@
                     gettext("Missing search term ('since_id=UUID' or 'since_time=TIMESTAMP')"))
             revs = model.Session.query(model.Revision).filter(model.Revision.timestamp>since_time)
             return self._finish_ok([rev.id for rev in revs])
-        elif register == 'package' or register == 'resource':
+        elif register in ['dataset', 'package', 'resource']:
             try:
                 params = self._get_search_params(request.params)
             except ValueError, e:
@@ -417,7 +431,7 @@
                 for v in values:
                     query_fields.add(field, v)
             
-            if register == 'package':
+            if register in ['dataset', 'package']:
                 options.ref_entity_with_attr = 'id' if ver == '2' else 'name'
             try:
                 backend = None


--- a/ckan/forms/common.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/forms/common.py	Mon Sep 05 18:49:32 2011 +0100
@@ -33,15 +33,15 @@
 
 def package_name_validator(val, field=None):
     name_validator(val, field)
-    # we disable autoflush here since may get used in package preview
+    # we disable autoflush here since may get used in dataset preview
     pkgs = model.Session.query(model.Package).autoflush(False).filter_by(name=val)
     for pkg in pkgs:
         if pkg != field.parent.model:
-            raise formalchemy.ValidationError(_('Package name already exists in database'))
+            raise formalchemy.ValidationError(_('Dataset name already exists in database'))
 
 def group_name_validator(val, field=None):
     name_validator(val, field)
-    # we disable autoflush here since may get used in package preview
+    # we disable autoflush here since may get used in dataset preview
     groups = model.Session.query(model.Group).autoflush(False).filter_by(name=val)
     for group in groups:
         if group != field.parent.model:
@@ -269,7 +269,7 @@
 
         def _serialized_value(self):
             # interpret params like this:
-            # 'Package--temporal_coverage-from', u'4/12/2009'
+            # 'Dataset--temporal_coverage-from', u'4/12/2009'
             param_val_from = self.params.get(self.name + '-from', u'')
             param_val_to = self.params.get(self.name + '-to', u'')
             return param_val_from, param_val_to
@@ -330,7 +330,7 @@
             return self._serialized_value()
 
 class ResourcesField(ConfiguredField):
-    '''A form field for multiple package resources.'''
+    '''A form field for multiple dataset resources.'''
 
     def __init__(self, name, hidden_label=False, fields_required=None):
         super(ResourcesField, self).__init__(name)
@@ -342,7 +342,7 @@
         resources_data = val
         assert isinstance(resources_data, list)
         not_nothing_regex = re.compile('\S')
-        errormsg = _('Package resource(s) incomplete.')
+        errormsg = _('Dataset resource(s) incomplete.')
         not_nothing_validator = formalchemy.validators.regex(not_nothing_regex,
                                                              errormsg)
         for resource_data in resources_data:
@@ -410,12 +410,12 @@
             rest_key = self.name
 
             # REST param format
-            # e.g. 'Package-1-resources': [{u'url':u'http://ww...
+            # e.g. 'Dataset-1-resources': [{u'url':u'http://ww...
             if params.has_key(rest_key) and any(params.getall(rest_key)):
                 new_resources = params.getall(rest_key)[:] # copy, so don't edit orig
 
             # formalchemy form param format
-            # e.g. 'Package-1-resources-0-url': u'http://ww...'
+            # e.g. 'Dataset-1-resources-0-url': u'http://ww...'
             row = 0
             while True:
                 if not params.has_key('%s-%i-url' % (self.name, row)):
@@ -510,7 +510,7 @@
                 raise formalchemy.ValidationError(_('Tag "%s" must not be uppercase' % (tag)))
 
 class ExtrasField(ConfiguredField):
-    '''A form field for arbitrary "extras" package data.'''
+    '''A form field for arbitrary "extras" dataset data.'''
     def __init__(self, name, hidden_label=False):
         super(ExtrasField, self).__init__(name)
         self._hidden_label = hidden_label
@@ -602,11 +602,11 @@
 
         def deserialize(self):
             # Example params:
-            # ('Package-1-extras', {...}) (via REST i/f)
-            # ('Package-1-extras-genre', u'romantic novel'),
-            # ('Package-1-extras-genre-checkbox', 'on')
-            # ('Package-1-extras-newfield0-key', u'aaa'),
-            # ('Package-1-extras-newfield0-value', u'bbb'),
+            # ('Dataset-1-extras', {...}) (via REST i/f)
+            # ('Dataset-1-extras-genre', u'romantic novel'),
+            # ('Dataset-1-extras-genre-checkbox', 'on')
+            # ('Dataset-1-extras-newfield0-key', u'aaa'),
+            # ('Dataset-1-extras-newfield0-value', u'bbb'),
             # TODO: This method is run multiple times per edit - cache results?
             if not hasattr(self, 'extras_re'):
                 self.extras_re = re.compile('([a-zA-Z0-9-]*)-([a-f0-9-]*)-extras(?:-(.+))?$')
@@ -621,7 +621,7 @@
                 entity_id = key_parts[1]
                 if key_parts[2] is None:
                     if isinstance(value, dict):
-                        # simple dict passed into 'Package-1-extras' e.g. via REST i/f
+                        # simple dict passed into 'Dataset-1-extras' e.g. via REST i/f
                         extra_fields.extend(value.items())
                 elif key_parts[2].startswith('newfield'):
                     newfield_match = self.newfield_re.match(key_parts[2])
@@ -694,13 +694,13 @@
             append_set = (new_set - old_set).intersection(editable_set)
             remove_set = (old_set - new_set).intersection(editable_set)
             
-            # Create package group associations.
+            # Create dataset group associations.
             for id in append_set:
                 group = model.Session.query(model.Group).autoflush(False).get(id)
                 if group:
                     self.parent.model.groups.append(group)
 
-            # Delete package group associations.
+            # Delete dataset group associations.
             for group in self.parent.model.groups:
                 if group.id in remove_set:
                     self.parent.model.groups.remove(group)


--- a/ckan/lib/cli.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/lib/cli.py	Mon Sep 05 18:49:32 2011 +0100
@@ -61,7 +61,7 @@
     db clean
     db upgrade [{version no.}] # Data migrate
     db dump {file-path} # dump to a pg_dump file
-    db dump-rdf {package-name} {file-path}
+    db dump-rdf {dataset-name} {file-path}
     db simple-dump-csv {file-path}
     db simple-dump-json {file-path}
     db send-rdf {talis-store} {username} {password}
@@ -199,7 +199,7 @@
 
     def dump_rdf(self, cmd):
         if len(self.args) < 3:
-            print 'Need package name and rdf file path'
+            print 'Need dataset name and rdf file path'
             return
         package_name = self.args[1]
         rdf_path = self.args[2]
@@ -207,7 +207,7 @@
         import ckan.lib.rdf as rdf
         pkg = model.Package.by_name(unicode(package_name))
         if not pkg:
-            print 'Package name "%s" does not exist' % package_name
+            print 'Dataset name "%s" does not exist' % package_name
             return
         rdf = rdf.RdfExporter().export_package(pkg)
         f = open(rdf_path, 'w')
@@ -227,12 +227,12 @@
 
 
 class SearchIndexCommand(CkanCommand):
-    '''Creates a search index for all packages
+    '''Creates a search index for all datasets
 
     Usage:
-      search-index rebuild                 - indexes all packages (default)
-      search-index check                   - checks for packages not indexed
-      search-index show {package-name}     - shows index of a package
+      search-index rebuild                 - indexes all datasets (default)
+      search-index check                   - checks for datasets not indexed
+      search-index show {dataset-name}     - shows index of a dataset
     '''
 
     summary = __doc__.split('\n')[0]
@@ -265,7 +265,7 @@
 class Notification(CkanCommand):
     '''Send out modification notifications.
     
-    In "replay" mode, an update signal is sent for each package in the database.
+    In "replay" mode, an update signal is sent for each dataset in the database.
 
     Usage:
       notify replay                        - send out modification signals
@@ -716,39 +716,39 @@
         except UncommittedChangesException, inst:
             print "There are uncommitted revisions (run 'changes commit')."
             sys.exit(1)
-        print ", ".join(["%s %s packages" % (key, len(val)) for (key, val) in report.items()])
+        print ", ".join(["%s %s datasets" % (key, len(val)) for (key, val) in report.items()])
         if report['created']:
             print ""
-            print "The following packages have been created:"
+            print "The following datasets have been created:"
             names = []
             for entity in report['created']:
                 if not entity:
                     continue
                 if entity.name in names:
                     continue
-                print "package:    %s" % entity.name
+                print "dataset:    %s" % entity.name
                 names.append(entity.name)
         if report['updated']:
             print ""
-            print "The following packages have been updated:"
+            print "The following datasets have been updated:"
             names = []
             for entity in report['updated']:
                 if not entity:
                     continue
                 if entity.name in names:
                     continue
-                print "package:    %s" % entity.name
+                print "dataset:    %s" % entity.name
                 names.append(entity.name)
         if report['deleted']:
             print ""
-            print "The following packages have been deleted:"
+            print "The following datasets have been deleted:"
             names = []
             for entity in report['deleted']:
                 if not entity:
                     continue
                 if entity.name in names:
                     continue
-                print "package:    %s" % entity.name
+                print "dataset:    %s" % entity.name
                 names.append(entity.name)
 
     def moderate_changeset_apply(self, changeset):


--- a/ckan/lib/dictization/model_dictize.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/lib/dictization/model_dictize.py	Mon Sep 05 18:49:32 2011 +0100
@@ -252,7 +252,7 @@
     dictized['ratings_count'] = len(pkg.ratings)
     site_url = config.get('ckan.site_url', None)
     if site_url:
-        dictized['ckan_url'] = '%s/package/%s' % (site_url, pkg.name)
+        dictized['ckan_url'] = '%s/dataset/%s' % (site_url, pkg.name)
     dictized['metadata_modified'] = pkg.metadata_modified.isoformat() \
         if pkg.metadata_modified else None
     dictized['metadata_created'] = pkg.metadata_created.isoformat() \
@@ -303,7 +303,7 @@
     dictized['ratings_count'] = len(pkg.ratings)
     site_url = config.get('ckan.site_url', None)
     if site_url:
-        dictized['ckan_url'] = '%s/package/%s' % (site_url, pkg.name)
+        dictized['ckan_url'] = '%s/dataset/%s' % (site_url, pkg.name)
     dictized['metadata_modified'] = pkg.metadata_modified.isoformat() \
         if pkg.metadata_modified else None
     dictized['metadata_created'] = pkg.metadata_created.isoformat() \


--- a/ckan/logic/validators.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/logic/validators.py	Mon Sep 05 18:49:32 2011 +0100
@@ -29,7 +29,7 @@
 
     result = session.query(model.Package).get(value)
     if not result:
-        raise Invalid(_('Package was not found.'))
+        raise Invalid(_('Dataset was not found.'))
     return value
 
 def package_name_exists(value, context):
@@ -40,7 +40,7 @@
     result = session.query(model.Package).filter_by(name=value).first()
 
     if not result:
-        raise Invalid(_('Package with name %r does not exist.') % str(value))
+        raise Invalid(_('Dataset with name %r does not exist.') % str(value))
     return value
 
 def package_id_or_name_exists(value, context):
@@ -55,7 +55,7 @@
     result = session.query(model.Package).filter_by(name=value).first()
 
     if not result:
-        raise Invalid(_('Package was not found.'))
+        raise Invalid(_('Dataset was not found.'))
 
     return result.id
 
@@ -88,7 +88,7 @@
         query = query.filter(model.Package.id <> package_id) 
     result = query.first()
     if result:
-        errors[key].append(_('Package name already exists in database'))
+        errors[key].append(_('Dataset name already exists in database'))
 
 def duplicate_extras_key(key, data, errors, context):
 


--- a/ckan/model/package.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/model/package.py	Mon Sep 05 18:49:32 2011 +0100
@@ -202,7 +202,7 @@
                               for res in self.resources]
         site_url = config.get('ckan.site_url', None)
         if site_url:
-            _dict['ckan_url'] = '%s/package/%s' % (site_url, self.name)
+            _dict['ckan_url'] = '%s/dataset/%s' % (site_url, self.name)
         _dict['relationships'] = [rel.as_dict(self, ref_package_by=ref_package_by) for rel in self.get_relationships()]
         _dict['metadata_modified'] = self.metadata_modified.isoformat() \
             if self.metadata_modified else None


--- a/ckan/public/css/style.css	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/public/css/style.css	Mon Sep 05 18:49:32 2011 +0100
@@ -340,7 +340,7 @@
     padding-top: 10px;
 }
 
-.package-search-filters {
+.dataset-search-filters {
     margin-top: 15px;
 }
 
@@ -422,7 +422,7 @@
 
 
 /* ===================== */
-/* = Package read view = */
+/* = Dataset read view = */
 /* ===================== */
 
 .property-list {
@@ -441,25 +441,25 @@
   margin-bottom: 0.2em;
 }
 
-.package .api div {
+.dataset .api div {
     background:#f0f0f0;
     padding:10px;
 }
 
-.package .api h5 {
+.dataset .api h5 {
     font-weight:bold;
     margin-bottom:1em!important;
     font-size:1em;
 }
 
-.package .api code {
+.dataset .api code {
     background:#444;
     color:#fff;
     padding:3px 10px ;
     margin-bottom:1em;
     display:block;
 }
-.package .api code a {
+.dataset .api code a {
     color:#fff;
 }
 
@@ -544,7 +544,7 @@
 /* = Search boxes = */
 /* ================ */
 
-form.package-search input.search {
+form.dataset-search input.search {
   width: 99%;
   font-size: 1.2em;
   margin: 0px;
@@ -560,7 +560,7 @@
   -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; 
 }
 
-.package-search input.button {
+.dataset-search input.button {
     display: inline-block;
     float: right;
     margin-top: 5px;
@@ -568,36 +568,36 @@
     margin-bottom: 1px !important;
 }
 
-.package-search-filters {
+.dataset-search-filters {
   margin-top: 1em;
   margin-bottom: 1em;
   color: #888;
 }
 
-.package-search-filters label {
+.dataset-search-filters label {
   padding-left: 1em;
 }
 
 /* =================== */
-/* = Package listing = */
+/* = Dataset listing = */
 /* =================== */
 
-ul.packages {
+ul.datasets {
 	padding-left: 0;
     margin: 0 0 1em 0;
 }
 
-.packages .header {
+.datasets .header {
     padding-top: 0.5em;
     font-weight: bold;
     font-size: 1.1em;
 }
 
-.packages .extract {
+.datasets .extract {
 	padding-top: 0.3em;
 }
 
-.packages li {
+.datasets li {
 	list-style: none;
 	padding: 1em 0 0.2em 0.0em;
 	border-bottom: 1px solid #ececec;
@@ -605,11 +605,11 @@
 	/*white-space: nowrap;*/
 }
 
-.packages li a {
+.datasets li a {
 	text-decoration: none;
 }
 
-.packages li img {
+.datasets li img {
 	margin-bottom: -2px;
 }
 
@@ -617,14 +617,14 @@
     float:right;
 }
 
-ul.package_formats {
+ul.dataset_formats {
     float: right;
     padding: 0 0 3px 0; 
     margin: 0;
     font-family: monospace;
 }
 
-ul.package_formats li {
+ul.dataset_formats li {
     display: inline;
     margin: 0;
     padding: 0 5px 0 5px;


--- a/ckan/public/robots.txt	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/public/robots.txt	Mon Sep 05 18:49:32 2011 +0100
@@ -1,7 +1,7 @@
 User-agent: *
-Disallow: /package/rate/
+Disallow: /dataset/rate/
 Disallow: /revision/
-Disallow: /package/*/history
+Disallow: /dataset/*/history
 Disallow: /api/
 
 User-Agent: *


--- a/ckan/public/scripts/application.js	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/public/scripts/application.js	Mon Sep 05 18:49:32 2011 +0100
@@ -2,7 +2,7 @@
   $(document).ready(function () {
     CKAN.Utils.setupUserAutocomplete($('input.autocomplete-user'));
     CKAN.Utils.setupAuthzGroupAutocomplete($('input.autocomplete-authzgroup'));
-    CKAN.Utils.setupPackageAutocomplete($('input.autocomplete-package'));
+    CKAN.Utils.setupPackageAutocomplete($('input.autocomplete-dataset'));
     CKAN.Utils.setupTagAutocomplete($('input.autocomplete-tag'));
     CKAN.Utils.setupFormatAutocomplete($('input.autocomplete-format'));
   });
@@ -11,14 +11,14 @@
 var CKAN = CKAN || {};
 
 CKAN.Utils = function($, my) {
-  // Attach package autocompletion to provided elements
+  // Attach dataset autocompletion to provided elements
   //
   // Requires: jquery-ui autocomplete
   my.setupPackageAutocomplete = function(elements) {
     elements.autocomplete({
       minLength: 0,
       source: function(request, callback) {
-        var url = '/package/autocomplete?q=' + request.term;
+        var url = '/dataset/autocomplete?q=' + request.term;
         $.ajax({
           url: url,
           success: function(data) {
@@ -183,9 +183,9 @@
       // fetch updates.
       this.name_changed = false;
       // url for slug api (we need api rather than do it ourself because we check if available)
-      this.url = '/api/2/util/package/create_slug';
-      // Add a new element where the validity of the package name can be displayed
-      this.name_field.parent().append('<div id="package_name_valid_msg"></div>');
+      this.url = '/api/2/util/dataset/create_slug';
+      // Add a new element where the validity of the dataset name can be displayed
+      this.name_field.parent().append('<div id="dataset_name_valid_msg"></div>');
       this.title_field.blur(this.title_change_handler())
       this.title_field.keyup(this.title_change_handler())
       this.name_field.keyup(this.name_change_handler());
@@ -211,7 +211,7 @@
         // Reset if the name is emptied
         if (!self.name_field.val().replace(/^\s+|\s+$/g, '')){
           self.name_changed = false;
-          $('#package_name_valid_msg').html('');
+          $('#dataset_name_valid_msg').html('');
         } else {
           self.update(self.name_field.val(), function(data) {
               self.name_field.val(data.name)
@@ -226,7 +226,7 @@
         // Reset if the name is emptied
         if (!self.name_field.val().replace(/^\s+|\s+$/g, '')){
           self.name_changed = false;
-          $('#package_name_valid_msg').html('');
+          $('#dataset_name_valid_msg').html('');
         } else {
           self.name_changed = true;
           self.update(self.name_field.val(), function(data) {
@@ -251,11 +251,11 @@
           if (on_success) {
             on_success(data);
           }
-          var valid_msg = $('#package_name_valid_msg');
+          var valid_msg = $('#dataset_name_valid_msg');
           if (data.valid) {
-            valid_msg.html('<span style="font-weight: bold; color: #0c0">This package name is available!</span>');
+            valid_msg.html('<span style="font-weight: bold; color: #0c0">This dataset name is available!</span>');
           } else {
-            valid_msg.html('<span style="font-weight: bold; color: #c00">This package name is already used, please use a different name</span>');
+            valid_msg.html('<span style="font-weight: bold; color: #c00">This dataset name is already used, please use a different name</span>');
           }
         }
       });


--- a/ckan/templates/_util.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/_util.html	Mon Sep 05 18:49:32 2011 +0100
@@ -47,9 +47,9 @@
       </li></ul>
 
-  <!--! List of packages: pass in a collection of tags and this renders the
-        standard package listing -->
-  <ul py:def="package_list(packages)" class="packages">
+  <!--! List of datasets: pass in a collection of tags and this renders the
+        standard dataset listing -->
+  <ul py:def="package_list(packages)" class="datasets"><li py:for="package in packages"
         class="${'fullyopen' if (package.isopen() and package.resources) else None}"><div class="header">
@@ -59,7 +59,7 @@
 			
 			<div class="search_meta"><py:if test="package.resources">
-          <ul class="package_formats">
+          <ul class="dataset_formats"><py:for each="resource in package.resources"><py:if test="resource.format and not resource.format == ''"><li><a href="${resource.url}"
@@ -71,7 +71,7 @@
         <ul class="openness"><py:if test="package.isopen()"><li>
-              <a href="http://opendefinition.org/okd/" title="This package satisfies the Open Definition.">
+              <a href="http://opendefinition.org/okd/" title="This dataset satisfies the Open Definition."><img src="http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png" alt="[Open Data]" /></a></li>
@@ -95,7 +95,7 @@
     </li></ul>
 
-  <ul py:def="package_list_from_dict(packages)" class="packages">
+  <ul py:def="package_list_from_dict(packages)" class="datasets"><li py:for="package in packages"
         class="${'fullyopen' if (package.isopen and package.get('resources')) else None}"><div class="header">
@@ -105,7 +105,7 @@
 			
 			<div class="search_meta"><py:if test="package.resources">
-          <ul class="package_formats">
+          <ul class="dataset_formats"><py:for each="resource in package.resources"><py:if test="resource.get('format')"><li><a href="${resource.get('url')}"
@@ -117,7 +117,7 @@
         <ul class="openness"><py:if test="package.isopen"><li>
-              <a href="http://opendefinition.org/okd/" title="This package satisfies the Open Definition.">
+              <a href="http://opendefinition.org/okd/" title="This dataset satisfies the Open Definition."><img src="http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png" alt="[Open Data]" /></a></li>
@@ -141,10 +141,10 @@
     </li></ul>
 
-  <!--! List of data package groups: pass in a collection of data package groups 
+  <!--! List of dataset groups: pass in a collection of dataset groups 
         and this renders the standard group listing --><table py:def="group_list(groups)" class="groups">
-    <tr><th>Title</th><th>Number of packages</th><th>Description</th></tr>
+    <tr><th>Title</th><th>Number of datasets</th><th>Description</th></tr><py:for each="group in groups"><tr><td><a href="${h.url_for(controller='group', action='read', id=group.name)}">${group.display_name}</a></td>
@@ -154,10 +154,10 @@
     </py:for></table>
 
-  <!--! List of data package groups: pass in a collection of data package groups 
+  <!--! List of dataset groups: pass in a collection of dataset groups 
         and this renders the standard group listing. Same as the above, but using dictionaries --><table py:def="group_list_from_dict(groups)" class="groups">
-    <tr><th>Title</th><th>Number of packages</th><th>Description</th></tr>
+    <tr><th>Title</th><th>Number of datasets</th><th>Description</th></tr><py:for each="group in groups"><tr><td><a href="${h.url_for(controller='group', action='read', id=group['name'])}">${group['display_name']}</a></td>
@@ -181,7 +181,7 @@
       </py:for></table>
 
-  <!--! Package openness icons -->
+  <!--! Dataset openness icons --><img py:def="package_license_icon(package)"
     src="${g.site_url}/images/icons/door_${'open' if package.isopen() else 'grey'}.png"
     title="License: ${package.license.title if hasattr(package.license, 'title') else '?'}"
@@ -190,7 +190,7 @@
   <py:def function="package_resources_icon(package)" py:choose=""><a py:when="package.resources"
        href="${h.url_for(controller='package', action='read', id=package.name, anchor='resources')}">
-      <img src="${h.icon_url('arrow_down')}" title="View package resources" alt="DOWNLOAD" />
+      <img src="${h.icon_url('arrow_down')}" title="View dataset resources" alt="DOWNLOAD" /></a><img py:otherwise="" src="${h.icon_url('arrow_down_grey')}" title="No downloadable resources." alt="" />


--- a/ckan/templates/authorization_group/layout.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/authorization_group/layout.html	Mon Sep 05 18:49:32 2011 +0100
@@ -21,7 +21,7 @@
   <py:match path="primarysidebar"><li class="widget-container widget_text"><h2>Authorization Groups</h2>
-      <p i18n:msg="">Instead of specifying the privileges of specific users on a package or group,
+      <p i18n:msg="">Instead of specifying the privileges of specific users on a dataset or group,
           you can also specify a set of users that will share the same rights. To do that, an    
           <strong>authorization group</strong> can be set-up and users can be added to it.</p><p>


--- a/ckan/templates/group/edit.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/group/edit.html	Mon Sep 05 18:49:32 2011 +0100
@@ -5,14 +5,6 @@
   <py:def function="page_title">${c.grouptitle or c.groupname} - Edit - Groups</py:def><py:def function="page_heading">Edit: ${c.grouptitle or c.groupname}</py:def>
 
-  <py:def function="optional_head">
-    <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
-
-    <!-- Package autocomplete --> 
-    <script type="text/javascript" src="${g.site_url}/scripts/jquery.autocomplete.pack.js"></script> 
-    <script type="text/javascript" src="${g.site_url}/scripts/autocompleter.js"></script> 
-    <link rel="stylesheet" href="${g.site_url}/css/jquery.autocomplete.css" /> 
-  </py:def><div py:match="content">
     ${Markup(c.form)}


--- a/ckan/templates/group/edit_form.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/group/edit_form.html	Mon Sep 05 18:49:32 2011 +0100
@@ -7,14 +7,14 @@
       ${h.literal(c.fieldset.render())}
 
      <fieldset>
-      <legend>Packages</legend>
+      <legend>Datasets</legend><ul py:for="pkg in c.fieldset.model.packages"><li>
-            <input checked="checked" id="Group-packages-current" name="Group-packages-current" type="checkbox" value="${pkg.name}" />
+            <input checked="checked" id="Group-datasets-current" name="Group-packages-current" type="checkbox" value="${pkg.name}" /><label for="Group-packages_${pkg.name}" style="display: inline;">${pkg.name}</label></li></ul>
-      <p py:if="not c.fieldset.model.packages">There are no packages currently in this group.</p>
+      <p py:if="not c.fieldset.model.packages">There are no datasets currently in this group.</p></fieldset>
 
       ${h.literal(c.fieldset2.render())}


--- a/ckan/templates/group/index.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/group/index.html	Mon Sep 05 18:49:32 2011 +0100
@@ -3,8 +3,8 @@
   xmlns:xi="http://www.w3.org/2001/XInclude"
   py:strip="">
   
-  <py:def function="page_title">Groups of Data Packages</py:def>
-  <py:def function="page_heading">Groups of Data Packages</py:def>
+  <py:def function="page_title">Groups of Datasets</py:def>
+  <py:def function="page_heading">Groups of Datasets</py:def><py:def function="optional_head"><style>#minornavigation { visibility: hidden; }</style>    


--- a/ckan/templates/group/layout.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/group/layout.html	Mon Sep 05 18:49:32 2011 +0100
@@ -9,7 +9,7 @@
   <py:match path="primarysidebar"><li class="widget-container boxed widget_text"><h3>Groups section</h3>
-      <p i18n:msg="">Whilst tags are great at collecting packages together, there are occasions when you want to restrict users from editing a collection. A <strong>group</strong> can be set-up to specify which users have permission to add or remove packages from it.</p>
+      <p i18n:msg="">Whilst tags are great at collecting datasets together, there are occasions when you want to restrict users from editing a collection. A <strong>group</strong> can be set-up to specify which users have permission to add or remove datasets from it.</p><p><span class="ckan_logged_in" style="display: none;">
 	  To create a new group, please first <a href="${h.url_for(controller='user',action='login', id=None)}">login</a>.


--- a/ckan/templates/group/new.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/group/new.html	Mon Sep 05 18:49:32 2011 +0100
@@ -5,15 +5,6 @@
   <py:def function="page_title">New - Groups</py:def><py:def function="page_heading">New Group</py:def>
 
-  <py:def function="optional_head">
-    <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
-
-    <!-- Package autocomplete and rack-up --> 
-    <script type="text/javascript" src="${g.site_url}/scripts/jquery.autocomplete.pack.js"></script> 
-    <script type="text/javascript" src="${g.site_url}/scripts/autocompleter.js"></script> 
-    <link rel="stylesheet" href="${g.site_url}/css/jquery.autocomplete.css" /> 
-  </py:def>
-
   <div py:match="content">
     ${Markup(c.form)}
   </div>


--- a/ckan/templates/group/new_group_form.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/group/new_group_form.html	Mon Sep 05 18:49:32 2011 +0100
@@ -63,25 +63,25 @@
 </fieldset><fieldset>
-  <legend>Packages</legend>
+  <legend>Datasets</legend><dl py:if="data.get('packages')"><py:for each="num, package in enumerate(data.get('packages'))">
-      <dt><input checked="checked" id="packages__${num}__name" name="packages__${num}__name" type="checkbox" value="${package['name']}"/></dt>
+      <dt><input checked="checked" id="datasets__${num}__name" name="packages__${num}__name" type="checkbox" value="${package['name']}"/></dt><dd><label for="packages__${num}__name">${package['name']}</label></dd></py:for></dl>
-  <p py:if="not data.get('packages')">There are no packages currently in this group.</p>
+  <p py:if="not data.get('packages')">There are no datasets currently in this group.</p></fieldset><fieldset><legend>
-    Add packages
+    Add datasets
   </legend><dl>
-    <dt><label class="field_opt" for="packages__${len(data.get('packages', []))}__name">Package</label></dt>
-    <dd><input class="autocomplete-package" id="packages__${len(data.get('packages', []))}__name" name="packages__${len(data.get('packages', []))}__name" type="text" /></dd>
+    <dt><label class="field_opt" for="packages__${len(data.get('packages', []))}__name">Dataset</label></dt>
+    <dd><input class="autocomplete-dataset" id="datasets__${len(data.get('packages', []))}__name" name="packages__${len(data.get('packages', []))}__name" type="text" /></dd></dl></fieldset>
 


--- a/ckan/templates/group/read.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/group/read.html	Mon Sep 05 18:49:32 2011 +0100
@@ -32,8 +32,8 @@
   </py:match><py:match path="content">
-    <h3>Packages:</h3>
-    <p i18n:msg="item_count">There are ${c.page.item_count} packages in this group.</p>
+    <h3>Datasets:</h3>
+    <p i18n:msg="item_count">There are ${c.page.item_count} datasets in this group.</p>
     ${c.page.pager()}
     ${package_list(c.page.items)}
     ${c.page.pager()}


--- a/ckan/templates/home/about.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/home/about.html	Mon Sep 05 18:49:32 2011 +0100
@@ -9,7 +9,7 @@
     <h2>About CKAN</h2><p i18n:msg="">CKAN is the Comprehensive Knowledge Archive Network, a <strong>registry</strong> of <a
-      href="http://opendefinition.org/">open knowledge</a> packages and projects
+      href="http://opendefinition.org/">open knowledge</a> datasets and projects
     (and a few closed ones).</p><p i18n:msg="">CKAN makes it easy to <strong>find, share and reuse open
@@ -22,7 +22,7 @@
     <img src="${g.site_url}/images/ckan-features.png" alt="CKAN Features Overview" style="margin-left: 4em; margin-bottom: 2em;" /><p i18n:msg="">As the diagram shows, CKAN combines the features of a listing/registry,
-		a package index and a wiki. As a registry it acts like <a
+		a dataset index and a wiki. As a registry it acts like <a
 			href="http://www.freshmeat.net/">freshmeat</a> but for open data and
 		content resources. However it adds to a simple registry in key ways.</p>
 


--- a/ckan/templates/home/index.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/home/index.html	Mon Sep 05 18:49:32 2011 +0100
@@ -117,9 +117,9 @@
           <h1>Find data</h1><form action="/package" method="GET"> 
-            <input name="q" value="" class="search-field" placeholder="Find data packages" /> 
+            <input name="q" value="" class="search-field" placeholder="Find datasets" /></form> 
-          ${g.site_title} contains <a href="/package">${c.package_count} data packages</a> that you can 
+          ${g.site_title} contains <a href="${h.url_for(controller='package')}">${c.package_count} datasets</a> that you can 
           browse, learn about and download. 
         </div></div>
@@ -131,9 +131,9 @@
         to find other people interested in your data.
         
         <py:choose test="h.am_authorized(c, actions.PACKAGE_CREATE)">
-          <a py:when="" href="/package/new" class="create-button">Create a data package »</a>
+          <a py:when="" href="${h.url_for(controller='package', action='new')}" class="create-button">Create a dataset »</a><py:otherwise>
-            <a href="/user/login" class="create-button">Sign up »</a>
+            <a href="${h.url_for(controller='user', action='login')}" class="create-button">Sign up »</a></py:otherwise></py:choose></div>
@@ -160,7 +160,7 @@
           <p>
             ${h.markdown_extract(group.description)}
           </p>
-          <strong>${group.title} has ${len(group.packages)} data packages.</strong>
+          <strong>${group.title} has ${len(group.packages)} datasets.</strong></div></py:for></div>


--- a/ckan/templates/importer/importer.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/importer/importer.html	Mon Sep 05 18:49:32 2011 +0100
@@ -5,8 +5,8 @@
   <py:def function="page_title">Importer</py:def><div py:match="content">
-    <h2>Import Data Packages</h2>
-    <p>Here you can supply an Excel file with details of multiple packages and import these into ${g.site_title}.</p>
+    <h2>Import Datasets</h2>
+    <p>Here you can supply an Excel file with details of multiple datasets and import these into ${g.site_title}.</p><div><h3 py:if="c.error" class="form-errors">
         Error: ${c.error}


--- a/ckan/templates/importer/preview.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/importer/preview.html	Mon Sep 05 18:49:32 2011 +0100
@@ -13,7 +13,7 @@
       </h3>
 
       ${h.form(h.url_for(controller='importer', action='do_import'), multipart=True, id='import-preview')}
-          <p>${c.num_pkgs} package${'s' if c.num_pkgs != 1 else ''} read from ${c.import_filename}:</p>
+          <p>${c.num_pkgs} dataset${'s' if c.num_pkgs != 1 else ''} read from ${c.import_filename}:</p><py:for each="pkg in c.import_previews"><div>
@@ -22,7 +22,7 @@
           </py:for><py:if test="c.pkgs_suppressed">
-            <p>Further package previews not shown.</p>
+            <p>Further dataset previews not shown.</p></py:if><label for="log_message">Edit summary (briefly describe the changes you have made)</label>


--- a/ckan/templates/layout_base.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/layout_base.html	Mon Sep 05 18:49:32 2011 +0100
@@ -90,11 +90,11 @@
         <div class="menu"><span id="menusearch"><form action="${url(controller='package', action='search')}" method="GET">
-              <input name="q" value="${c.q if hasattr(c, 'q') else ''}" class="search" placeholder="Find data packages" />
+              <input name="q" value="${c.q if hasattr(c, 'q') else ''}" class="search" placeholder="Find datasets" /></form></span><div id="mainmenu">
-            <span py:if="h.check_access('package_create')">${h.nav_link(c, _('Add a package'), controller='package', action='new', id=None)}</span>
+            <span py:if="h.check_access('package_create')">${h.nav_link(c, _('Add a dataset'), controller='package', action='new', id=None)}</span>
             ${h.nav_link(c, _('Search'), controller='package', action='index', id=None, highlight_actions = 'new index')}
             ${h.nav_link(c, _('Groups'), controller='group', action='index', id=None)}
           </div>


--- a/ckan/templates/package/authz.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/package/authz.html	Mon Sep 05 18:49:32 2011 +0100
@@ -2,7 +2,7 @@
   xmlns:xi="http://www.w3.org/2001/XInclude"
   py:strip="">
   
-  <py:def function="page_title">${c.pkgtitle or c.pkgname} - Authorization - Data Packages</py:def>
+  <py:def function="page_title">${c.pkgtitle or c.pkgname} - Authorization - Datasets</py:def><py:def function="page_heading">Authorization: ${c.pkgtitle or c.pkgname}</py:def><div py:match="content">


--- a/ckan/templates/package/comments.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/package/comments.html	Mon Sep 05 18:49:32 2011 +0100
@@ -2,9 +2,9 @@
   xmlns:xi="http://www.w3.org/2001/XInclude"
   py:strip="">
   
-  <py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Data Packages - History</py:def>
+  <py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Datasets - History</py:def>
 
-  <div py:match="content" class="package">
+  <div py:match="content" class="dataset"><h2 class="head">
       ${c.pkg_dict.get('title', '')}
       <span class="name">(${c.pkg_dict['name']})</span>


--- a/ckan/templates/package/edit.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/package/edit.html	Mon Sep 05 18:49:32 2011 +0100
@@ -3,7 +3,7 @@
   xmlns:xi="http://www.w3.org/2001/XInclude"
   py:strip="">
   
-  <py:def function="page_title">${c.pkg.title or c.pkg.name} - Edit - Data Packages</py:def>
+  <py:def function="page_title">${c.pkg.title or c.pkg.name} - Edit - Datasets</py:def><py:def function="page_heading">Edit: ${c.pkg.title or c.pkg.name}</py:def><py:def function="body_class">hide-sidebar</py:def>
@@ -14,7 +14,7 @@
     <link rel="stylesheet" href="${g.site_url}/css/flexitable.css" /></py:def>
 
-  <div py:match="content" class="package">
+  <div py:match="content" class="dataset"><div id="preview" style="margin-left: 20px;" py:if="c.preview"><hr /><h2>Preview</h2>


--- a/ckan/templates/package/edit_form.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/package/edit_form.html	Mon Sep 05 18:49:32 2011 +0100
@@ -1,4 +1,4 @@
-    <form id="package-edit" action="" method="post" class="ckan package_create_form"
+    <form id="dataset-edit" action="" method="post" class="ckan dataset_create_form"
       xmlns:i18n="http://genshi.edgewall.org/i18n"
       xmlns:py="http://genshi.edgewall.org/"
       xmlns:xi="http://www.w3.org/2001/XInclude"


--- a/ckan/templates/package/form_fields.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/package/form_fields.html	Mon Sep 05 18:49:32 2011 +0100
@@ -4,7 +4,7 @@
 
 <script type="text/javascript">
   jQuery(document).ready(function($) {
-    CKAN.Utils.PackageSlugCreator.create($('#Package--title'), $('#Package--name'));
+    CKAN.Utils.PackageSlugCreator.create($('#Dataset--title'), $('#Dataset--name'));
   });
 </script>
 


--- a/ckan/templates/package/history.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/package/history.html	Mon Sep 05 18:49:32 2011 +0100
@@ -3,25 +3,25 @@
   xmlns:xi="http://www.w3.org/2001/XInclude"
   py:strip="">
   
-  <py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Data Packages - History</py:def>
+  <py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Datasets - History</py:def><py:def function="page_heading">History: ${c.pkg.title or c.pkg.name}</py:def><!-- Sidebar --><py:match path="primarysidebar"><li class="widget-container widget_text"><h4>Updates</h4>
-        <p class="atom-feed-link package-history-link">
+        <p class="atom-feed-link dataset-history-link"><a
             href="${url(controller='package', action='history', id=c.pkg_dict['name'], format='atom', days=7)}"
-            title="${g.site_title} - Package History - ${c.pkg_dict['name']}">
+            title="${g.site_title} - Dataset History - ${c.pkg_dict['name']}">
             Subscribe »</a></p></li></py:match>
   
-  <div py:match="content" class="package">
+  <div py:match="content" class="dataset"><h3>Revisions</h3>
-    <form id="package-revisions" action="diff" method="post"
+    <form id="dataset-revisions" action="diff" method="post"
       xmlns:py="http://genshi.edgewall.org/"
       xmlns:xi="http://www.w3.org/2001/XInclude"
       > 
@@ -46,7 +46,7 @@
               <a href="${h.url_for(controller='revision',action='read',id=rev['id'])}">${rev['id'][:4]}…</a></td><td>
-              <a href="${h.url_for(controller='package',action='read',id='%s@%s' % (c.pkg_dict['name'], rev['timestamp']))}" title="${'Read package as of %s' % rev['timestamp']}">${h.render_datetime(rev['timestamp'])}</a></td>
+              <a href="${h.url_for(controller='package',action='read',id='%s@%s' % (c.pkg_dict['name'], rev['timestamp']))}" title="${'Read dataset as of %s' % rev['timestamp']}">${h.render_datetime(rev['timestamp'])}</a></td><td>${h.linked_user(rev['author'])}</td><td>${rev['message']}</td></tr> 
@@ -57,7 +57,7 @@
   </div><!-- content --><py:def function="optional_feed">
-  <link rel="alternate" type="application/atom+xml" title="Package History"
+  <link rel="alternate" type="application/atom+xml" title="Dataset History"
     href="${url(controller='package', action='history', id=c.pkg_dict['name'], format='atom', days=7)}" /></py:def>
 


--- a/ckan/templates/package/new.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/package/new.html	Mon Sep 05 18:49:32 2011 +0100
@@ -3,8 +3,8 @@
   xmlns:xi="http://www.w3.org/2001/XInclude"
   py:strip="">
   
-  <py:def function="page_title">New - Data Packages</py:def>
-  <py:def function="page_heading">Register a New Data Package</py:def>
+  <py:def function="page_title">New - Datasets</py:def>
+  <py:def function="page_heading">Register a New Dataset</py:def><py:def function="body_class">hide-sidebar</py:def>
 


--- a/ckan/templates/package/new_package_form.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/package/new_package_form.html	Mon Sep 05 18:49:32 2011 +0100
@@ -1,4 +1,4 @@
-<form id="package-edit" class="package_create_form ckan" method="post" 
+<form id="dataset-edit" class="dataset_create_form ckan" method="post" 
   py:attrs="{'class':'has-errors'} if errors else {}"
   xmlns:i18n="http://genshi.edgewall.org/i18n"
   xmlns:py="http://genshi.edgewall.org/"
@@ -18,13 +18,13 @@
   <dl><dt><label class="field_opt" for="title">Title</label></dt><dd><input id="title" name="title" type="text" value="${data.get('title', '')}"/></dd>
-    <dd class="instructions basic">A short descriptive title for the data set.</dd>
+    <dd class="instructions basic">A short descriptive title for the dataset.</dd><dd class="instructions further">It should not be a description though - save that for the Notes field. Do not give a trailing full stop.</dd><dd class="field_error" py:if="errors.get('title', '')">${errors.get('title', '')}</dd><dt><label class="field_req" for="name">Name *</label></dt><dd><input id="name" maxlength="100" name="name" type="text" value="${data.get('name', '')}" /></dd>
-    <dd class="instructions basic">A unique identifier for the package.</dd>
+    <dd class="instructions basic">A unique identifier for the dataset.</dd><dd class="instructions further">It should be broadly humanly readable, in the spirit of Semantic Web URIs. Only use an acronym if it is widely recognised. Renaming is possible but discouraged.</dd><dd class="hints">2+ characters, lowercase, using only 'a-z0-9' and '-_'</dd><dd class="field_error" py:if="errors.get('name', '')">${errors.get('name', '')}</dd>
@@ -38,7 +38,7 @@
     <dt><label class="field_opt" for="notes">Notes</label></dt><dd><textarea cols="60" id="notes" name="notes" rows="15">${data.get('notes', '')}</textarea></dd><dd class="instructions basic">The main description of the dataset</dd>
-    <dd class="instructions further">It is often displayed with the package title. In particular, it should start with a short sentence that describes the data set succinctly, because the first few words alone may be used in some views of the data sets.</dd>
+    <dd class="instructions further">It is often displayed with the dataset title. In particular, it should start with a short sentence that describes the dataset succinctly, because the first few words alone may be used in some views of the datasets.</dd><dd class="hints">You can use <a href="http://daringfireball.net/projects/markdown/syntax">Markdown formatting</a> here.</dd><dt><label class="field_opt" for="license_id">Licence</label></dt>
@@ -97,9 +97,9 @@
   </table><div class="instructions basic">The files containing the data or address of the APIs for accessing it.</div>
-  <div class="instructions further"><br />These can be repeated as required. For example if the data is being supplied in multiple formats, or split into different areas or time periods, each file is a different 'resource' which should be described differently. They will all appear on the dataset page on CKAN together.<br /><br /><b>URL:</b> This is the Internet link directly to the data - by selecting this link in a web browser, the user will immediately download the full data set. Note that datasets are not hosted on this site, but by the publisher of the data. Alternatively the URL can point to an API server such as a SPARQL endpoint or JSON-P service.<br /><b>Format:</b> This should give the file format in which the data is supplied. <br /><b>Description</b> Any information you want to add to describe the resource.<br /></div>
+  <div class="instructions further"><br />These can be repeated as required. For example if the data is being supplied in multiple formats, or split into different areas or time periods, each file is a different 'resource' which should be described differently. They will all appear on the dataset page on CKAN together.<br /><br /><b>URL:</b> This is the Internet link directly to the data - by selecting this link in a web browser, the user will immediately download the full dataset. Note that datasets are not hosted on this site, but by the publisher of the data. Alternatively the URL can point to an API server such as a SPARQL endpoint or JSON-P service.<br /><b>Format:</b> This should give the file format in which the data is supplied. <br /><b>Description</b> Any information you want to add to describe the resource.<br /></div><div class="hints">Format choices: CSV | RDF | XML | XBRL | SDMX | HTML+RDFa | Other as appropriate</div>
-  <div class="field_error" py:if="errors.get('resources', '')">Package resource(s) incomplete.</div>
+  <div class="field_error" py:if="errors.get('resources', '')">Dataset resource(s) incomplete.</div></fieldset><fieldset id="groups">
@@ -210,7 +210,7 @@
 
 <p class="hints"><strong>Important:</strong> By submitting content, you agree to release your contributions
-  under the open license specified on the <a href="/license">license page</a>. Please <strong>refrain</strong> from editing this page if you are <strong>not</strong> happy to do this.
+  under the <a href="http://opendatacommons.org/licenses/odbl/1.0/">Open Database License</a>. Please <strong>refrain</strong> from editing this page if you are <strong>not</strong> happy to do this.
 </p>
 
 


--- a/ckan/templates/package/read.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/package/read.html	Mon Sep 05 18:49:32 2011 +0100
@@ -12,7 +12,7 @@
   py:strip=""><py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])}
-  - Data Packages</py:def>
+  - Datasets</py:def><py:def function="page_heading" property="dc:title">${c.pkg_dict['title']}</py:def>
   
@@ -65,7 +65,7 @@
           </py:if><p class="hint"><py:if test="not c.pkg.groups">
-               Groups are collections of packages maintained by users of ${g.site_title}. This package has not been added to any groups yet.
+               Groups are collections of dataset maintained by users of ${g.site_title}. This dataset has not been added to any groups yet.
             </py:if>
 
 
@@ -83,7 +83,7 @@
           href="${c.harvest_catalogue_url}">${c.harvest_catalogue_name}</a></li><li py:if="c.package_relationships">
-          <h3>Related packages</h3>
+          <h3>Related dataset</h3><ul><py:for each="pkg, relationship_str, comment in c.package_relationships"><li>
@@ -102,7 +102,7 @@
     <li class="widget-container boxed widget_text"><py:if test="c.pkg.isopen() and c.pkg.resources"><h3>
-        This Package is Open
+        This Dataset is Open
       </h3><p py:if="c.pkg.license_id">
         License:
@@ -116,18 +116,18 @@
       <p class="okd"><a
           href="http://www.opendefinition.org/okd/"
-          title="This package satisfies the Open Knowledge Definition.">
+          title="This dataset satisfies the Open Knowledge Definition."><img src="http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png" alt="[Open Data]" /></a></p></py:if><py:if test="not(c.pkg.isopen() and c.pkg.resources)">
-      <h3 i18n:msg="">This package is Not Open</h3> 
+      <h3 i18n:msg="">This dataset is Not Open</h3><p>Either because it is not openly licensed or is missing
       downloadable resources.</p><p class="widget_action">
-        <a href="http://isitopendata.org/enquiry/start/?ckan_package=${c.pkg.name}">Start an enquiry on IsItOpenData »</a>
+        <a href="http://isitopendata.org/enquiry/start/?ckan_dataset=${c.pkg.name}">Start an enquiry on IsItOpenData »</a></p></py:if></li>
@@ -136,8 +136,8 @@
   <div py:match="content"><py:if test="c.pkg_revision_id"><div id="revision" class="widget-container">
-        <p py:if="c.pkg_revision_not_latest">This is an old revision of this package, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}. It may differ significantly from the <a href="${url(controller='package', action='read', id=c.pkg.name)}">current revision</a>.</p>
-        <p py:if="not c.pkg_revision_not_latest">This is the current revision of this package, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}.</p>
+        <p py:if="c.pkg_revision_not_latest">This is an old revision of this dataset, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}. It may differ significantly from the <a href="${url(controller='package', action='read', id=c.pkg.name)}">current revision</a>.</p>
+        <p py:if="not c.pkg_revision_not_latest">This is the current revision of this dataset, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}.</p></div></py:if>
 
@@ -152,7 +152,7 @@
   </py:def><py:def function="optional_feed">
-  <link rel="alternate" type="application/atom+xml" title="Package History"
+  <link rel="alternate" type="application/atom+xml" title="Dataset History"
     href="${url(controller='package', action='history', id=c.pkg.name, format='atom', days=7)}" /></py:def>
 


--- a/ckan/templates/package/read_core.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/package/read_core.html	Mon Sep 05 18:49:32 2011 +0100
@@ -3,8 +3,8 @@
   py:strip=""
   ><xi:include href="../_util.html" />
-  <div id="package" class="package">
-    <!-- About package -->
+  <div id="dataset" class="dataset">
+    <!-- About dataset --><div class="notes" py:if="str(c.pkg_notes_formatted).strip()">
       ${c.pkg_notes_formatted}
     </div>
@@ -39,7 +39,7 @@
                 This is a list of all known formats and datasets for <em>${c.pkg_dict.get('title', '')}</em>. If you know of another (CSV, SPARQL end-point etc.) ${h.subnav_link(c, 'please edit this page and add it to the list', controller='package', action='edit', id=c.pkg.name)}.
             </caption></table>
-      <table py:otherwise=""><tr><th>Resources</th><td>None given for this package.</td></tr></table>
+      <table py:otherwise=""><tr><th>Resources</th><td>None given for this dataset.</td></tr></table></py:choose></div>
 
@@ -47,10 +47,10 @@
 
     <py:def function="details_item(label, value)"><tr>
-          <td class="package-label">
+          <td class="dataset-label">
             ${label}
           </td>
-          <td class="package-details">
+          <td class="dataset-details">
             ${value}
           </td></tr>
@@ -68,8 +68,8 @@
       <tbody><tr py:for="i, (key, value) in enumerate(c.pkg_extras)"
           rel="dc:relation" resource="_:extra${i}">
-          <td class="package-label" property="rdfs:label">${_(key)}</td>
-          <td class="package-details" property="rdf:value">${value}</td>
+          <td class="dataset-label" property="rdfs:label">${_(key)}</td>
+          <td class="dataset-details" property="rdf:value">${value}</td></tr></tbody><caption py:if="not c.is_preview and h.check_access('package_update',{'id':c.pkg.id})">
@@ -78,6 +78,6 @@
     </table></div>
     
-  </div><!-- /package -->
+  </div><!-- /dataset --></html>


--- a/ckan/templates/package/search.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/package/search.html	Mon Sep 05 18:49:32 2011 +0100
@@ -21,7 +21,7 @@
   <py:match path="primarysidebar"><li class="widget-container boxed widget_text" py:if="h.check_access('package_create')">
-        <h3>Add a package</h3>
+        <h3>Add a dataset</h3><p>
             Do you know of a dataset that should be added to ${g.site_title}?
             <br/>
@@ -61,10 +61,10 @@
             Please try another search term.</p></py:if><py:if test="request.params">      
-        <h4 i18n:msg="item_count"><strong>${c.page.item_count}</strong> packages found</h4>            
+        <h4 i18n:msg="item_count"><strong>${c.page.item_count}</strong> datasets found</h4></py:if><py:if test="c.page.item_count == 0 and request.params">
-        <p i18n:msg="">Would you like to <a href="${h.url_for(action='new', id=None)}">create a new package?</a></p>
+        <p i18n:msg="">Would you like to <a href="${h.url_for(action='new', id=None)}">create a new dataset?</a></p></py:if>
       ${package_list_from_dict(c.page.items)}
       ${c.page.pager(q=c.q)}


--- a/ckan/templates/package/search_form.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/package/search_form.html	Mon Sep 05 18:49:32 2011 +0100
@@ -5,15 +5,15 @@
   py:strip=""
   >
 
-<form id="package-search" class="package-search" action="${h.url_for(controller='package', action='search', id=None)}" method="GET">
+<form id="dataset-search" class="dataset-search" action="${h.url_for(controller='package', action='search', id=None)}" method="GET"><input type="search" class="search" name="q" value="${c.q}" autocomplete="off" results="5" placeholder="Search..." /><span py:if="c.fields"><py:for each="(k, v) in c.fields"><input type="hidden" name="${k}" value="${v}" /></py:for></span>
-  <div class="package-search-filters">Filter by <label for="open_only" class="inline">${h.checkbox(name='open_only', checked=c.open_only)} packages with open licenses</label>
-  <label for="downloadable_only" class="inline">${h.checkbox(name='downloadable_only', checked=c.downloadable_only)} packages with downloads</label>
+  <div class="dataset-search-filters">Filter by <label for="open_only" class="inline">${h.checkbox(name='open_only', checked=c.open_only)} datasets with open licenses</label>
+  <label for="downloadable_only" class="inline">${h.checkbox(name='downloadable_only', checked=c.downloadable_only)} datasets with downloads</label><input type="submit" value="${_('Search')}" class="button" /></div></form>


--- a/ckan/templates/revision/read.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/revision/read.html	Mon Sep 05 18:49:32 2011 +0100
@@ -42,7 +42,7 @@
     ${c.revision.message}
 
     <h3>Changes</h3>
-    <h4>Packages</h4>
+    <h4>Datasets</h4><ul><py:for each="pkg in c.packages"><li>
@@ -51,11 +51,11 @@
       </py:for></ul>
 
-    <h4>Packages' Tags</h4>
+    <h4>Datasets' Tags</h4><ul><py:for each="pkgtag in c.pkgtags"><li>
-      Package - ${h.link_to(pkgtag.package.name, h.url_for(controller='package', action='read', id=pkgtag.package.name))},
+      Dataset - ${h.link_to(pkgtag.package.name, h.url_for(controller='package', action='read', id=pkgtag.package.name))},
       Tag - ${h.link_to(pkgtag.tag.name, h.url_for(controller='tag', action='read', id=pkgtag.tag.name))}
       </li></py:for>


--- a/ckan/templates/tag/read.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/tag/read.html	Mon Sep 05 18:49:32 2011 +0100
@@ -7,7 +7,7 @@
   <py:def function="page_heading">Tag: ${c.tag['name']}</py:def><div py:match="content">
-    <p i18n:msg="package_count, tagname">There are ${len(c.tag['packages'])} packages tagged with <strong>${c.tag['name']}</strong>:</p>
+    <p i18n:msg="count, tagname">There are ${len(c.tag['packages'])} datasets tagged with <strong>${c.tag['name']}</strong>:</p>
     ${package_list_from_dict(c.tag['packages'])}
   </div>
 


--- a/ckan/templates/user/edit.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/user/edit.html	Mon Sep 05 18:49:32 2011 +0100
@@ -8,10 +8,6 @@
       Edit User: ${c.userobj.display_name}
   </py:def>
 
-  <py:def function="optional_head">
-    <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
-  </py:def>
-
   <div py:match="content"><a href="#preview" py:if="c.preview">(skip to preview)</a>
 


--- a/ckan/templates/user/login.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/user/login.html	Mon Sep 05 18:49:32 2011 +0100
@@ -18,7 +18,7 @@
     <li class="widget-container boxed widget_text"><h2>Not a member?</h2><p>
-      Join CKAN to contribute packages under your own name.
+      Join CKAN to contribute datasets under your own name.
       </p><ul><li>${h.link_to(_('Register'), h.url_for(action='register'))}</li>


--- a/ckan/templates/user/new.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/user/new.html	Mon Sep 05 18:49:32 2011 +0100
@@ -2,10 +2,6 @@
   xmlns:xi="http://www.w3.org/2001/XInclude"
   py:strip="">
   
-  <py:def function="optional_head">
-    <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
-  </py:def>
-
   <py:match path="primarysidebar"><li class="widget-container widget_text"><h3>Have an OpenID?</h3>


--- a/ckan/templates/user/read.html	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/templates/user/read.html	Mon Sep 05 18:49:32 2011 +0100
@@ -18,7 +18,7 @@
       <h3>Activity</h3><ul><li><strong>Number of edits:</strong> ${c.user_dict['number_of_edits']}</li>
-        <li><strong>Number of packages administered:</strong> ${c.user_dict['number_administered_packages']}</li>
+        <li><strong>Number of datasets administered:</strong> ${c.user_dict['number_administered_packages']}</li></ul></li></py:match>


--- a/ckan/tests/forms/test_authz.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/tests/forms/test_authz.py	Mon Sep 05 18:49:32 2011 +0100
@@ -32,7 +32,7 @@
         linker = ckan.forms.authz.get_package_linker('delete')
         pr = anna.roles[0]
         out = linker(pr)
-        assert '<a href="/package/authz/%s' % pr.package.name in out, out
+        assert '<a href="/dataset/authz/%s' % pr.package.name in out, out
 
 
 class TestSync:


--- a/ckan/tests/functional/api/base.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/tests/functional/api/base.py	Mon Sep 05 18:49:32 2011 +0100
@@ -71,11 +71,11 @@
     def package_offset(self, package_name=None):
         if package_name is None:
             # Package Register
-            return self.offset('/rest/package')
+            return self.offset('/rest/dataset')
         else:
             # Package Entity
             package_ref = self.package_ref_from_name(package_name)
-            return self.offset('/rest/package/%s' % package_ref)
+            return self.offset('/rest/dataset/%s' % package_ref)
 
     def package_ref_from_name(self, package_name):
         package = self.get_package_by_name(unicode(package_name))
@@ -140,18 +140,18 @@
         package_1_ref = self.package_ref_from_name(package_1_name)
         if package_2_name is None:
             if not relationship_type:
-                return self.offset('/rest/package/%s/relationships' % \
+                return self.offset('/rest/dataset/%s/relationships' % \
                                    package_1_ref)
             else:
-                return self.offset('/rest/package/%s/%s' %
+                return self.offset('/rest/dataset/%s/%s' %
                                    (package_1_ref, relationship_type))
         else:
             package_2_ref = self.package_ref_from_name(package_2_name)
             if not relationship_type:
-                return self.offset('/rest/package/%s/relationships/%s' % \
+                return self.offset('/rest/dataset/%s/relationships/%s' % \
                                    (package_1_ref, package_2_ref))
             else:
-                return self.offset('/rest/package/%s/%s/%s' % \
+                return self.offset('/rest/dataset/%s/%s/%s' % \
                                    (package_1_ref,
                                     relationship_type,
                                     package_2_ref))
@@ -221,7 +221,7 @@
 
         # Todo: What is the deal with ckan_url? And should this use IDs rather than names?
         assert 'ckan_url' in msg
-        assert '"ckan_url": "http://test.ckan.net/package/annakarenina"' in msg, msg
+        assert '"ckan_url": "http://test.ckan.net/dataset/annakarenina"' in msg, msg
 
     def assert_msg_represents_roger(self, msg):
         assert 'roger' in msg, msg


--- a/ckan/tests/functional/api/model/test_package.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/tests/functional/api/model/test_package.py	Mon Sep 05 18:49:32 2011 +0100
@@ -151,19 +151,19 @@
             'name':u'testpackage06_400',
             'resources':[u'should_be_a_dict'],
         }
-        offset = self.offset('/rest/package')
+        offset = self.offset('/rest/dataset')
         postparams = '%s=1' % self.dumps(test_params)
         res = self.app.post(offset, params=postparams, status=self.STATUS_400_BAD_REQUEST,
                 extra_environ=self.extra_environ)
 
     def test_register_post_denied(self):
-        offset = self.offset('/rest/package')
+        offset = self.offset('/rest/dataset')
         postparams = '%s=1' % self.dumps(self.package_fixture_data)
         res = self.app.post(offset, params=postparams, status=self.STATUS_403_ACCESS_DENIED)
 
     def test_register_post_readonly_fields(self):
         # (ticket 662) Post a package with readonly field such as 'id'
-        offset = self.offset('/rest/package')
+        offset = self.offset('/rest/dataset')
         data = {'name': u'test_readonly',
                 'id': u'not allowed to be set',
                 }
@@ -176,7 +176,7 @@
     def test_entity_get_ok(self):
         package_refs = [self.anna.name, self.anna.id]
         for ref in package_refs:
-            offset = self.offset('/rest/package/%s' % ref)
+            offset = self.offset('/rest/dataset/%s' % ref)
             res = self.app.get(offset, status=self.STATUS_200_OK)
             self.assert_msg_represents_anna(msg=res.body)
 
@@ -190,7 +190,7 @@
         self.assert_msg_represents_anna(msg=msg)
 
     def test_entity_get_not_found(self):
-        offset = self.offset('/rest/package/22222')
+        offset = self.offset('/rest/dataset/22222')
         res = self.app.get(offset, status=self.STATUS_404_NOT_FOUND)
         self.remove()
 
@@ -232,7 +232,7 @@
         res = self.app.delete(offset, status=self.STATUS_403_ACCESS_DENIED)
 
     def test_09_update_package_entity_not_found(self):
-        offset = self.offset('/rest/package/22222')
+        offset = self.offset('/rest/dataset/22222')
         postparams = '%s=1' % self.dumps(self.package_fixture_data)
         res = self.app.post(offset, params=postparams,
                             status=self.STATUS_404_NOT_FOUND,
@@ -286,7 +286,7 @@
         # because you should be able to specify the package both ways round
         # for both versions of the API.
         package_ref = getattr(pkg, package_ref_attribute)
-        offset = self.offset('/rest/package/%s' % package_ref)
+        offset = self.offset('/rest/dataset/%s' % package_ref)
         params = '%s=1' % self.dumps(new_fixture_data)
         method_func = getattr(self.app, method_str)
         res = method_func(offset, params=params, status=self.STATUS_200_OK,
@@ -498,13 +498,13 @@
     def test_entity_delete_not_found(self):
         package_name = u'random_one'
         assert not model.Session.query(model.Package).filter_by(name=package_name).count()
-        offset = self.offset('/rest/package/%s' % package_name)
+        offset = self.offset('/rest/dataset/%s' % package_name)
         res = self.app.delete(offset, status=self.STATUS_404_NOT_FOUND,
                               extra_environ=self.extra_environ)
 
     def test_package_revisions(self):
         # check original revision
-        res = self.app.get(self.offset('/rest/package/%s/revisions' % 'annakarenina'))
+        res = self.app.get(self.offset('/rest/dataset/%s/revisions' % 'annakarenina'))
         revisions = res.json
         assert len(revisions) == 1, len(revisions)
         expected_keys = set(('id', 'message', 'author', 'timestamp', 'approved_timestamp'))
@@ -518,7 +518,7 @@
         model.repo.commit_and_remove()
 
         # check new revision is there
-        res = self.app.get(self.offset('/rest/package/%s/revisions' % 'annakarenina'))
+        res = self.app.get(self.offset('/rest/dataset/%s/revisions' % 'annakarenina'))
         revisions = res.json
         assert len(revisions) == 2, len(revisions)
 
@@ -532,7 +532,7 @@
         model.repo.commit_and_remove()
 
         # check new revision is there
-        res = self.app.get(self.offset('/rest/package/%s/revisions' % 'annakarenina'))
+        res = self.app.get(self.offset('/rest/dataset/%s/revisions' % 'annakarenina'))
         revisions = res.json
         assert len(revisions) == 3, len(revisions)
 


--- a/ckan/tests/functional/api/test_package_search.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/tests/functional/api/test_package_search.py	Mon Sep 05 18:49:32 2011 +0100
@@ -27,7 +27,7 @@
                        'geographic_coverage':'England, Wales'},
         }
         CreateTestData.create_arbitrary(self.package_fixture_data)
-        self.base_url = self.offset('/search/package')
+        self.base_url = self.offset('/search/dataset')
 
     @classmethod
     def teardown_class(cls):


--- a/ckan/tests/functional/test_authz.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/tests/functional/test_authz.py	Mon Sep 05 18:49:32 2011 +0100
@@ -13,8 +13,8 @@
 
 class AuthzTestBase(object):
     INTERFACES = ['wui', 'rest']
-    DEFAULT_ENTITY_TYPES = ['package', 'group']
-    ENTITY_CLASS_MAP = {'package': model.Package,
+    DEFAULT_ENTITY_TYPES = ['dataset', 'group']
+    ENTITY_CLASS_MAP = {'dataset': model.Package,
                         'group': model.Group,
                         'package_relationship': model.PackageRelationship}
         
@@ -81,11 +81,13 @@
                                   'Should NOT be able to %s %s %r as user %r on %r interface. Diagnostics: %r'
                             raise Exception(msg % (action, entity_type, entity_name, user.name, interface, truncate(repr(diagnostics), 1000)))
 
-    def _test_via_wui(self, action, user, entity_name, entity='package'):
+    def _test_via_wui(self, action, user, entity_name, entity='dataset'):
         # Test action on WUI
         str_required_in_response = entity_name
+        controller_name = 'package' if entity == 'dataset' else entity
+
         if action in (model.Action.EDIT, model.Action.READ):
-            offset = url_for(controller=entity, action=action, id=unicode(entity_name))
+            offset = url_for(controller=controller_name, action=action, id=unicode(entity_name))
         elif action == 'search':
             offset = '/%s/search?q=%s' % (entity, entity_name)
             str_required_in_response = '/%s"' % entity_name
@@ -98,7 +100,7 @@
             offset = '/%s/new' % entity
             str_required_in_response = 'New'
         elif action == 'delete':
-            offset = url_for(controller=entity, action=model.Action.EDIT, id=unicode(entity_name))
+            offset = url_for(controller=controller_name, action=model.Action.EDIT, id=unicode(entity_name))
             str_required_in_response = 'state'
         else:
             raise NotImplementedError
@@ -114,7 +116,7 @@
         self.app.reset()
         return is_ok, [offset, user.name, tests, res.status, res.body]
 
-    def _test_via_api(self, action, user, entity_name, entity_type='package'):
+    def _test_via_api(self, action, user, entity_name, entity_type='dataset'):
         # Test action on REST
         str_required_in_response = entity_name
         if action == model.Action.EDIT:
@@ -159,11 +161,11 @@
             if action == 'edit':
                 func = self.app.put
             if isinstance(entity_name, basestring):
-                offset = '/api/rest/package/%s/relationships' % entity_name
+                offset = '/api/rest/dataset/%s/relationships' % entity_name
             else:
                 assert isinstance(entity_name, tuple)
                 if len(entity_name) == 1:
-                    offset = '/api/rest/package/%s/relationships' % entity_name[0]
+                    offset = '/api/rest/dataset/%s/relationships' % entity_name[0]
                 else:
                     if len(entity_name) == 2:
                         entity_properties = {'entity1': entity_name[0],
@@ -176,9 +178,9 @@
                     else:
                         raise NotImplementedError
                     if action in 'list':
-                        offset = '/api/rest/package/%(entity1)s/relationships/%(entity2)s' % entity_properties
+                        offset = '/api/rest/dataset/%(entity1)s/relationships/%(entity2)s' % entity_properties
                     else:
-                        offset = '/api/rest/package/%(entity1)s/%(type)s/%(entity2)s' % entity_properties
+                        offset = '/api/rest/dataset/%(entity1)s/%(type)s/%(entity2)s' % entity_properties
                     str_required_in_response = '"object": "%(entity2)s", "type": "%(type)s", "subject": "%(entity1)s"' % entity_properties
                 
         if user.name == 'visitor':
@@ -188,7 +190,6 @@
         res = func(offset, params=postparams,
                    extra_environ=environ,
                    expect_errors=True)
-        
         tests = {}
         tests['str_required (%s)' % str_required_in_response] = bool(str_required_in_response in res)
         tests['error string'] = bool('error' not in res)
@@ -331,7 +332,7 @@
         self._test_can('edit', self.visitor, [], interfaces=['rest'])
 
     def test_visitor_creates(self):
-        self._test_can('create', self.visitor, [], interfaces=['wui'], entity_types=['package'])
+        self._test_can('create', self.visitor, [], interfaces=['wui'], entity_types=['dataset'])
         self._test_cant('create', self.visitor, [], interfaces=['wui'], entity_types=['group']) # need to be sysadmin
         self._test_cant('create', self.visitor, [], interfaces=['rest'])
 
@@ -364,9 +365,9 @@
 
     def test_search_deleted(self):
         # can't search groups
-        self._test_can('search', self.pkggroupadmin, ['xx', 'rx', 'wx', 'rr', 'wr', 'ww', 'deleted'], entity_types=['package'])
-        self._test_can('search', self.mrloggedin, ['rx', 'wx', 'rr', 'wr', 'ww'], entity_types=['package'])
-        self._test_cant('search', self.mrloggedin, ['deleted', 'xx'], entity_types=['package'])
+        self._test_can('search', self.pkggroupadmin, ['xx', 'rx', 'wx', 'rr', 'wr', 'ww', 'deleted'], entity_types=['dataset'])
+        self._test_can('search', self.mrloggedin, ['rx', 'wx', 'rr', 'wr', 'ww'], entity_types=['dataset'])
+        self._test_cant('search', self.mrloggedin, ['deleted', 'xx'], entity_types=['dataset'])
         
     def test_05_author_is_new_package_admin(self):
         user = self.mrloggedin
@@ -375,8 +376,8 @@
         assert not model.Package.by_name(u'annakarenina')
         offset = url_for(controller='package', action='new')
         res = self.app.get(offset, extra_environ={'REMOTE_USER': user.name.encode('utf8')})
-        assert 'New - Data Packages' in res
-        fv = res.forms['package-edit']
+        assert 'New - Datasets' in res
+        fv = res.forms['dataset-edit']
         prefix = ''
         fv[prefix + 'name'] = u'annakarenina'
         res = fv.submit('save', extra_environ={'REMOTE_USER': user.name.encode('utf8')})
@@ -399,7 +400,7 @@
         self._test_can('create', self.testsysadmin, [])
 
     def test_sysadmin_can_search_anything(self):
-        self._test_can('search', self.testsysadmin, ['xx', 'rx', 'wx', 'rr', 'wr', 'ww', 'deleted'], entity_types=['package'])
+        self._test_can('search', self.testsysadmin, ['xx', 'rx', 'wx', 'rr', 'wr', 'ww', 'deleted'], entity_types=['dataset'])
                 
     def test_visitor_deletes(self):
         self._test_cant('delete', self.visitor, ['gets_filled'], interfaces=['wui'])
@@ -423,7 +424,7 @@
         self._test_can('purge', self.pkggroupadmin, ['gets_filled'], interfaces=['rest'])
 
     def test_sysadmin_purges(self):
-        self._test_can('purge', self.testsysadmin, ['gets_filled'], interfaces=['rest'], entity_types=['package'])
+        self._test_can('purge', self.testsysadmin, ['gets_filled'], interfaces=['rest'], entity_types=['dataset'])
     
     def test_sysadmin_relationships(self):
         opts = {'interfaces': ['rest'],
@@ -536,7 +537,7 @@
         self._test_can('edit', self.testsysadmin, 'deleted')
 
     def test_sysadmin_can_search_anything(self):
-        self._test_can('search', self.testsysadmin, self.ENTITY_NAME, entity_types=['package']) # cannot search groups
+        self._test_can('search', self.testsysadmin, self.ENTITY_NAME, entity_types=['dataset']) # cannot search groups
 
     def test_pkggroupadmin_read(self):
         # These don't make sense - there should be no difference between
@@ -554,14 +555,14 @@
 
     def test_pkggroupadmin_search(self):
         # can't search as not a site reader
-        self._test_cant('search', self.pkggroupadmin, self.ENTITY_NAME, entity_types=['package'])
+        self._test_cant('search', self.pkggroupadmin, self.ENTITY_NAME, entity_types=['dataset'])
 
     def test_site_reader(self):
-        self._test_can('search', self.site_reader, self.ENTITY_NAME, entity_types=['package']) # cannot search groups
+        self._test_can('search', self.site_reader, self.ENTITY_NAME, entity_types=['dataset']) # cannot search groups
         self._test_can('read', self.site_reader, self.ENTITY_NAME, entity_types=['tag'])
 
     def test_outcast_search(self):
-        self._test_cant('search', self.outcast, self.ENTITY_NAME, entity_types=['package']) # cannot search groups
+        self._test_cant('search', self.outcast, self.ENTITY_NAME, entity_types=['dataset']) # cannot search groups
         self._test_cant('read', self.outcast, self.ENTITY_NAME, entity_types=['tag'])
 
         


--- a/ckan/tests/functional/test_edit_authz.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/tests/functional/test_edit_authz.py	Mon Sep 05 18:49:32 2011 +0100
@@ -57,7 +57,7 @@
 
         model.repo.new_revision()
 
-        self.pkg = u'package'
+        self.pkg = u'dataset'
         pkg = model.Package(name=self.pkg)
         model.Session.add(pkg)
 


--- a/ckan/tests/functional/test_group.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/tests/functional/test_group.py	Mon Sep 05 18:49:32 2011 +0100
@@ -79,10 +79,10 @@
             assert 'Administrators' in res, res
             assert 'russianfan' in main_res, main_res
             assert name in res, res
-            assert 'There are 2 packages in this group' in self.strip_tags(main_res), main_res
+            assert 'There are 2 datasets in this group' in self.strip_tags(main_res), main_res
             pkg = model.Package.by_name(pkgname)
             res = res.click(pkg.title)
-            assert '%s - Data Packages' % pkg.title in res
+            assert '%s - Datasets' % pkg.title in res
 
     def test_read_plugin_hook(self):
         plugin = MockGroupControllerPlugin()
@@ -165,11 +165,11 @@
         assert group.title == newtitle, group
         assert group.description == newdesc, group
 
-        # now look at packages
+        # now look at datasets
         assert len(group.packages) == 3
 
     def test_3_edit_form_has_new_package(self):
-        # check for package in autocomplete
+        # check for dataset in autocomplete
         offset = url_for(controller='package', action='autocomplete', q='an')
         res = self.app.get(offset, status=200, extra_environ={'REMOTE_USER': 'russianfan'})
         assert 'annakarenina' in res, res


--- a/ckan/tests/functional/test_home.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/tests/functional/test_home.py	Mon Sep 05 18:49:32 2011 +0100
@@ -24,7 +24,7 @@
         offset = url_for('home')
         res = self.app.get(offset)
         print res
-        assert 'Add a package' in res
+        assert 'Add a dataset' in res
 
     def test_calculate_etag_hash(self):
         c.user = 'test user'


--- a/ckan/tests/functional/test_package.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/tests/functional/test_package.py	Mon Sep 05 18:49:32 2011 +0100
@@ -72,7 +72,7 @@
     '''Inherit this in tests for these form testing methods'''
     def _check_package_read(self, res, **params):
         assert not 'Error' in res, res
-        assert u'%s - Data Packages' % params['title'] in res, res
+        assert u'%s - Datasets' % params['title'] in res, res
         main_res = self.main_div(res)
         main_div = main_res
         main_div_str = main_div.encode('utf8')
@@ -80,7 +80,7 @@
         assert params['title'] in main_div, main_div_str
         assert params['version'] in main_div, main_div_str
         self.check_named_element(main_div, 'a', 'href="%s"' % params['url'])
-        prefix = 'Package-%s-' % params.get('id', '')
+        prefix = 'Dataset-%s-' % params.get('id', '')
         for res_index, values in self._get_resource_values(params['resources'], by_resource=True):
             self.check_named_element(main_div, 'tr', *values)
         assert params['notes'] in main_div, main_div_str
@@ -215,7 +215,7 @@
                        then assume redirect is specified in pylons config
         @param expected_redirect - url we expect to redirect to (but <NAME>
                        not yet substituted)
-        @param pkg_name_to_edit - '' means create a new package
+        @param pkg_name_to_edit - '' means create a new dataset
         '''
         try:
             new_name = u'new-name'
@@ -234,13 +234,13 @@
                 offset_params['return_to'] = return_url_param
             offset = url_for(**offset_params)
             res = self.app.get(offset)
-            assert 'Packages -' in res
-            fv = res.forms['package-edit']
+            assert 'Datasets -' in res
+            fv = res.forms['dataset-edit']
             prefix = ''
             fv[prefix + 'name'] = new_name
             res = fv.submit('preview')
             assert not 'Error' in res, res
-            fv = res.forms['package-edit']
+            fv = res.forms['dataset-edit']
             res = fv.submit('save', status=302)
             assert not 'Error' in res, res
             redirected_to = dict(res.headers).get('Location') or dict(res.headers)['location']
@@ -276,7 +276,7 @@
         offset = url_for(controller='package', action='search')
         res = self.app.get(offset)
         res = res.click('Register it now')
-        assert 'New - Data Packages' in res
+        assert 'New - Datasets' in res
 
     def test_read(self):
         name = u'annakarenina'
@@ -288,8 +288,8 @@
         offset = url_for(controller='package', action='read', id=self.anna.id)
         res_by_id = self.app.get(offset)
         # just check the stuff in the package div
-        pkg_by_name_main = self.named_div('package', res)
-        pkg_by_id_main = self.named_div('package', res_by_id)
+        pkg_by_name_main = self.named_div('dataset', res)
+        pkg_by_id_main = self.named_div('dataset', res_by_id)
         # rename some things which may be in the wrong order sometimes
         txt_order_non_deterministic = ('russian', 'tolstoy', 'david', 'roger')
         for txt in txt_order_non_deterministic:
@@ -351,12 +351,12 @@
         assert 'decoy"' not in res, res
 
         #res = self.app.get(offset)
-        #assert 'Packages' in res
+        #assert 'Datasets' in res
         #name = u'annakarenina'
         #title = u'A Novel By Tolstoy'
         #assert title in res
         #res = res.click(title)
-        #assert '%s - Data Packages' % title in res, res
+        #assert '%s - Datasets' % title in res, res
         #main_div = self.main_div(res)
         #assert title in main_div, main_div.encode('utf8')
 
@@ -391,7 +391,7 @@
         assert '<strong>0</strong>' in results_page, results_page
 
     def _check_search_results(self, page, terms, requireds, only_open=False, only_downloadable=False):
-        form = page.forms['package-search']
+        form = page.forms['dataset-search']
         form['q'] = terms.encode('utf8') # paste doesn't handle this!
         form['open_only'] = only_open
         form['downloadable_only'] = only_downloadable
@@ -433,7 +433,7 @@
         cls.today = datetime.datetime.now()
         cls.pkg_name = u'testpkg'
         
-        # create package
+        # create dataset
         rev = model.repo.new_revision()
         rev.timestamp = cls.date1
         pkg = model.Package(name=cls.pkg_name, title=u'title1')
@@ -441,7 +441,7 @@
         model.setup_default_user_roles(pkg)
         model.repo.commit_and_remove()
 
-        # edit package
+        # edit dataset
         rev = model.repo.new_revision()
         rev.timestamp = cls.date2
         pkg = model.Package.by_name(cls.pkg_name)
@@ -450,7 +450,7 @@
         pkg.extras = {'key2': u'value2'}
         model.repo.commit_and_remove()
 
-        # edit package again
+        # edit dataset again
         rev = model.repo.new_revision()
         rev.timestamp = cls.date3
         pkg = model.Package.by_name(cls.pkg_name)
@@ -472,7 +472,7 @@
 
     def test_read_normally(self):
         res = self.app.get(self.offset, status=200)
-        pkg_html = self.named_div('package', res)
+        pkg_html = self.named_div('dataset', res)
         side_html = self.named_div('sidebar', res)
         print 'PKG', pkg_html
         assert 'title3' in res
@@ -485,7 +485,7 @@
     def test_read_date1(self):
         offset = self.offset + self.date1.strftime('@%Y-%m-%d')
         res = self.app.get(offset, status=200)
-        pkg_html = self.named_div('package', res)
+        pkg_html = self.named_div('dataset', res)
         side_html = self.named_div('sidebar', res)
         assert 'title1' in res, res
         assert 'key2' not in pkg_html, pkg_html
@@ -497,7 +497,7 @@
         date2_plus_3h = self.date2 + datetime.timedelta(hours=3)
         offset = self.offset + date2_plus_3h.strftime('@%Y-%m-%d')
         res = self.app.get(offset, status=200)
-        pkg_html = self.named_div('package', res)
+        pkg_html = self.named_div('dataset', res)
         side_html = self.named_div('sidebar', res)
         print 'PKG', pkg_html
         assert 'title2' in res
@@ -510,7 +510,7 @@
     def test_read_date3(self):
         offset = self.offset + self.date3.strftime('@%Y-%m-%d-%H-%M')
         res = self.app.get(offset, status=200)
-        pkg_html = self.named_div('package', res)
+        pkg_html = self.named_div('dataset', res)
         side_html = self.named_div('sidebar', res)
         print 'PKG', pkg_html
         assert 'title3' in res
@@ -536,12 +536,12 @@
         offset = self.offset + '@%s' % self.revision_ids[0]
         res = self.app.get(offset, status=200)
         main_html = self.main_div(res)
-        pkg_html = self.named_div('package', res)
+        pkg_html = self.named_div('dataset', res)
         side_html = self.named_div('sidebar', res)
         print 'MAIN', main_html
-        assert 'This is an old revision of this package' in main_html
+        assert 'This is an old revision of this dataset' in main_html
         assert 'at 2011-01-01 00:00' in main_html
-        self.check_named_element(main_html, 'a', 'href="/package/%s"' % self.pkg_name)
+        self.check_named_element(main_html, 'a', 'href="/dataset/%s"' % self.pkg_name)
         print 'PKG', pkg_html
         assert 'title1' in res
         assert 'key2' not in pkg_html
@@ -554,12 +554,12 @@
         offset = self.offset + '@%s' % self.revision_ids[1]
         res = self.app.get(offset, status=200)
         main_html = self.main_div(res)
-        pkg_html = self.named_div('package', res)
+        pkg_html = self.named_div('dataset', res)
         side_html = self.named_div('sidebar', res)
         print 'MAIN', main_html
-        assert 'This is an old revision of this package' in main_html
+        assert 'This is an old revision of this dataset' in main_html
         assert 'at 2011-01-02 00:00' in main_html
-        self.check_named_element(main_html, 'a', 'href="/package/%s"' % self.pkg_name)
+        self.check_named_element(main_html, 'a', 'href="/dataset/%s"' % self.pkg_name)
         print 'PKG', pkg_html
         assert 'title2' in res
         assert 'key2' in pkg_html
@@ -572,13 +572,13 @@
         offset = self.offset + '@%s' % self.revision_ids[2]
         res = self.app.get(offset, status=200)
         main_html = self.main_div(res)
-        pkg_html = self.named_div('package', res)
+        pkg_html = self.named_div('dataset', res)
         side_html = self.named_div('sidebar', res)
         print 'MAIN', main_html
-        assert 'This is an old revision of this package' not in main_html
-        assert 'This is the current revision of this package' in main_html
+        assert 'This is an old revision of this dataset' not in main_html
+        assert 'This is the current revision of this dataset' in main_html
         assert 'at 2011-01-03 00:00' in main_html
-        self.check_named_element(main_html, 'a', 'href="/package/%s"' % self.pkg_name)
+        self.check_named_element(main_html, 'a', 'href="/dataset/%s"' % self.pkg_name)
         print 'PKG', pkg_html
         assert 'title3' in res
         assert 'key2' in pkg_html
@@ -637,10 +637,10 @@
         # just the absolute basics
         try:
             self.res = self.app.get(self.offset)
-            assert 'Edit - Data Packages' in self.res, self.res
+            assert 'Edit - Datasets' in self.res, self.res
             new_name = u'new-name'
             new_title = u'New Title'
-            fv = self.res.forms['package-edit']
+            fv = self.res.forms['dataset-edit']
             prefix = ''
             fv[prefix + 'name'] = new_name
             fv[prefix + 'title'] = new_title
@@ -649,7 +649,7 @@
             res = res.follow()
             offset = url_for(controller='package', action='read', id=new_name)
             res = self.app.get(offset)
-            assert '%s - Data Packages' % new_title in res, res
+            assert '%s - Datasets' % new_title in res, res
             pkg = model.Package.by_name(new_name)
             assert pkg
             assert pkg.title == new_title
@@ -660,16 +660,16 @@
         # just the key fields
         try:
             self.res = self.app.get(self.offset)
-            assert 'Edit - Data Packages' in self.res, self.res
+            assert 'Edit - Datasets' in self.res, self.res
             assert self.editpkg.notes in self.res
 
             new_name = u'new-name'
-            new_title = u'A Short Description of this Package'
+            new_title = u'A Short Description of this Dataset'
             newurl = u'http://www.editpkgnewurl.com'
             new_download_url = newurl + u'/download/'
             newlicense_id = u'cc-by'
             newversion = u'0.9b'
-            fv = self.res.forms['package-edit']
+            fv = self.res.forms['dataset-edit']
             prefix = ''
             fv[prefix + 'name'] = new_name
             fv[prefix + 'title'] =  new_title
@@ -683,7 +683,7 @@
             model.Session.remove()
             offset = url_for(controller='package', action='read', id=new_name)
             res = self.app.get(offset)
-            assert '%s - Data Packages' % new_title in res, res
+            assert '%s - Datasets' % new_title in res, res
             pkg = model.Package.by_name(new_name)
             assert pkg.title == new_title 
             assert pkg.url == newurl
@@ -699,11 +699,11 @@
             offset = url_for(controller='package', action='edit', id=pkg.id)
             res = self.app.get(offset)
             #assert res.body == self.res.body, self.diff_responses(res, self.res)
-            assert 'Edit - Data Packages' in res, res
+            assert 'Edit - Datasets' in res, res
             assert pkg.name in res
             new_name = u'new-name'
-            new_title = u'A Short Description of this Package'
-            fv = self.res.forms['package-edit']
+            new_title = u'A Short Description of this Dataset'
+            fv = self.res.forms['dataset-edit']
             prefix = ''
             fv[prefix + 'name'] = new_name
             fv[prefix + 'title'] =  new_title
@@ -712,7 +712,7 @@
             res = res.follow()
             offset = url_for(controller='package', action='read', id=new_name)
             res = self.app.get(offset)
-            assert '%s - Data Packages' % new_title in res, res
+            assert '%s - Datasets' % new_title in res, res
             pkg = model.Package.by_name(new_name)
             assert pkg
         finally:
@@ -720,8 +720,8 @@
 
     def test_edit_2_not_groups(self):
         # not allowed to edit groups for now
-        prefix = 'Package-%s-' % self.pkgid
-        fv = self.res.forms['package-edit']
+        prefix = 'Dataset-%s-' % self.pkgid
+        fv = self.res.forms['dataset-edit']
         assert not fv.fields.has_key(prefix + 'groups')
         
     def test_edit_2_tags_and_groups(self):
@@ -729,7 +729,7 @@
         newtagnames = [u'russian', u'tolstoy', u'superb']
         newtags = newtagnames
         tagvalues = ' '.join(newtags)
-        fv = self.res.forms['package-edit']
+        fv = self.res.forms['dataset-edit']
         prefix = ''
         fv[prefix + 'tag_string'] = tagvalues
         exp_log_message = 'test_edit_2: making some changes'
@@ -737,7 +737,7 @@
         res = fv.submit('save')
         # get redirected ...
         res = res.follow()
-        assert '%s - Data Packages' % self.editpkg_name in res
+        assert '%s - Datasets' % self.editpkg_name in res
         pkg = model.Package.by_name(self.editpkg.name)
         assert len(pkg.tags) == len(newtagnames)
         outtags = [ tag.name for tag in pkg.tags ]
@@ -759,12 +759,12 @@
 u with umlaut \xc3\xbc
 
 '''
-        fv = self.res.forms['package-edit']
+        fv = self.res.forms['dataset-edit']
         prefix = ''
         fv[prefix + 'url'] =  newurl
         fv[prefix + 'notes'] =  newnotes
         res = fv.submit('preview')
-        assert 'Edit - Data Packages' in res
+        assert 'Edit - Datasets' in res
         assert 'Preview' in res
         assert 'Hello world' in res
         self.check_tag_and_data(res, 'umlaut', u'\xfc')
@@ -773,19 +773,19 @@
     def test_missing_fields(self):
         # User edits and a field is left out in the commit parameters.
         # (Spammers can cause this)
-        fv = self.res.forms['package-edit']
+        fv = self.res.forms['dataset-edit']
         del fv.fields['log_message']
         res = fv.submit('save', status=400)
 
-        fv = self.res.forms['package-edit']
+        fv = self.res.forms['dataset-edit']
         prefix = ''
         del fv.fields[prefix + 'license_id']
         res = fv.submit('save', status=400)
 
     def test_redirect_after_edit_using_param(self):
-        return_url = 'http://random.site.com/package/<NAME>?test=param'
+        return_url = 'http://random.site.com/dataset/<NAME>?test=param'
         # It's useful to know that this url encodes to:
-        # 'http%3A%2F%2Frandom.site.com%2Fpackage%2F%3CNAME%3E%3Ftest%3Dparam'
+        # 'http%3A%2F%2Frandom.site.com%2Fdataset%2F%3CNAME%3E%3Ftest%3Dparam'
         expected_redirect = return_url
         self._check_redirect(return_url, expected_redirect,
                              pkg_name_to_edit=self.editpkg_name)
@@ -832,7 +832,7 @@
             # Edit it
             offset = url_for(controller='package', action='edit', id=pkg.name)
             res = self.app.get(offset, status=200, extra_environ={'REMOTE_USER':'testadmin'})
-            assert 'Edit - Data Packages' in res, res
+            assert 'Edit - Datasets' in res, res
 
             # Check form is correctly filled
             pkg = model.Package.by_name(pkg_name)
@@ -856,7 +856,7 @@
             extra_new = 'newkey', 'newvalue', False
             log_message = 'This is a comment'
             assert not model.Package.by_name(name)
-            fv = res.forms['package-edit']
+            fv = res.forms['dataset-edit']
             prefix = ''
             fv[prefix+'name'] = name
             fv[prefix+'title'] = title
@@ -903,13 +903,13 @@
                                              state=state)
 
             # Submit
-            fv = res.forms['package-edit']
+            fv = res.forms['dataset-edit']
             res = fv.submit('save', extra_environ={'REMOTE_USER':'testadmin'})
 
-            # Check package page
+            # Check dataset page
             assert not 'Error' in res, res
 
-            # Check package object
+            # Check dataset object
             pkg = model.Package.by_name(name)
             assert pkg.name == name
             assert pkg.title == title
@@ -936,14 +936,14 @@
             assert rev.author == 'testadmin', rev.author
             assert rev.message == log_message
             # TODO: reinstate once fixed in code
-            exp_log_message = u'Creating package %s' % name
+            exp_log_message = u'Creating dataset %s' % name
             #assert rev.message == exp_log_message
         finally:
             self._reset_data()
 
 
     def test_edit_bad_log_message(self):
-        fv = self.res.forms['package-edit']
+        fv = self.res.forms['dataset-edit']
         prefix = ''
         fv['log_message'] = u'Free enlargements: http://drugs.com/' # spam
         res = fv.submit('preview')
@@ -957,7 +957,7 @@
         assert 'No links are allowed' in res, res
 
     def test_edit_bad_name(self):
-        fv = self.res.forms['package-edit']
+        fv = self.res.forms['dataset-edit']
         prefix = ''
         fv[prefix + 'name'] = u'a' # invalid name
         res = fv.submit('preview')
@@ -981,7 +981,7 @@
             res = self.app.get(self.offset)
             new_name = u'new-name'
             new_title = u'New Title'
-            fv = res.forms['package-edit']
+            fv = res.forms['dataset-edit']
             prefix = ''
             fv[prefix + 'name'] = new_name
             fv[prefix + 'title'] = new_title
@@ -1000,7 +1000,7 @@
             offset = url_for(controller='package', action='edit', id=pkg.name)
             res = self.app.get(offset)
             prefix = ''
-            fv = res.forms['package-edit']
+            fv = res.forms['dataset-edit']
             name = prefix + 'groups__0__id'
             # XXX the following assertion fails since upgrade to
             # sqlalchemy 0.6.5; apparently outer joins are handled
@@ -1027,7 +1027,7 @@
             prefix = ''
             field_name = prefix + "groups__0__id"
             assert field_name in res
-            fv = res.forms['package-edit']
+            fv = res.forms['dataset-edit']
             fv[prefix + 'groups__0__id'] = grp.id
             res = fv.submit('preview', extra_environ={'REMOTE_USER':'russianfan'})
             assert not 'error' in res
@@ -1053,7 +1053,7 @@
             res = self.app.get(offset, extra_environ={'REMOTE_USER':'russianfan'})
             prefix = ''
             field_name = prefix + "groups__0__id"
-            fv = res.forms['package-edit']
+            fv = res.forms['dataset-edit']
             print field_name
             fv[field_name] = False
             res = fv.submit('save', extra_environ={'REMOTE_USER':'russianfan'})
@@ -1084,17 +1084,17 @@
         offset = url_for(controller='package', action='new',
                 url='http://xxx.org', name='xxx.org')
         res = self.app.get(offset)
-        form = res.forms['package-edit']
+        form = res.forms['dataset-edit']
         assert_equal(form['url'].value, 'http://xxx.org')
         assert_equal(form['name'].value, 'xxx.org')
 
     def test_new_without_resource(self):
-        # new package
+        # new dataset
         prefix = ''
         name = u'test_no_res'
         offset = url_for(controller='package', action='new')
         res = self.app.get(offset)
-        fv = res.forms['package-edit']
+        fv = res.forms['dataset-edit']
         fv[prefix+'name'] = name
         res = fv.submit('preview')
         assert not 'Error' in res, res
@@ -1104,11 +1104,11 @@
         assert '<td><a href="">' not in res1, res1
 
         # submit
-        fv = res.forms['package-edit']
+        fv = res.forms['dataset-edit']
         self.pkg_names.append(name)
         res = fv.submit('save')
 
-        # check package page
+        # check dataset page
         assert not 'Error' in res, res
         res = res.follow()
         res1 = self.main_div(res).replace('</strong>', '')
@@ -1124,8 +1124,8 @@
         assert not model.Package.by_name(u'annakarenina')
         offset = url_for(controller='package', action='new')
         res = self.app.get(offset)
-        assert 'New - Data Packages' in res
-        fv = res.forms['package-edit']
+        assert 'New - Datasets' in res
+        fv = res.forms['dataset-edit']
         prefix = ''
         fv[prefix + 'name'] = 'annakarenina'
         self.pkg_names.append('annakarenina')
@@ -1135,8 +1135,8 @@
     def test_new_bad_name(self):
         offset = url_for(controller='package', action='new', id=None)
         res = self.app.get(offset)
-        assert 'New - Data Packages' in res
-        fv = res.forms['package-edit']
+        assert 'New - Datasets' in res
+        fv = res.forms['dataset-edit']
         prefix = ''
         fv[prefix + 'name'] = u'a' # invalid name
         res = fv.submit('preview')
@@ -1151,9 +1151,9 @@
         self._assert_form_errors(res)
 
     def test_redirect_after_new_using_param(self):
-        return_url = 'http://random.site.com/package/<NAME>?test=param'
+        return_url = 'http://random.site.com/dataset/<NAME>?test=param'
         # It's useful to know that this url encodes to:
-        # 'http%3A%2F%2Frandom.site.com%2Fpackage%2F%3CNAME%3E%3Ftest%3Dparam'
+        # 'http%3A%2F%2Frandom.site.com%2Fdataset%2F%3CNAME%3E%3Ftest%3Dparam'
         expected_redirect = return_url
         self._check_redirect(return_url, expected_redirect,
                              pkg_name_to_edit='')
@@ -1179,8 +1179,8 @@
         assert not model.Package.by_name(name)
         offset = url_for(controller='package', action='new')
         res = self.app.get(offset)
-        assert 'New - Data Packages' in res
-        fv = res.forms['package-edit']
+        assert 'New - Datasets' in res
+        fv = res.forms['dataset-edit']
         prefix = ''
         fv[prefix+'name'] = name
         fv[prefix+'title'] = title
@@ -1222,14 +1222,14 @@
                                          log_message=log_message,
                                          )
         # Submit
-        fv = res.forms['package-edit']
+        fv = res.forms['dataset-edit']
         self.pkg_names.append(name)
         res = fv.submit('save')
 
-        # Check package page
+        # Check dataset page
         assert not 'Error' in res, res
 
-        # Check package object
+        # Check dataset object
         pkg = model.Package.by_name(name)
         assert pkg.name == name
         assert pkg.title == title
@@ -1253,37 +1253,37 @@
         assert rev.author == 'Unknown IP Address'
         assert rev.message == log_message
         # TODO: reinstate once fixed in code
-        exp_log_message = u'Creating package %s' % name
+        exp_log_message = u'Creating dataset %s' % name
         # assert rev.message == exp_log_message
 
     def test_new_existing_name(self):
-        # test creating a package with an existing name results in error'
-        # create initial package
+        # test creating a dataset with an existing name results in error'
+        # create initial dataset
         pkgname = u'testpkg'
         pkgtitle = u'mytesttitle'
         assert not model.Package.by_name(pkgname)
         offset = url_for(controller='package', action='new', id=None)
         res = self.app.get(offset)
-        assert 'New - Data Packages' in res
-        fv = res.forms['package-edit']
+        assert 'New - Datasets' in res
+        fv = res.forms['dataset-edit']
         prefix = ''
         fv[prefix + 'name'] = pkgname
         self.pkg_names.append(pkgname)
         res = fv.submit('save')
         assert not 'Error' in res, res
         assert model.Package.by_name(pkgname)
-        # create duplicate package
+        # create duplicate dataset
         res = self.app.get(offset)
-        assert 'New - Data Packages' in res
-        fv = res.forms['package-edit']
+        assert 'New - Datasets' in res
+        fv = res.forms['dataset-edit']
         fv[prefix+'name'] = pkgname
         fv[prefix+'title'] = pkgtitle
         res = fv.submit('preview')
         assert 'Preview' in res
-        fv = res.forms['package-edit']
+        fv = res.forms['dataset-edit']
         res = fv.submit('save')
         assert 'Error' in res, res
-        assert 'Package name already exists in database' in res, res
+        assert 'Dataset name already exists in database' in res, res
         self._assert_form_errors(res)
         
     def test_missing_fields(self):
@@ -1291,9 +1291,9 @@
         # (Spammers can cause this)
         offset = url_for(controller='package', action='new')
         res = self.app.get(offset)
-        assert 'New - Data Packages' in res, res
+        assert 'New - Datasets' in res, res
         prefix = ''
-        fv = res.forms['package-edit']
+        fv = res.forms['dataset-edit']
         fv[prefix + 'name'] = 'anything'
         del fv.fields['log_message']
         self.pkg_names.append('anything')
@@ -1301,8 +1301,8 @@
 
         offset = url_for(controller='package', action='new')
         res = self.app.get(offset)
-        assert 'New - Data Packages' in res
-        fv = res.forms['package-edit']
+        assert 'New - Datasets' in res
+        fv = res.forms['dataset-edit']
         fv[prefix + 'name'] = 'anything'
         prefix = ''
         del fv.fields[prefix + 'notes']
@@ -1315,8 +1315,8 @@
         # ticket:276
         offset = url_for(controller='package', action='new')
         res = self.app.get(offset)
-        assert 'New - Data Packages' in res
-        fv = res.forms['package-edit']
+        assert 'New - Datasets' in res
+        fv = res.forms['dataset-edit']
         prefix = ''
         fv[prefix + 'name'] = 'name276'
         resformat = u'xls'    
@@ -1333,7 +1333,7 @@
         offset = url_for(controller='package', action='new')
         res = self.app.get(offset)
         new_name = u'plugged'
-        fv = res.forms['package-edit']
+        fv = res.forms['dataset-edit']
         prefix = ''
         fv[prefix + 'name'] = new_name
         res = fv.submit('save')
@@ -1361,8 +1361,8 @@
         
         offset = url_for(controller='package', action='new')
         res = self.app.get(offset)
-        assert 'New - Data Packages' in res
-        fv = res.forms['package-edit']
+        assert 'New - Datasets' in res
+        fv = res.forms['dataset-edit']
         prefix = ''
         fv[prefix + 'name'] = self.pkgname
         fv[prefix + 'title'] = self.pkgtitle
@@ -1418,11 +1418,11 @@
         offset = url_for(controller='package', action='search')
         res = self.app.get(offset)
         assert 'Search - ' in res
-        form = res.forms['package-search']
+        form = res.forms['dataset-search']
         form['q'] =  str(self.non_active_name)
         results_page = form.submit()
         assert 'Search - ' in results_page, results_page
-        assert '<strong>0</strong> packages found' in results_page, (self.non_active_name, results_page)
+        assert '<strong>0</strong> datasets found' in results_page, (self.non_active_name, results_page)
 
 
 class TestRevisions(TestPackageBase):
@@ -1472,7 +1472,7 @@
 
     def test_1_do_diff(self):
         res = self.app.get(self.offset)
-        form = res.forms['package-revisions']
+        form = res.forms['dataset-revisions']
         res = form.submit()
         res = res.follow()
         main_res = self.main_div(res)
@@ -1499,7 +1499,7 @@
         url = str(self.revision_timestamps[1])[-6:]
         res = res.click(href=url)
         main_html = self.main_div(res)
-        assert 'This is an old revision of this package' in main_html
+        assert 'This is an old revision of this dataset' in main_html
         assert 'at %s' % str(self.revision_timestamps[1])[:6] in main_html
 
    
@@ -1625,7 +1625,7 @@
     def test_etags_in_response(self):
         c.user = 'annafan'
         c.userobj = model.User.by_name(u'annafan')
-        res = self.app.get('/package/annakarenina',
+        res = self.app.get('/dataset/annakarenina',
                            extra_environ={'REMOTE_USER':c.user})
         anna_hash = str(PackageController._pkg_cache_key(self.anna))
         self.assert_equal(res.header_dict['ETag'], anna_hash)
@@ -1642,7 +1642,7 @@
 
     def test_package_autocomplete(self):
         query = 'a'
-        res = self.app.get('/package/autocomplete?q=%s' % query)
+        res = self.app.get('/dataset/autocomplete?q=%s' % query)
         
         expected = ['A Wonderful Story (warandpeace)|warandpeace','annakarenina|annakarenina']
         received = sorted(res.body.split('\n'))


--- a/ckan/tests/functional/test_package_relationships.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/tests/functional/test_package_relationships.py	Mon Sep 05 18:49:32 2011 +0100
@@ -18,11 +18,11 @@
             offset = url_for(controller='package', action='read', id=pkg_name)
             res = self.app.get(offset)
             pkg = model.Package.by_name(pkg_name)
-            assert '%s - Data Packages' % pkg.title in res
+            assert '%s - Datasets' % pkg.title in res
             return res
         res = read_package(u'homer')
         self.check_named_element(res, 'li', 'is a child of', 'abraham')
-        self.check_named_element(res, 'li', 'is a child of', '<a href="/package/abraham">abraham</a>')
+        self.check_named_element(res, 'li', 'is a child of', '<a href="/dataset/abraham">abraham</a>')
         self.check_named_element(res, 'li', 'is a parent of', 'bart')
         self.check_named_element(res, 'li', 'is a parent of', 'lisa')
         self.check_named_element(res, 'li', 'has derivation', 'homer_derived')


--- a/ckan/tests/functional/test_revision.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/tests/functional/test_revision.py	Mon Sep 05 18:49:32 2011 +0100
@@ -146,10 +146,10 @@
         #assert 'Author:</strong> tester' in res
         #assert 'Log Message:' in res
         #assert 'Creating test data.' in res
-        #assert 'Package: annakarenina' in res
-        #assert "Packages' Tags" in res
+        #assert 'Dataset: annakarenina' in res
+        #assert "Datasets' Tags" in res
         #res = res.click('annakarenina', index=0)
-        #assert 'Packages - annakarenina' in res
+        #assert 'Datasets - annakarenina' in res
         
     def test_list_format_atom(self):
         self.create_40_revisions()


--- a/ckan/tests/functional/test_user.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/tests/functional/test_user.py	Mon Sep 05 18:49:32 2011 +0100
@@ -55,7 +55,7 @@
                                  'rel="nofollow"')
         assert 'Edit' not in main_res, main_res
         assert 'Number of edits:</strong> 3' in res, res
-        assert 'Number of packages administered:</strong> 1' in res, res
+        assert 'Number of datasets administered:</strong> 1' in res, res
         assert 'Revision History' in res, res
 
     def test_user_read_without_id(self):


--- a/ckan/tests/lib/test_dictization_schema.py	Mon Sep 05 18:22:04 2011 +0100
+++ b/ckan/tests/lib/test_dictization_schema.py	Mon Sep 05 18:49:32 2011 +0100
@@ -102,7 +102,7 @@
         converted_data, errors = validate(data, default_package_schema(), context)
 
         assert errors == {
-            'name': [u'Package name already exists in database'],
+            'name': [u'Dataset name already exists in database'],
             'resources': [{},
                           {'url': [u'Missing value']}]
         }, pformat(errors)
@@ -156,5 +156,5 @@
         data["packages"][1].pop("name")
 
         converted_data, errors = validate(data, default_group_schema(), context)
-        assert errors ==  {'packages': [{'id': [u'Package was not found.']}, {'id': [u'Missing value']}]} , pformat(errors)
+        assert errors ==  {'packages': [{'id': [u'Dataset was not found.']}, {'id': [u'Missing value']}]} , pformat(errors)
 


--- a/doc/api.rst	Mon Sep 05 18:22:04 2011 +0100
+++ b/doc/api.rst	Mon Sep 05 18:49:32 2011 +0100
@@ -53,7 +53,7 @@
 
 These are very similar, but when the API returns a reference to an object, Version 1 API will return the Name of the object (e.g. "river-pollution") and Version 2 API will return the ID of the object (e.g. "a3dd8f64-9078-4f04-845c-e3f047125028").
 
-The reason for this is that Names can change, so to reliably refer to the same package every time, you will want to use the ID and therefore use API v2. Alternatively, many people prefer to deal with Names, so API v1 suits them.
+The reason for this is that Names can change, so to reliably refer to the same dataset every time, you will want to use the ID and therefore use API v2. Alternatively, many people prefer to deal with Names, so API v1 suits them.
 
 When making requests, you can call objects by either their Name or ID, interchangeably.
 
@@ -121,9 +121,9 @@
 +--------------------------------+-------------------------------------------------------------------+
 | Model Resource                 | Location                                                          |
 +================================+===================================================================+
-| Package Register               | ``/rest/package``                                                 |
+| Dataset Register               | ``/rest/dataset``                                                 |
 +--------------------------------+-------------------------------------------------------------------+
-| Package Entity                 | ``/rest/package/PACKAGE-REF``                                     |
+| Dataset Entity                 | ``/rest/dataset/DATASET-REF``                                     |
 +--------------------------------+-------------------------------------------------------------------+
 | Group Register                 | ``/rest/group``                                                   |
 +--------------------------------+-------------------------------------------------------------------+
@@ -135,15 +135,15 @@
 +--------------------------------+-------------------------------------------------------------------+
 | Rating Register                | ``/rest/rating``                                                  |
 +--------------------------------+-------------------------------------------------------------------+
-| Package Relationships Register | ``/rest/package/PACKAGE-REF/relationships``                       |
+| Dataset Relationships Register | ``/rest/dataset/DATASET-REF/relationships``                       |
 +--------------------------------+-------------------------------------------------------------------+
-| Package Relationships Register | ``/rest/package/PACKAGE-REF/RELATIONSHIP-TYPE``                   |
+| Dataset Relationships Register | ``/rest/dataset/DATASET-REF/RELATIONSHIP-TYPE``                   |
 +--------------------------------+-------------------------------------------------------------------+
-| Package Relationships Register | ``/rest/package/PACKAGE-REF/relationships/PACKAGE-REF``           |
+| Dataset Relationships Register | ``/rest/dataset/DATASET-REF/relationships/DATASET-REF``           |
 +--------------------------------+-------------------------------------------------------------------+
-| Package Relationship Entity    | ``/rest/package/PACKAGE-REF/RELATIONSHIP-TYPE/PACKAGE-REF``       |
+| Dataset Relationship Entity    | ``/rest/dataset/DATASET-REF/RELATIONSHIP-TYPE/DATASET-REF``       |
 +--------------------------------+-------------------------------------------------------------------+
-| Package\'s Revisions Entity    | ``/rest/package/PACKAGE-REF/revisions``                           |
+| Dataset\'s Revisions Entity    | ``/rest/dataset/DATASET-REF/revisions``                           |
 +--------------------------------+-------------------------------------------------------------------+
 | Revision Register              | ``/rest/revision``                                                |
 +--------------------------------+-------------------------------------------------------------------+
@@ -152,7 +152,7 @@
 | License List                   | ``/rest/licenses``                                                |
 +--------------------------------+-------------------------------------------------------------------+
 
-Possible values for PACKAGE-REF are the package id, or the current package name.
+Possible values for DATASET-REF are the dataset id, or the current dataset name.
 
 Possible values for RELATIONSHIP-TYPE are described in the Relationship-Type data format.
 
@@ -165,13 +165,13 @@
 +-------------------------------+--------+------------------+-------------------+
 | Resource                      | Method | Request          | Response          |
 +===============================+========+==================+===================+ 
-| Package Register              | GET    |                  | Package-List      |
+| Dataset Register              | GET    |                  | Dataset-List      |
 +-------------------------------+--------+------------------+-------------------+
-| Package Register              | POST   | Package          |                   |
+| Dataset Register              | POST   | Dataset          |                   |
 +-------------------------------+--------+------------------+-------------------+
-| Package Entity                | GET    |                  | Package           |
+| Dataset Entity                | GET    |                  | Dataset           |
 +-------------------------------+--------+------------------+-------------------+
-| Package Entity                | PUT    | Package          |                   |
+| Dataset Entity                | PUT    | Dataset          |                   |
 +-------------------------------+--------+------------------+-------------------+
 | Group Register                | GET    |                  | Group-List        |
 +-------------------------------+--------+------------------+-------------------+
@@ -183,19 +183,19 @@
 +-------------------------------+--------+------------------+-------------------+
 | Tag Register                  | GET    |                  | Tag-List          | 
 +-------------------------------+--------+------------------+-------------------+
-| Tag Entity                    | GET    |                  | Package-List      |
+| Tag Entity                    | GET    |                  | Dataset-List      |
 +-------------------------------+--------+------------------+-------------------+
 | Rating Register               | POST   | Rating           |                   |
 +-------------------------------+--------+------------------+-------------------+
 | Rating Entity                 | GET    |                  | Rating            |
 +-------------------------------+--------+------------------+-------------------+
-| Package Relationships Register| GET    |                  | Pkg-Relationships |
+| Dataset Relationships Register| GET    |                  | Pkg-Relationships |
 +-------------------------------+--------+------------------+-------------------+
-| Package Relationship Entity   | GET    |                  | Pkg-Relationship  |
+| Dataset Relationship Entity   | GET    |                  | Pkg-Relationship  |
 +-------------------------------+--------+------------------+-------------------+
-| Package Relationship Entity   | PUT    | Pkg-Relationship |                   |
+| Dataset Relationship Entity   | PUT    | Pkg-Relationship |                   |
 +-------------------------------+--------+------------------+-------------------+
-| Package\'s Revisions Entity   | GET    |                  | Pkg-Revisions     |
+| Dataset\'s Revisions Entity   | GET    |                  | Pkg-Revisions     |
 +-------------------------------+--------+------------------+-------------------+
 | Revision List                 | GET    |                  | Revision-List     |
 +-------------------------------+--------+------------------+-------------------+
@@ -215,17 +215,17 @@
 
 Here are the data formats for the Model API.
 
-.. |format-package-ref| replace:: Package-Ref
+.. |format-dataset-ref| replace:: Dataset-Ref
 
-.. |format-package-register| replace:: [ |format-package-ref|, |format-package-ref|, |format-package-ref|, ... ]
+.. |format-dataset-register| replace:: [ |format-dataset-ref|, |format-dataset-ref|, |format-dataset-ref|, ... ]
 
-.. |format-package-entity| replace:: { id: Uuid, name: Name-String, title: String, version: String, url: String, resources: [ Resource, Resource, ...], author: String, author_email: String, maintainer: String, maintainer_email: String, license_id: String, tags: Tag-List, notes: String, extras: { Name-String: String, ... } }
+.. |format-dataset-entity| replace:: { id: Uuid, name: Name-String, title: String, version: String, url: String, resources: [ Resource, Resource, ...], author: String, author_email: String, maintainer: String, maintainer_email: String, license_id: String, tags: Tag-List, notes: String, extras: { Name-String: String, ... } }
 
 .. |format-group-ref| replace:: Group-Ref
 
 .. |format-group-register| replace:: [ |format-group-ref|, |format-group-ref|, |format-group-ref|, ... ]
 
-.. |format-group-entity| replace:: { name: Name-String, title: String, description: String, packages: Package-List }
+.. |format-group-entity| replace:: { name: Name-String, title: String, description: String, datasets: Dataset-List }
 
 
 To send request data, create the JSON-format string (encode in UTF8) put it in the request body and send it using PUT or POST.
@@ -238,7 +238,7 @@
 
  * To delete an 'extra' key-value pair, supply the key with JSON value: ``null``
 
- * When you read a package then some additional information is supplied that cannot current be adjusted throught the CKAN API. This includes info on Package Relationship ('relationships'), Group membership ('groups'), ratings ('ratings_average' and 'ratings_count'), full URL of the package in CKAN ('ckan_url') and Package ID ('id'). This is purely a convenience for clients, and only forms part of the Package on GET.
+ * When you read a dataset then some additional information is supplied that cannot current be adjusted throught the CKAN API. This includes info on Dataset Relationship ('relationships'), Group membership ('groups'), ratings ('ratings_average' and 'ratings_count'), full URL of the dataset in CKAN ('ckan_url') and Dataset ID ('id'). This is purely a convenience for clients, and only forms part of the Dataset on GET.
 
 Search API
 ~~~~~~~~~~
@@ -256,7 +256,7 @@
 +---------------------------+--------------------------+
 | Search Resource           | Location                 |
 +===========================+==========================+
-| Package Search            | ``/search/package``      |
+| Dataset Search            | ``/search/dataset``      |
 +---------------------------+--------------------------+
 | Resource Search           | ``/search/resource``     |
 +---------------------------+--------------------------+
@@ -265,7 +265,7 @@
 | Tag Counts                | ``/tag_counts``          |
 +---------------------------+--------------------------+
 
-See below for more information about package and revision search parameters.
+See below for more information about dataset and revision search parameters.
 
 Search Methods
 ``````````````
@@ -275,7 +275,7 @@
 +-------------------------------+--------+------------------------+--------------------------+
 | Resource                      | Method | Request                | Response                 |
 +===============================+========+========================+==========================+ 
-| Package Search                | POST   | Package-Search-Params  | Package-Search-Response  | 
+| Dataset Search                | POST   | Dataset-Search-Params  | Dataset-Search-Response  | 
 +-------------------------------+--------+------------------------+--------------------------+
 | Resource Search               | POST   | Resource-Search-Params | Resource-Search-Response | 
 +-------------------------------+--------+------------------------+--------------------------+
@@ -285,7 +285,7 @@
 +-------------------------------+--------+------------------------+--------------------------+
 
 It is also possible to supply the search parameters in the URL of a GET request, 
-for example ``/api/search/package?q=geodata&allfields=1``.
+for example ``/api/search/dataset?q=geodata&allfields=1``.
 
 Search Formats
 ``````````````
@@ -295,11 +295,11 @@
 +-------------------------+------------------------------------------------------------+
 | Name                    | Format                                                     |
 +=========================+============================================================+
-| Package-Search-Params   | { Param-Key: Param-Value, Param-Key: Param-Value, ... }    |
+| Dataset-Search-Params   | { Param-Key: Param-Value, Param-Key: Param-Value, ... }    |
 | Resource-Search-Params  | See below for full details of search parameters across the | 
 | Revision-Search-Params  | various domain objects.                                    |
 +-------------------------+------------------------------------------------------------+
-| Package-Search-Response | { count: Count-int, results: [Package, Package, ... ] }    |
+| Dataset-Search-Response | { count: Count-int, results: [Dataset, Dataset, ... ] }    |
 +-------------------------+------------------------------------------------------------+
 | Resource-Search-Response| { count: Count-int, results: [Resource, Resource, ... ] }  |
 +-------------------------+------------------------------------------------------------+
@@ -309,14 +309,14 @@
 | Tag-Count-List          | [ [Name-String, Integer], [Name-String, Integer], ... ]    |
 +-------------------------+------------------------------------------------------------+
 
-The ``Package`` and ``Revision`` data formats are as defined in `Model Formats`_.
+The ``Dataset`` and ``Revision`` data formats are as defined in `Model Formats`_.
 
-**Package Parameters**
+**Dataset Parameters**
 
 +-----------------------+---------------+----------------------------------+----------------------------------+
 | Param-Key             | Param-Value   | Examples                         |  Notes                           |
 +=======================+===============+==================================+==================================+
-| q                     | Search-String || q=geodata                       | Criteria to search the package   |
+| q                     | Search-String || q=geodata                       | Criteria to search the dataset   |
 |                       |               || q=government+sweden             | fields for. URL-encoded search   |
 |                       |               || q=%22drug%20abuse%22            | text. (You can also concatenate  |
 |                       |               |                                  | words with a '+' symbol in a     |
@@ -344,8 +344,8 @@
 |                       | limit=20)     |                                  | return.                          |
 +-----------------------+---------------+----------------------------------+----------------------------------+
 | all_fields            | 0 (default)   | all_fields=1                     | Each matching search result is   |
-|                       | or 1          |                                  | given as either a package name   |
-|                       |               |                                  | (0) or the full package record   |
+|                       | or 1          |                                  | given as either a dataset name   |
+|                       |               |                                  | (0) or the full dataset record   |
 |                       |               |                                  | (1).                             |
 +-----------------------+---------------+----------------------------------+----------------------------------+
 | filter_by_openness    | 0 (default)   | filter_by_openness=1             | Filters results by ones which are|
@@ -360,7 +360,7 @@
 +-----------------------+---------------+-----------------------------------------+----------------------------------+
 | Param-Key             | Param-Value   | Example                                 |  Notes                           |
 +=======================+===============+=========================================+==================================+
-| url, format,          | Search-String || url=statistics.org                     | Criteria to search the package   |
+| url, format,          | Search-String || url=statistics.org                     | Criteria to search the dataset   |
 | description           |               || format=xls                             | fields for. URL-encoded search   |
 |                       |               || description=Research+Institute         | text. This search string must be |
 |                       |               |                                         | found somewhere within the field |
@@ -458,12 +458,12 @@
 
 Example normal request::
 
- GET /api/rest/package/pollution_stats
+ GET /api/rest/dataset/pollution_stats
  returns: {"name": "pollution_stats", ... }
 
 but now with the callback parameter::
 
- GET /api/rest/package/pollution_stats?callback=jsoncallback
+ GET /api/rest/dataset/pollution_stats?callback=jsoncallback
  returns: jsoncallback({"name": "pollution_stats", ... });
 
 This parameter can apply to all GET requests in the API.
@@ -473,30 +473,30 @@
 ~~~~~~~~
 
 Some of CKAN's client-side Javascript code makes calls to the CKAN API. For
-example, to generate a suggestion for a package name when adding a new package
+example, to generate a suggestion for a dataset name when adding a new dataset
 the following API call is made:
 
 ::
 
-    /api/2/util/package/create_slug?title=Package+1+Title+Typed+So+Far
+    /api/2/util/dataset/create_slug?title=Dataset+1+Title+Typed+So+Far
 
 The return value is a JSON data structure:
 
 ::
 
-    {"valid": true, "name": "package_1_title_typed_so_far"}
+    {"valid": true, "name": "dataset_1_title_typed_so_far"}
 
 These are the keys returned:
 
 ``valid`` 
 
     Can be ``True`` or ``False``. It is ``true`` when the title entered can be
-    successfully turned into a package name and when that package name is not
+    successfully turned into a dataset name and when that dataset name is not
     already being used. It is ``false`` otherwise.
 
 ``name``
 
-    The suggested name for the package, based on the title
+    The suggested name for the dataset, based on the title
 
 You can also add ``callback=callback`` to have the response returned as JSONP. eg:
 
@@ -504,17 +504,17 @@
 
 ::
 
-    /api/2/util/package/create_slug?title=Package+1+Title+Typed+So+Far&callback=callback
+    /api/2/util/dataset/create_slug?title=Dataset+1+Title+Typed+So+Far&callback=callback
 
 Returns:
 
 ::
 
-    callback({"valid": true, "name": "package_1_title_typed_so_far"});
+    callback({"valid": true, "name": "dataset_1_title_typed_so_far"});
 
 In some CKAN deployments you may have the API deployed at a different domain
 from the main CKAN code. In these circumstances you'll need to add a new option
-to the config file to tell the new package form where it should make its API
+to the config file to tell the new dataset form where it should make its API
 requests to:
 
 ::


--- a/doc/authorization.rst	Mon Sep 05 18:22:04 2011 +0100
+++ b/doc/authorization.rst	Mon Sep 05 18:49:32 2011 +0100
@@ -16,11 +16,11 @@
 Overview
 --------
 
-In a nutshell: for a particular **object** (e.g. a package) a CKAN **user** can be assigned a **role** (e.g. editor) which allows permitted **actions** (e.g. read, edit).
+In a nutshell: for a particular **object** (e.g. a dataset) a CKAN **user** can be assigned a **role** (e.g. editor) which allows permitted **actions** (e.g. read, edit).
 
 In more detail, these concepts are as follows: 
  
-* There are **objects** to which access can be controlled, such as packages and groups.
+* There are **objects** to which access can be controlled, such as datasets and groups.
 * For each object there are a set of relevant **actions**, such as create and edit, which users can perform on the object. 
 * To simplify mapping users to actions and objects, actions are aggregated into a set of **roles**. For example, an editor role would automatically have edit and read actions.
 * Finally, CKAN has registered **users**. 
@@ -29,25 +29,25 @@
 +++++++
 
 Permissions are controlled per object: access can be controlled for an individual 
-package, group or authorization group instance. Current objects include 
-**packages**, package **groups**, **authorization groups** and the **system**.
+dataset, group or authorization group instance. Current objects include 
+**datasets**, dataset **groups**, **authorization groups** and the **system**.
 
-* A package is the basic CKAN concept of metadata about a dataset. 
-* A group of packages can be set up to specify which users have permission to add or remove packages from the group.
-* Users can be assigned to authorization groups, to increase flexibility. Instead of specifying the privileges of specific users on a package or group, you can also specify a set of users that share the same rights. To do that, an authorization group can be set up and users can be added to it. Authorization groups are both the object of authorization (i.e. one can have several roles with regards to an authorization group, such as being allowed to read or edit it) and the subject of authorization (i.e. they can be assigned roles on other objects which will apply to their members, such as the group having edit rights on a particular group).
-* Finally, the system object is special, serving as an object for assignments that do not relate to a specific object. For example, creating a package cannot be linked to a specific package instance, and is therefore a operation. 
+* A dataset is the basic CKAN concept of metadata about a dataset. 
+* A group of datasets can be set up to specify which users have permission to add or remove datasets from the group.
+* Users can be assigned to authorization groups, to increase flexibility. Instead of specifying the privileges of specific users on a dataset or group, you can also specify a set of users that share the same rights. To do that, an authorization group can be set up and users can be added to it. Authorization groups are both the object of authorization (i.e. one can have several roles with regards to an authorization group, such as being allowed to read or edit it) and the subject of authorization (i.e. they can be assigned roles on other objects which will apply to their members, such as the group having edit rights on a particular group).
+* Finally, the system object is special, serving as an object for assignments that do not relate to a specific object. For example, creating a dataset cannot be linked to a specific dataset instance, and is therefore a operation. 
 
 
 Actions
 +++++++
 
-**Actions** are defined in the Action enumeration in ``ckan/model/authz.py`` and currently include: **edit**, **change-state**, **read**, **purge**, **edit-permissions**, **create-package**, **create-group**, **create-authorization-group**, **read-site**, **read-user**, **create-user**.
+**Actions** are defined in the Action enumeration in ``ckan/model/authz.py`` and currently include: **edit**, **change-state**, **read**, **purge**, **edit-permissions**, **create-dataset**, **create-group**, **create-authorization-group**, **read-site**, **read-user**, **create-user**.
 
-As noted above, some of these (e.g. **read**) have meaning for any type of object, while some (e.g. **create-package**) can not be associated with any particular object, and are therefore only associated with the system object. 
+As noted above, some of these (e.g. **read**) have meaning for any type of object, while some (e.g. **create-dataset**) can not be associated with any particular object, and are therefore only associated with the system object. 
 
 The **read-site** action (associated with the system object) allows or denies access to pages not associated with specific objects. These currently include:
  
- * Package search
+ * Dataset search
  * Group index
  * Tags index 
  * Authorization Group index
@@ -95,8 +95,8 @@
 
 CKAN ships with the following default permissions: 
 
-* When a new package is created, its creator automatically becomes **admin** for it. This user can then change permissions for other users.
-* By default, any other user (including both visitors and logged-ins) can read and write to this package. 
+* When a new dataset is created, its creator automatically becomes **admin** for it. This user can then change permissions for other users.
+* By default, any other user (including both visitors and logged-ins) can read and write to this dataset. 
 
 These defaults can be changed in the CKAN config - see ``default_roles`` in :doc:`configuration`.
 
@@ -107,7 +107,7 @@
 --------------------
 
 The assignment of users and authorization groups to roles on a given 
-protected object (such as a package) can be done by 'admins' via the 
+protected object (such as a dataset) can be done by 'admins' via the 
 'authorization' tab of the web interface (or by sysadmins via that 
 interface or the system admin interface). 
 
@@ -127,12 +127,12 @@
 
     paster --plugin=ckan rights -c my.ini list
 
-The ``rights make`` command lets you assign specific permissions. For example, to give the user named **bar** the **admin** role on the package foo::
+The ``rights make`` command lets you assign specific permissions. For example, to give the user named **bar** the **admin** role on the dataset foo::
 
-    paster --plugin=ckan rights -c my.ini make bar admin package:foo
+    paster --plugin=ckan rights -c my.ini make bar admin dataset:foo
     
-As well as users and packages, you can assign rights to other objects. These 
-include authorization groups, package groups and the system as a whole. 
+As well as users and datasets, you can assign rights to other objects. These 
+include authorization groups, dataset groups and the system as a whole. 
 
 For example, to make the user 'chef' a system-wide admin::
 
@@ -144,9 +144,9 @@
         group:bar
 
 To revoke one of the roles assigned using ``rights make``, the ``rights remove`` command 
-is available. For example, to remove **bar**'s **admin** role on the foo package:: 
+is available. For example, to remove **bar**'s **admin** role on the foo dataset:: 
 
-    paster --plugin=ckan rights -c my.ini remove bar admin package:foo
+    paster --plugin=ckan rights -c my.ini remove bar admin dataset:foo
 
 The ``roles`` command lists and modifies the assignment of actions to 
 roles. 
@@ -180,24 +180,26 @@
 1. Anonymous Edit Mode
 ++++++++++++++++++++++
 
-Anyone can edit and create packages without logging in. This is the default for CKAN out of the box.
+Anyone can edit and create datasets without logging in. This is the default for CKAN out of the box.
+
+
 
 
 2. Logged-in Edit Mode
 ++++++++++++++++++++++
 
-You need to log-in and create/edit packages. Anyone can create an account.
+You need to log-in and create/edit datasets. Anyone can create an account.
 
 To operate in this mode:
 
-1. First, change the visitor (any non-logged in user) rights from being able to create and edit packages to just reading them::
+1. First, change the visitor (any non-logged in user) rights from being able to create and edit datasets to just reading them::
 
      paster rights make visitor reader system
      paster rights make visitor reader package:all
      paster rights remove visitor anon_editor package:all
      paster rights remove visitor anon_editor system
 
-2. Change the default rights for newly created packages. Do this by using these values in your config file (see :doc:`configuration`)::
+2. Change the default rights for newly created datasets. Do this by using these values in your config file (see :doc:`configuration`)::
 
      ckan.default_roles.Package = {"visitor": ["reader"], "logged_in": ["editor"]}
      ckan.default_roles.Group = {"visitor": ["reader"], "logged_in": ["editor"]}
@@ -212,27 +214,27 @@
 
 The key features are:
 
-* Packages are assigned to a specific publishing group.
-* Only users associated to that group are able to create or update packages associated to that group.
+* Datasets are assigned to a specific publishing group.
+* Only users associated to that group are able to create or update datasets associated to that group.
 
 To operate in this mode:
 
-1. First, remove the general public's rights to create and edit packages::
+1. First, remove the general public's rights to create and edit datasets::
 
      paster rights remove visitor anon_editor package:all
      paster rights remove logged_in editor package:all
      paster rights remove visitor anon_editor system
      paster rights remove logged_in editor system
 
-2. If logged-in users have already created packages in your system, you may also wish to remove their admin rights. For example::
+2. If logged-in users have already created datasets in your system, you may also wish to remove their admin rights. For example::
 
      paster rights remove bob admin package:all
 
-3. Change the default rights for newly created packages. Do this by using these values in your config file (see :doc:`configuration`)::
+3. Change the default rights for newly created datasets. Do this by using these values in your config file (see :doc:`configuration`)::
 
      ckan.default_roles.Package = {"visitor": ["reader"], "logged_in": ["reader"]}
      ckan.default_roles.Group = {"visitor": ["reader"], "logged_in": ["reader"]}
      ckan.default_roles.System = {"visitor": ["reader"], "logged_in": ["reader"]}
      ckan.default_roles.AuthorizationGroup = {"visitor": ["reader"], "logged_in": ["reader"]} 
 
-Note you can also restrict package edits by a user's authorization group. 
+Note you can also restrict dataset edits by a user's authorization group. 


--- a/doc/configuration.rst	Mon Sep 05 18:22:04 2011 +0100
+++ b/doc/configuration.rst	Mon Sep 05 18:49:32 2011 +0100
@@ -79,7 +79,7 @@
 
 Default value:  (empty)
 
-This sets a space-separated list of extra field key values which will not be shown on the package read page. 
+This sets a space-separated list of extra field key values which will not be shown on the dataset read page. 
 
 .. warning::  While this is useful to e.g. create internal notes, it is not a security measure. The keys will still be available via the API and in revision diffs. 
 
@@ -93,9 +93,9 @@
 
  rdf_packages = http://semantic.ckan.net/record/
 
-Configure this if you have an RDF store of the same packages as are in your CKAN instance. It will provide three sorts of links from each package page to the equivalent RDF URL given in `rdf_packages`:
+Configure this if you have an RDF store of the same datasets as are in your CKAN instance. It will provide three sorts of links from each dataset page to the equivalent RDF URL given in `rdf_packages`:
 
-1. 303 redirects for clients that content-negotiate rdf-xml or turtle. e.g. client GETs `http://ckan.net/package/pollution-2008` with accept header `application/rdf+xml` ``curl -H "Accept: application/rdf+xml" http://ckan.net/package/pollution-2008``. CKAN's response is a 303 redirect to `http://semantic.ckan.net/package/pollution-2008` which can be obtained with: ``curl -L -H "Accept: application/rdf+xml" http://ckan.net/package/pollution-2008``
+1. 303 redirects for clients that content-negotiate rdf-xml or turtle. e.g. client GETs `http://ckan.net/dataset/pollution-2008` with accept header `application/rdf+xml` ``curl -H "Accept: application/rdf+xml" http://ckan.net/dataset/pollution-2008``. CKAN's response is a 303 redirect to `http://semantic.ckan.net/dataset/pollution-2008` which can be obtained with: ``curl -L -H "Accept: application/rdf+xml" http://ckan.net/dataset/pollution-2008``
 
 2. Embedded links for browsers that are aware. e.g. `<link rel="alternate" type="application/rdf+xml" href="http://semantic.ckan.net/record/b410e678-8a96-40cf-8e46-e8bd4bf02684.rdf">`
 
@@ -254,7 +254,7 @@
 
 Default value:  ``standard``
 
-This sets the name of the form to use when editing a package. This can be a form defined in the core CKAN code or in another setuputils-managed python module. The only requirement is that the ``setup.py`` file has an entry point for the form defined in the ``ckan.forms`` section. 
+This sets the name of the form to use when editing a dataset. This can be a form defined in the core CKAN code or in another setuputils-managed python module. The only requirement is that the ``setup.py`` file has an entry point for the form defined in the ``ckan.forms`` section. 
 
 For more information on forms, see :doc:`forms`.
 
@@ -271,9 +271,9 @@
  package_new_return_url = http://datadotgc.ca/new_dataset_complete?name=<NAME>
  package_edit_return_url = http://datadotgc.ca/dataset/<NAME>
 
-If integrating the Edit Package and New Package forms into a third-party interface, setting these options allows you to set the return address. When the user has completed the form and presses 'commit', the user is redirected to the URL specified.
+If integrating the Edit Dataset and New Dataset forms into a third-party interface, setting these options allows you to set the return address. When the user has completed the form and presses 'commit', the user is redirected to the URL specified.
 
-The ``<NAME>`` string is replaced with the name of the package edited. Full details of this process are given in :doc:`form-integration`.
+The ``<NAME>`` string is replaced with the name of the dataset edited. Full details of this process are given in :doc:`form-integration`.
 
 
 .. index::
@@ -284,7 +284,7 @@
 
 A url pointing to a JSON file containing a list of licence objects. This list
 determines the licences offered by the system to users, for example when
-creating or editing a package.
+creating or editing a dataset.
 
 This is entirely optional - by default, the system will use the CKAN list of
 licences available in the `Python licenses package <http://pypi.python.org/pypi/licenses>`_.
@@ -417,7 +417,7 @@
 
 Default value:  (none)
 
-The primary URL used by this site. Used in the API to provide packages with links to themselves in the web UI.
+The primary URL used by this site. Used in the API to provide datasets with links to themselves in the web UI.
 
 .. index::
    single: api_url
@@ -445,7 +445,7 @@
 default_roles
 ^^^^^^^^^^^^^
 
-This allows you to set the default authorization roles (i.e. permissions) for new objects. Currently this extends to new packages, groups, authorization groups and the ``system`` object. For full details of these, see :doc:`authorization`.
+This allows you to set the default authorization roles (i.e. permissions) for new objects. Currently this extends to new datasets, groups, authorization groups and the ``system`` object. For full details of these, see :doc:`authorization`.
 
 The value is a strict JSON dictionary of user names ``visitor`` (any user who is not logged in)  and ``logged_in`` (any user who is logged in) with lists of their roles.
 
@@ -454,7 +454,7 @@
  ckan.default_roles.Package = {"visitor": ["editor"], "logged_in": ["editor"]}
  ckan.default_roles.Group = {"visitor": ["reader"], "logged_in": ["reader"]}
 
-With this example setting, visitors and logged-in users can only read packages that get created.
+With this example setting, visitors and logged-in users can only read datasets that get created.
 
 Defaults: see in ``ckan/model/authz.py`` for: ``default_default_user_roles``
 


--- a/doc/database_dumps.rst	Mon Sep 05 18:22:04 2011 +0100
+++ b/doc/database_dumps.rst	Mon Sep 05 18:49:32 2011 +0100
@@ -10,7 +10,7 @@
 
 We provide two ``paster`` methods to create dumpfiles.
 
-* ``db simple-dump-json`` - A simple dumpfile, useful to create a public listing of the packages with no user information. All packages are dumped, including deleted packages and ones with strict authorization.
+* ``db simple-dump-json`` - A simple dumpfile, useful to create a public listing of the datasets with no user information. All datasets are dumped, including deleted datasets and ones with strict authorization.
 * ``db dump`` -  A more complicated dumpfile, useful for backups. Replicates the database completely, including users, their personal info and API keys, and hence should be kept private.
 
 For more information on paster, see :doc:`paster`.


--- a/doc/extensions.rst	Mon Sep 05 18:22:04 2011 +0100
+++ b/doc/extensions.rst	Mon Sep 05 18:49:32 2011 +0100
@@ -18,9 +18,9 @@
 * `ckanext-admin <https://bitbucket.org/okfn/ckanext-admin>`_: Admin web interface for CKAN.
 * `ckanext-apps <https://bitbucket.org/okfn/ckanext-apps>`_: Apps and ideas catalogue extension for CKAN.
 * `ckanext-deliverance <https://bitbucket.org/okfn/ckanext-deliverance>`_: Extends CKAN to use the Deliverance HTTP proxy, which can request and render web pages from * an external site (e.g. a CMS like Drupal or Wordpress). 
-* `ckanext-disqus <https://bitbucket.org/okfn/ckanext-disqus>`_: Allows users to comment on package pages with Disqus. 
-* `ckanext-follower <https://bitbucket.org/okfn/ckanext-follower>`_: Allow users to follow packages.
-* `ckanext-googleanalytics <https://bitbucket.org/okfn/ckanext-googleanalytics>`_: Integrates Google Analytics data into CKAN. Gives download stats on package pages, list * of most popular packages, etc.
+* `ckanext-disqus <https://bitbucket.org/okfn/ckanext-disqus>`_: Allows users to comment on dataset pages with Disqus. 
+* `ckanext-follower <https://bitbucket.org/okfn/ckanext-follower>`_: Allow users to follow datasets.
+* `ckanext-googleanalytics <https://bitbucket.org/okfn/ckanext-googleanalytics>`_: Integrates Google Analytics data into CKAN. Gives download stats on dataset pages, list * of most popular datasets, etc.
 * `ckanext-qa <https://bitbucket.org/okfn/ckanext-qa>`_: Provides link checker, 5 stars of openness and other Quality Assurance features.
 * `ckanext-rdf <https://bitbucket.org/okfn/ckanext-rdf>`_: Consolidated handling of RDF export and import for CKAN. 
 * `ckanext-stats <https://bitbucket.org/okfn/ckanext-stats>`_: Statistics (and visuals) about the datasets in a CKAN instance.


--- a/doc/form-integration.rst	Mon Sep 05 18:22:04 2011 +0100
+++ b/doc/form-integration.rst	Mon Sep 05 18:49:32 2011 +0100
@@ -2,12 +2,12 @@
 Form Integration
 ================
 
-CKAN allows you to integrate its Edit Package and New Package forms forms into an external front-end. To that end, CKAN also provides a simple way to redirect these forms back to the external front-end upon submission. 
+CKAN allows you to integrate its Edit Dataset and New Dataset forms forms into an external front-end. To that end, CKAN also provides a simple way to redirect these forms back to the external front-end upon submission. 
 
 Redirecting CKAN Forms
 ======================
 
-It is obviously simple enough for an external front-end to link to CKAN's Edit Package and New Package forms, but once the forms are submitted, it would be desirable to redirect the user back to the external front-end, rather than CKAN's package read page. 
+It is obviously simple enough for an external front-end to link to CKAN's Edit Dataset and New Dataset forms, but once the forms are submitted, it would be desirable to redirect the user back to the external front-end, rather than CKAN's dataset read page. 
 
 This is achieved with a parameter to the CKAN URL. The 'return URL' can be specified in two places:
 
@@ -17,22 +17,22 @@
 
 (If the 'return URL' is supplied in both places, then the first takes precedence.)
 
-Since the 'return URL' may need to include the package name, which could be changed by the user, CKAN replaces a known placeholder ``<NAME>`` with this value on redirect.
+Since the 'return URL' may need to include the dataset name, which could be changed by the user, CKAN replaces a known placeholder ``<NAME>`` with this value on redirect.
 
 .. note:: Note that the downside of specifying the 'return URL' in the CKAN config is that the CKAN web interface becomes less usable on its own, since the user is hampered by the redirects to the external interface.
 
 Example
 -------
 
-An external front-end displays a package 'ontariolandcoverv100' here:: 
+An external front-end displays a dataset 'ontariolandcoverv100' here:: 
 
   http://datadotgc.ca/dataset/ontariolandcoverv100
 
-It displays a link to edit this package using CKAN's form, which without the redirect would be::
+It displays a link to edit this dataset using CKAN's form, which without the redirect would be::
 
-  http://ca.ckan.net/package/edit/ontariolandoverv100
+  http://ca.ckan.net/dataset/edit/ontariolandoverv100
 
-At first, it may seem that the return link should be ``http://datadotgc.ca/dataset/ontariolandcoverv100``. But when the user edits this package, the name may change. So the return link needs to be::
+At first, it may seem that the return link should be ``http://datadotgc.ca/dataset/ontariolandcoverv100``. But when the user edits this dataset, the name may change. So the return link needs to be::
 
   http://datadotgc.ca/dataset/<NAME>
 
@@ -42,9 +42,9 @@
 
 So, in summary, the edit link becomes:: 
 
-  http://ca.ckan.net/package/edit/ontariolandoverv100?return_to=http%3A%2F%2Fdatadotgc.ca%2Fdataset%2F%3CNAME%3E
+  http://ca.ckan.net/dataset/edit/ontariolandoverv100?return_to=http%3A%2F%2Fdatadotgc.ca%2Fdataset%2F%3CNAME%3E
 
-During editing the package, the user changes the package name to `canadalandcover`, presses 'preview' and finally 'commit'. The user is now redirected back to the external front-end at:: 
+During editing the dataset, the user changes the dataset name to `canadalandcover`, presses 'preview' and finally 'commit'. The user is now redirected back to the external front-end at:: 
 
   http://datadotgc.ca/dataset/canadalandcover
 
@@ -55,4 +55,4 @@
  [app:main]
  package_edit_return_url = http://datadotgc.ca/dataset/<NAME>
 
- ...
\ No newline at end of file
+ ...


--- a/doc/forms.rst	Mon Sep 05 18:22:04 2011 +0100
+++ b/doc/forms.rst	Mon Sep 05 18:49:32 2011 +0100
@@ -2,21 +2,21 @@
 Customizing Forms
 =================
 
-The forms used to edit packages and groups in CKAN can be customized. This lets you tailor them to your needs, helping your users choose from sensible options or use different data formats. 
+The forms used to edit datasets and groups in CKAN can be customized. This lets you tailor them to your needs, helping your users choose from sensible options or use different data formats. 
 
-This document explains how to customize the package and group forms you offer to your users, without getting embroiled in the core CKAN code.
+This document explains how to customize the dataset and group forms you offer to your users, without getting embroiled in the core CKAN code.
 
-.. note:: This section deals with the form used to *edit* packages and groups, not the way they are displayed. For information on customizing the display of forms, see :doc:`theming`. 
+.. note:: This section deals with the form used to *edit* datasets and groups, not the way they are displayed. For information on customizing the display of forms, see :doc:`theming`. 
 
 .. warning:: This is an advanced topic. Ensure you are familiar with :doc:`extensions` before attempting to customize forms. 
 
-Building a Package Form
+Building a Dataset Form
 -----------------------
 
 The Best Way: Extensions
 ^^^^^^^^^^^^^^^^^^^^^^^^
 
-The best way to build a package form is by using a CKAN extension. 
+The best way to build a dataset form is by using a CKAN extension. 
 
 You will firstly need to make a new controller in your extension.  This should subclass PackageController as follows::
 
@@ -26,7 +26,7 @@
 
 The ``package_form`` variable in the subclass will be used as the new form template.
 
-It is recommended that you copy the package form (``new_package_form.html``) and make modifications to it. However, it is possible to start from scratch.
+It is recommended that you copy the dataset form (``new_package_form.html``) and make modifications to it. However, it is possible to start from scratch.
 
 To point at this new controller correctly, your extension should look like the following::
 
@@ -34,8 +34,8 @@
      implements(IRoutes)
      implements(IConfigurer)
      def before_map(self, map):
-         map.connect('/package/new', controller='ckanext.extension_name.controllers.PackageNewController:PackageNew', action='new')
-         map.connect('/package/edit/{id}', controller='ckanext.extension_name.controllers.PackageNewController:PackageNew', action='edit')
+         map.connect('/dataset/new', controller='ckanext.extension_name.controllers.PackageNewController:PackageNew', action='new')
+         map.connect('/dataset/edit/{id}', controller='ckanext.extension_name.controllers.PackageNewController:PackageNew', action='edit')
          return map
      def after_map(self, map):
          return map 


--- a/doc/loading_data.rst	Mon Sep 05 18:22:04 2011 +0100
+++ b/doc/loading_data.rst	Mon Sep 05 18:49:32 2011 +0100
@@ -22,34 +22,34 @@
 The Simplest Approach - ckanclient
 ++++++++++++++++++++++++++++++++++
 
-The most basic way to automate package loading is with a Python script using the `ckanclient library <http://pypi.python.org/pypi/ckanclient>`_. You will need to register for an API key first. 
+The most basic way to automate dataset loading is with a Python script using the `ckanclient library <http://pypi.python.org/pypi/ckanclient>`_. You will need to register for an API key first. 
 
 You can install ckanclient with::
 
  pip install ckanclient
 
-Here is an example script to register a new package::
+Here is an example script to register a new dataset::
 
   import ckanclient
   # Instantiate the CKAN client.
   ckan = ckanclient.CkanClient(api_key=my_api_key, base_location="http://myckaninstance.com/api")
-  # Describe the package.
-  package_entity = {
-        'name': my_package_name,
-        'url': my_package_url,
-        'download_url': my_package_download_url,
-        'tags': my_package_keywords,
-        'notes': my_package_long_description,
+  # Describe the dataset.
+  dataset_entity = {
+        'name': my_dataset_name,
+        'url': my_dataset_url,
+        'download_url': my_dataset_download_url,
+        'tags': my_dataset_keywords,
+        'notes': my_dataset_long_description,
   }
-  # Register the package.
-  ckan.package_register_post(package_entity)
+  # Register the dataset.
+  ckan.package_register_post(dataset_entity)
 
 Loader Scripts
 ++++++++++++++
 
 'Loader scripts' provide a simple way to take any format metadata and bulk upload it to a remote CKAN instance.
 
-Essentially each set of loader scripts converts the dataset metadata to the standard 'package' format, and then loads it into CKAN. 
+Essentially each set of loader scripts converts the dataset metadata to the standard 'dataset' format, and then loads it into CKAN. 
 
 Loader scripts are generally stored into the `ckanext` repository. To get a flavour of what loader scripts look like, take a look at `the ONS scripts <https://bitbucket.org/okfn/ckanext-dgu/src/default/ckanext/dgu/ons/>`_.
 
@@ -58,7 +58,7 @@
 
 For CSV and Excel formats, the `SpreadsheetPackageImporter` (found in ``ckan/lib/spreadsheet_importer.py``) loader script wraps the file in `SpreadsheetData` before extracting the records into `SpreadsheetDataRecords`.
 
-SpreadsheetPackageImporter copes with multiple title rows, data on multiple sheets, dates. The loader can reload packages based on a unique key column in the spreadsheet, choose unique names for packages if there is a clash, add/merge new resources for existing packages and manage package groups.
+SpreadsheetPackageImporter copes with multiple title rows, data on multiple sheets, dates. The loader can reload datasets based on a unique key column in the spreadsheet, choose unique names for datasets if there is a clash, add/merge new resources for existing datasets and manage dataset groups.
 
 Loader Scripts for Google Spreadsheets
 **************************************
@@ -74,12 +74,12 @@
 
 First, you need an importer that derives from `PackageImporter` (found in ``ckan/lib/importer.py``). This takes whatever format the metadata is in and sorts it into records of type `DataRecord`. 
 
-Next, each DataRecord is converted into the correct fields for a package using the `record_2_package` method. This results in package dictionaries.
+Next, each DataRecord is converted into the correct fields for a dataset using the `record_2_package` method. This results in dataset dictionaries.
 
-The `PackageLoader` takes the package dictionaries and loads them onto a CKAN instance using the ckanclient. There are various settings to determine:
+The `PackageLoader` takes the dataset dictionaries and loads them onto a CKAN instance using the ckanclient. There are various settings to determine:
 
- * ##how to identify the same package, previously been loaded into CKAN.## This can be simply by name or by an identifier stored in another field.
- * how to merge in changes to an existing packages. It can simply replace it or maybe merge in resources etc.
+ * ##how to identify the same dataset, previously been loaded into CKAN.## This can be simply by name or by an identifier stored in another field.
+ * how to merge in changes to an existing datasets. It can simply replace it or maybe merge in resources etc.
 
 The loader should be given a command-line interface using the `Command` base class (``ckanext/command.py``). 
 


--- a/doc/paster.rst	Mon Sep 05 18:22:04 2011 +0100
+++ b/doc/paster.rst	Mon Sep 05 18:49:32 2011 +0100
@@ -79,7 +79,7 @@
   ratings           Manage the ratings stored in the db
   rights            Commands relating to per-object and system-wide access rights.
   roles             Commands relating to roles and actions.
-  search-index      Creates a search index for all packages
+  search-index      Creates a search index for all datasets
   sysadmin          Gives sysadmin rights to a named user
   user              Manage users
   ================= ==========================================================
@@ -134,7 +134,7 @@
 For information on using ``db`` to create dumpfiles, see :doc:`database_dumps`.
 
 
-ratings: Manage package ratings
+ratings: Manage dataset ratings
 -------------------------------
 
 Manages the ratings stored in the database, and can be used to count ratings, remove all ratings, or remove only anonymous ratings. 
@@ -149,7 +149,7 @@
 
 Sets the authorization roles of a specific user on a given object within the system.
 
-For example, to give the user named 'bar' the 'admin' role on the package 'foo'::
+For example, to give the user named 'bar' the 'admin' role on the dataset 'foo'::
 
  paster --plugin=ckan rights make bar admin package:foo  --config=/etc/ckan/std/std.ini
 


--- a/doc/plugins.rst	Mon Sep 05 18:22:04 2011 +0100
+++ b/doc/plugins.rst	Mon Sep 05 18:49:32 2011 +0100
@@ -40,7 +40,7 @@
 
     (pyenv)$ paster create -t ckanext ckanext-myname
 
-You'll get prompted to complete a number of variables which will be used in your package. You change these later by editing the generated ``setup.py`` file. Here's some example output:
+You'll get prompted to complete a number of variables which will be used in your dataset. You change these later by editing the generated ``setup.py`` file. Here's some example output:
 
 ::
 
@@ -202,7 +202,7 @@
 .. tip ::
 
    This example is based on real code used to implement the ``ckanext-disqus`` plugin
-   to add commenting to packages. You can see the latest version of this code at
+   to add commenting to datasets. You can see the latest version of this code at
    http://bitbucket.org/okfn/ckanext-disqus/src/tip/ckanext/plugins/disqus/__init__.py.
 
 First we set up logging and some helpers we'll need from Genshi to transfer the stream:
@@ -238,8 +238,8 @@
 
     class Disqus(SingletonPlugin):
         """
-        Insert javascript fragments into package pages and the home page to 
-        allow users to view and create comments on any package. 
+        Insert javascript fragments into dataset pages and the home page to 
+        allow users to view and create comments on any dataset. 
         """
         
         implements(IConfigurable)
@@ -928,7 +928,7 @@
 You don't need to specify configuration options to connect to RabbitMQ because
 the defaults are fine.
 
-At this point if you edit a package it should be using the queue. If you have
+At this point if you edit a dataset it should be using the queue. If you have
 the echo worker running you'll see the message added to the queue.
 
 Logging


--- a/test-core.ini	Mon Sep 05 18:22:04 2011 +0100
+++ b/test-core.ini	Mon Sep 05 18:49:32 2011 +0100
@@ -27,8 +27,8 @@
 # pyamqplib or queue
 carrot_messaging_library = queue
 ckan.site_url = http://test.ckan.net
-package_new_return_url = http://localhost/package/<NAME>?test=new
-package_edit_return_url = http://localhost/package/<NAME>?test=edit
+package_new_return_url = http://localhost/dataset/<NAME>?test=new
+package_edit_return_url = http://localhost/dataset/<NAME>?test=edit
 rdf_packages = http://test.com/package/
 ckan.extra_resource_fields = alt_url

Repository URL: https://bitbucket.org/okfn/ckan/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list