Skip to content

Commit

Permalink
Merge branch 'dev-v2.8' into 2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
tino097 committed Dec 12, 2018
2 parents 87b8b0a + aa1442c commit ed99099
Show file tree
Hide file tree
Showing 126 changed files with 8,703 additions and 8,158 deletions.
75 changes: 57 additions & 18 deletions CHANGELOG.rst
Expand Up @@ -7,26 +7,30 @@
Changelog
---------

v.2.9.0 TBA

v.2.8.2 2018-12-12
==================

Deprecations:
* ``c.action`` and ``c.controller`` variables should be avoided.
``ckan.plugins.toolkit.get_endpoint`` can be used instead. This function
returns tuple of two items(depending on request handler):
1. Flask blueprint name / Pylons controller name
2. Flask view name / Pylons action name
In some cases, Flask blueprints have names that are differs from their
Pylons equivalents. For example, 'package' controller is divided between
'dataset' and 'resource' blueprints. For such cases you may need to perform
additional check of returned value:

>>> if toolkit.get_endpoint()[0] in ['dataset', 'package']:
>>> do_something()

In this code snippet, will be called if current request is handled via Flask's
dataset blueprint in CKAN>=2.9, and, in the same time, it's still working for
Pylons package controller in CKAN<2.9
General notes:
* This version requires a requirements upgrade on source installations
* Note: This version does not requires a database upgrade
* Note: This version does not require a Solr schema upgrade

Fixes:

* Strip full URL on uploaded resources before saving to DB (`#4382 <https://github.com/ckan/ckan/issues/4382>`_)
* Fix user not being defined in check_access function (`#4574 <https://github.com/ckan/ckan/issues/4574>`_)
* Remove html5 shim from stats extension (`#4236 <https://github.com/ckan/ckan/issues/4236>`_)
* Fix for datastore_search distinct=true option (`#4236 <https://github.com/ckan/ckan/issues/4236>`_)
* Fix edit slug button (`#4379 <https://github.com/ckan/ckan/issues/4379>`_)
* Don't re-register plugin helpers on flask_app (`#4414 <https://github.com/ckan/ckan/issues/4414>`_)
* Fix for Resouce View Re-order (`#4416 <https://github.com/ckan/ckan/issues/4416>`_)
* autocomplete.js: fix handling of comma key codes (`#4421 <https://github.com/ckan/ckan/issues/4421>`_)
* Flask patch update (`#4426 <https://github.com/ckan/ckan/issues/4426>`_)
* Allow plugins to define multiple blueprints (`#4495 <https://github.com/ckan/ckan/issues/4495>`_)
* Fix i18n API encoding (`#4505 <https://github.com/ckan/ckan/issues/4505>`_)
* Allow to defined legacy route mappings as a dict in config (`#4521 <https://github.com/ckan/ckan/issues/4521>`_)
* group_patch does not reset packages (`#4557 <https://github.com/ckan/ckan/issues/4557>`_)

v.2.8.1 2018-07-25
==================
Expand Down Expand Up @@ -172,6 +176,27 @@ Changes and deprecations:
of course use Celery but they will need to handle the management themselves.
* The ``ckan.recaptcha.version`` config option is now removed, since v2 is the only valid version now (#4061)

v2.7.5 2018-12-12
=================

* Strip full URL on uploaded resources before saving to DB (`#4382 <https://github.com/ckan/ckan/issues/4382>`_)
* Fix for datastore_search distinct=true option (`#4236 <https://github.com/ckan/ckan/issues/4236>`_)
* Fix edit slug button (`#4379 <https://github.com/ckan/ckan/issues/4379>`_)
* Don't re-register plugin helpers on flask_app (`#4414 <https://github.com/ckan/ckan/issues/4414>`_)
* Fix for Resouce View Re-order (`#4416 <https://github.com/ckan/ckan/issues/4416>`_)
* autocomplete.js: fix handling of comma key codes (`#4421 <https://github.com/ckan/ckan/issues/4421>`_)
* Flask patch update (`#4426 <https://github.com/ckan/ckan/issues/4426>`_)
* Allow plugins to define multiple blueprints (`#4495 <https://github.com/ckan/ckan/issues/4495>`_)
* Fix i18n API encoding (`#4505 <https://github.com/ckan/ckan/issues/4505>`_)
* Allow to defined legacy route mappings as a dict in config (`#4521 <https://github.com/ckan/ckan/issues/4521>`_)
* group_patch does not reset packages (`#4557 <https://github.com/ckan/ckan/issues/4557>`_)

v2.7.4 2018-05-09
=================

* Adding filter at resoruce preview doesn't work while site is setup with ckan.root_path param (#4140)
* Datastore dump results are not the same as data in database (#4150)

v2.7.3 2018-03-15
=================

Expand Down Expand Up @@ -349,6 +374,20 @@ Deprecations:
jobs (http://docs.ckan.org/en/latest/maintaining/background-tasks.html). Extensions can still
of course use Celery but they will need to handle the management themselves.

v2.6.7 2018-12-12
=================

* Fix for Resouce View Re-order (`#4416 <https://github.com/ckan/ckan/issues/4416>`_)
* autocomplete.js: fix handling of comma key codes (`#4421 <https://github.com/ckan/ckan/issues/4421>`_)
* group_patch does not reset packages (`#4557 <https://github.com/ckan/ckan/issues/4557>`_)

v2.6.6 2018-05-09
=================

* Adding filter at resoruce preview doesn't work while site is setup with ckan.root_path param (#4140)
* Stable version URLs CKAN for documentation (#4209)
* Add Warning in docs sidebar (#4209)

v2.6.5 2018-03-15
=================

Expand Down
2 changes: 1 addition & 1 deletion ckan/__init__.py
@@ -1,6 +1,6 @@
# encoding: utf-8

__version__ = '2.8.1'
__version__ = '2.8.2'

__description__ = 'CKAN Software'
__long_description__ = \
Expand Down
9 changes: 7 additions & 2 deletions ckan/config/middleware/flask_app.py
Expand Up @@ -178,7 +178,11 @@ def hello_world_post():
# Set up each IBlueprint extension as a Flask Blueprint
for plugin in PluginImplementations(IBlueprint):
if hasattr(plugin, 'get_blueprint'):
app.register_extension_blueprint(plugin.get_blueprint())
plugin_blueprints = plugin.get_blueprint()
if not isinstance(plugin_blueprints, list):
plugin_blueprints = [plugin_blueprints]
for blueprint in plugin_blueprints:
app.register_extension_blueprint(blueprint)

# Set flask routes in named_routes
for rule in app.url_map.iter_rules():
Expand Down Expand Up @@ -303,7 +307,8 @@ def ckan_after_request(response):

def helper_functions():
u'''Make helper functions (`h`) available to Flask templates'''
helpers.load_plugin_helpers()
if not helpers.helper_functions:
helpers.load_plugin_helpers()
return dict(h=helpers.helper_functions)


Expand Down
Binary file modified ckan/i18n/ar/LC_MESSAGES/ckan.mo
Binary file not shown.

0 comments on commit ed99099

Please sign in to comment.