Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/okfn/ckan
Browse files Browse the repository at this point in the history
  • Loading branch information
rossjones committed May 11, 2012
2 parents f59be8a + 1990073 commit 0e9c09f
Show file tree
Hide file tree
Showing 71 changed files with 1,358 additions and 1,053 deletions.
1 change: 0 additions & 1 deletion .gitattributes
@@ -1,3 +1,2 @@
*.po -diff
*.mo -diff
*.pot -diff
2 changes: 1 addition & 1 deletion .tx/config
@@ -1,7 +1,7 @@
[main]
host = http://www.transifex.net

[ckan.1-6]
[ckan.1-7]
file_filter = ckan/i18n/<lang>/LC_MESSAGES/ckan.po
source_file = ckan/i18n/ckan.pot
source_lang = en
Expand Down
61 changes: 50 additions & 11 deletions CHANGELOG.txt
@@ -1,6 +1,45 @@
CKAN CHANGELOG
++++++++++++++

v1.7 2012-05-09
===============

Major:
* Updated SOLR schema (#2327). Note: This will require and update of the SOLR schema file and a reindex.
* Support for Organization based workflow, with membership determinig access permissions to datasets (#1669,#2255)
* Related items such as visualizations, applications or ideas can now be added to datasets (#2204)
* Restricted vocabularies for tags, allowing grouping related tags together (#1698)
* Internal analytics that track number of views and downloads for datasets and resources (#2251)
* Consolidated multilingual features in an included extension (#1821,#1820)
* Atom feeds for publishers, tags and search results (#1593,#2277)
* RDF dump paster command (#2303)
* Better integration with the DataStore, based on ElasticSearch, with nice helper docs (#1797)
* Updated the Recline data viewer with new features such as better graphs and a map view (#2236,#2283)
* Improved and redesigned documentation (#2226,#2245,#2248)

Minor:
* Groups can have an image associated (#2275)
* Basic resource validation (#1711)
* Ability to search without accents for accented words (#906)
* Weight queries so that title is more important than rest of body (#1826)
* Enhancements in the dataset and resource forms (#1506)
* OpenID can now be disabled (#1830)
* API and forms use same validation (#1792)
* More robust bulk search indexing, with options to ignore exceptions and just refresh (#1616i,#2232)
* Modify where the language code is placed in URLs (#2261)
* Simplified licenses list (#1359)
* Add extension point for dataset view (#1741)

Bug fixes:
* Catch exceptions on the QA archiver (#1809)
* Error when changing language when CKAN is mounted in URL (#1804)
* Naming of a new package/group can clash with a route (#1742)
* Can't delete all of a package's resources over REST API (#2266)
* Group edit form didn't allow adding multiple datasets at once (#2292)
* Fix layout bugs in IE 7 (#1788)
* Bug with Portugese translation and Javascript (#2318)
* Fix broken parse_rfc_2822 helper function (#2314)

v1.6 2012-02-24
===============

Expand Down Expand Up @@ -158,7 +197,7 @@ Minor:
* Speed up tag reading (98d72)
* Cope with new WebOb version 1 (#1267)
* Avoid exceptions caused by bots hitting error page directly (#1176)
* Too minor to mention: #1234,
* Too minor to mention: #1234,

Bug fixes:
* Re-adding tags to a package failed (since 1.4.1 in Web UI, 1.4 in API) (#1239)
Expand Down Expand Up @@ -197,7 +236,7 @@ Major:
* Refactor Web interface to use logic layer rather than model objects directly. Forms now defined in navl schema and designed in HTML template. Forms use of Formalchemy is deprecated. (#1078)

Minor:
* Links in user-supplied text made less attractive to spammers (nofollow) #1181
* Links in user-supplied text made less attractive to spammers (nofollow) #1181
* Package change notifications - remove duplicates (#1149)
* Metadata dump linked to (#1169)
* Refactor authorization code to be common across Package, Group and Authorization Group (#1074)
Expand All @@ -223,7 +262,7 @@ Bug fixes:
* Visitor can't create packages on new CKAN install - since v1.3.3 (#1090)
* OpenID user pages couldn't be accessed - since v1.3.2 (#1056)
* Default site_url configured to ckan.net, so pages obtains CSS from ckan.net- since v1.3 (#1085)


v1.3.3 2011-04-08
=================
Expand Down Expand Up @@ -256,7 +295,7 @@ Major:
* Resources can have extra fields (although not in web interface yet) (#826)
* CSW Harvesting - numerous of fixes & improvements. Ready for deployment. (#738 etc)
* Language switcher (82002)

Minor:
* Wordpress integration refactored as a Middleware plugin (#1013)
* Unauthorized actions lead to a flash message (#366)
Expand Down Expand Up @@ -308,7 +347,7 @@ Highlights of changes:
* WordPress twentyten compatible theming (#797)
* Caching support (ETag) (#693)
* Harvesting GEMINI2 metadata records from OGC CSW servers (#566)

Minor:
* New API key header (#466)
* Group metadata now revisioned (#231)
Expand All @@ -326,14 +365,14 @@ Highlights of changes:
* Resource search in API (#336)
* Visual theming of CKAN now easy (#340, #320)
* Greater integration with external Web UIs (#335, #347, #348)
* Plug-ins can be configured to handle web requests from specified URIs and
* Plug-ins can be configured to handle web requests from specified URIs and
insert HTML into pages.

Minor:
* Search engine optimisations e.g. alphabetical browsing (#350)
* CSV and JSON dumps improved (#315)


v1.0.2 2010-08-27
=================

Expand Down Expand Up @@ -384,7 +423,7 @@ Highlights of changes:
(#247)

Bugfixes:

* Resources were losing their history (#292)
* Extra fields now work with spaces in the name (#278, #280) and
international characters (#288)
Expand Down Expand Up @@ -426,7 +465,7 @@ For a full listing of tickets see: <http://ckan.org/milestone/v0.11>. Main highl

* Change to UUIDs for revisions and all domain objects
* Improved search performance and better pagination
* Significantly improved performance in API and WUI via judicious caching
* Significantly improved performance in API and WUI via judicious caching


v0.10 2009-09-30
Expand All @@ -446,7 +485,7 @@ v0.10 2009-09-30
* Convert to use formalchemy for all forms (#76)
* Use paginate in webhelpers (#118)

* Minor:
* Minor:

* Add author and maintainer attributes to package (#91)
* Change package state in the WUI (delete and undelete) (#126)
Expand Down Expand Up @@ -491,7 +530,7 @@ v0.6 2008-07-08
* Autocompletion (+ suggestion) of tags when adding tags to a package.
* Paginated lists for packages, tags, and revisions.
* RESTful machine API for package access, update, listing and creation.
* API Keys for users who wish to modify information via the REST API.
* API Keys for users who wish to modify information via the REST API.
* Update to vdm v0.2 (SQLObject) which fixes ordering of lists.
* Better immunity to SQL injection attacks.

Expand Down
2 changes: 1 addition & 1 deletion ckan/config/environment.py
Expand Up @@ -151,7 +151,7 @@ def find_controller(self, controller):
config['pylons.app_globals'] = app_globals.Globals()

# add helper functions
restrict_helpers = asbool(config.get('ckan.restrict_template_vars', 'false'))
restrict_helpers = asbool(config.get('ckan.restrict_template_vars', 'true'))
helpers = _Helpers(h, restrict_helpers)
config['pylons.h'] = helpers

Expand Down
2 changes: 1 addition & 1 deletion ckan/config/middleware.py
Expand Up @@ -134,7 +134,7 @@ def make_app(global_conf, full_stack=True, static_files=True, **app_conf):
if asbool(config.get('ckan.page_cache_enabled')):
app = PageCacheMiddleware(app, config)

# Tracking
# Tracking add config option
if asbool(config.get('ckan.tracking_enabled', 'false')):
app = TrackingMiddleware(app, config)
return app
Expand Down
7 changes: 1 addition & 6 deletions ckan/lib/helpers.py
Expand Up @@ -33,6 +33,7 @@
from pylons import c
from pylons.i18n import _

import ckan.model as model
get_available_locales = i18n.get_available_locales
get_locales_dict = i18n.get_locales_dict

Expand Down Expand Up @@ -410,12 +411,10 @@ def am_authorized(c, action, domain_object=None):
''' Deprecated. Please use check_access instead'''
from ckan.authz import Authorizer
if domain_object is None:
from ckan import model
domain_object = model.System()
return Authorizer.am_authorized(c, action, domain_object)

def check_access(action, data_dict=None):
from ckan import model
from ckan.logic import check_access as check_access_logic,NotAuthorized

context = {'model': model,
Expand All @@ -430,7 +429,6 @@ def check_access(action, data_dict=None):
return authorized

def linked_user(user, maxlength=0):
from ckan import model
if user in [model.PSEUDO_USER__LOGGED_IN, model.PSEUDO_USER__VISITOR]:
return user
if not isinstance(user, model.User):
Expand All @@ -448,7 +446,6 @@ def linked_user(user, maxlength=0):
url_for(controller='user', action='read', id=_name))

def linked_authorization_group(authgroup, maxlength=0):
from ckan import model
if not isinstance(authgroup, model.AuthorizationGroup):
authgroup_name = unicode(authgroup)
authgroup = model.AuthorizationGroup.get(authgroup_name)
Expand All @@ -462,7 +459,6 @@ def linked_authorization_group(authgroup, maxlength=0):
url_for(controller='authorization_group', action='read', id=displayname))

def group_name_to_title(name):
from ckan import model
group = model.Group.by_name(name)
if group is not None:
return group.display_name
Expand Down Expand Up @@ -788,7 +784,6 @@ def process_names(items):
'message' : revision.message,}
return rev
import lib.dictization.model_dictize as md
import ckan.model as model
converters = {'package' : md.package_dictize,
'revisions' : dictize_revision_list}
converter = converters[object_type]
Expand Down
14 changes: 7 additions & 7 deletions ckan/lib/search/__init__.py
Expand Up @@ -2,9 +2,9 @@
from pylons import config, c

from ckan import model
from ckan.model import DomainObjectOperation
from ckan.plugins import SingletonPlugin, implements, IDomainObjectModification
from ckan.logic import get_action
import ckan.model.domain_object as domain_object

from common import (SearchIndexError, SearchError, SearchQueryError,
make_connection, is_available, SolrSettings)
Expand Down Expand Up @@ -58,7 +58,7 @@ def text_traceback():
_QUERIES['package'] = sql.PackageSearchQuery

def _normalize_type(_type):
if isinstance(_type, model.DomainObject):
if isinstance(_type, domain_object.DomainObject):
_type = _type.__class__
if isinstance(_type, type):
_type = _type.__name__
Expand All @@ -85,11 +85,11 @@ def dispatch_by_operation(entity_type, entity, operation):
"""Call the appropriate index method for a given notification."""
try:
index = index_for(entity_type)
if operation == DomainObjectOperation.new:
if operation == domain_object.DomainObjectOperation.new:
index.insert_dict(entity)
elif operation == DomainObjectOperation.changed:
elif operation == domain_object.DomainObjectOperation.changed:
index.update_dict(entity)
elif operation == DomainObjectOperation.deleted:
elif operation == domain_object.DomainObjectOperation.deleted:
index.remove_dict(entity)
else:
log.warn("Unknown operation: %s" % operation)
Expand All @@ -107,15 +107,15 @@ class SynchronousSearchPlugin(SingletonPlugin):
def notify(self, entity, operation):
if not isinstance(entity, model.Package):
return
if operation != DomainObjectOperation.deleted:
if operation != domain_object.DomainObjectOperation.deleted:
dispatch_by_operation(
entity.__class__.__name__,
get_action('package_show')(
{'model': model, 'ignore_auth': True, 'validate': False},
{'id': entity.id}),
operation
)
elif operation == DomainObjectOperation.deleted:
elif operation == domain_object.DomainObjectOperation.deleted:
dispatch_by_operation(entity.__class__.__name__,
{'id': entity.id}, operation)
else:
Expand Down
5 changes: 5 additions & 0 deletions ckan/logic/action/get.py
Expand Up @@ -484,6 +484,11 @@ def resource_show(context, data_dict):

def resource_status_show(context, data_dict):

try:
import ckan.lib.celery_app as celery_app
except ImportError:
return {'message': 'queue is not installed on this instance'}

model = context['model']
id = get_or_bust(data_dict, 'id')

Expand Down

0 comments on commit 0e9c09f

Please sign in to comment.