Skip to content

Commit

Permalink
Merge branch 'master' into 3196-common-requests-code
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Nov 14, 2016
2 parents 93dc635 + 732116b commit 2180b83
Show file tree
Hide file tree
Showing 145 changed files with 35,719 additions and 36,827 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
@@ -1,2 +1,2 @@
*.po -diff
#*.po -diff
*.mo -diff
159 changes: 151 additions & 8 deletions CHANGELOG.rst
Expand Up @@ -7,15 +7,137 @@
Changelog
---------

v2.6.0 TBA
=================
v2.7.0 TBA
==========

API changes and deprecations:
* Replace `c.__version__` with new helper `h.ckan_version()` (#3103)
* ``organization_list_for_user`` (and the ``h.organizations_available()``
helper) now return all organizations a user belongs to regardless of
capacity (Admin, Editor or Member), not just the ones where she is an
administrator (#2457)
* ``resource['size']`` will change from string to long integer (#3205)

v2.6.0 2016-11-02
=================

Note: Starting from this version, CKAN requires at least Python 2.7 and Postgres 9.2

Note: This version requires a requirements upgrade on source installations

Note: This version requires a database upgrade

Note: This version does not require a Solr schema upgrade (You may want to
upgrade the schema if you want to target Solr>=5, see #2914)

Major:
* Private datasets are now included in the default dataset search results (#3191)
* package_search API action now has an include_private parameter (#3191)

Minor:
* Make resource name default to file name (#1372)
* Customizable email templates (#1527)
* Change solrpy library to pysolr (#2352)
* Cache SQL query results (#2353)
* File Upload UX improvements (#2604)
* Helpers for multilingual fields (#2678)
* Improve Extension translation docs (#2783)
* Decouple configuration from Pylons (#3163)
* toolkit: add h, StopOnError, DefaultOrganizationForm (#2835)
* Remove Genshi support (#2833)
* Make resource URLs optional (#2844)
* Use 403 when actions are forbidden, not 401 (#2846)
* Upgrade requirements version (#3004, #3005)
* Add icons sources (#3048)
* Remove lib/dumper (#2879)
* ckan.__version__ available as template helper (#3103)
* Remove `site_url_nice` from app_globals (#3117)
* Remove `e.message` deprecation warning when running tests (#3121)
* Drop Python 2.6 support (#3126)
* Update Recline version (#3184)
* Refactor config/middleware.py to more closely match poc-flask-views (#3116)
* Creation of datasets sources with no organization specified (#3046)

Bug fixes:
* DataPusher called multiple times when creating a dataset (#2856)
* Default view is re-added when removed before DataStore upload is complete (#3011)
* "Data API" button disappears on resource page after empty update (#3012)
* Uncaught email exceptions on user invite (#3077)
* Resource view description is not rendered as Markdown (#3128)
* Fix broken html5lib dependency (#3180)
* ZH_cn translation formatter fix (#3238)
* Incorrect i18n-paths in extension's setup.cfg (#3275)
* Changing your user name produces an error and logs you out (#2394)
* Fix "Load more" functionality in the dashboard (#2346)
* Fix filters not working when embedding a resource view (#2657)
* Proper sanitation of header name on SlickGrid view (#2923)
* Fix unicode error when indexing field of type JSON (#2969)
* Fix group feeds returning no datasets (#2955)
* Replace MapQuest tiles in Recline with Stamen Terrain (#3162)
* Fix bulk operations not taking effect (#3199)
* Raise validation errors on group/org_member_create (#3108)
* Incorrect warnings when ckan.views.default_views is empty (#3093)
* Don't show deleted users/datasets on member_list (#3078)
* Fix Tag pagination widget styling (#2399)
* Fix package_owner_org_update standalone (#2661)
* Don't template fanstatic error pages (#2770)
* group_controller() on IGroupForm not in interface (#2771)
* Fix assert_true to test for message in response (#2802)
* Add user parameter to paster profile command (#2815)
* make context['user'] always username or None (#2817)
* remove some deprecated compatibility hacks (#2818)
* Param use_default_schema does not work on package_search (#2848)
* Sanitize offset when listing group activity (#2859)
* Incorrect 'download resource' hyperlink when a resource is unable to upload to datastore (#2873)
* Resolve datastore_delete erasing the database when filters was blank. (#2885)
* DomainObject.count() doesn't return count (#2919)
* Fix response code test failures (#2931)
* Fixed the url_for_* helpers when both SCRIPT_NAME and ckan.root_path are defined (#2936)
* Escape special characters in password while db loading (#2952)
* Fix redirect not working with non-root (#2968)
* Group pagination does not preserve sort order (#2981)
* Remove LazyJSONObject (#2983)
* Deleted users appear in sysadmin user lists (#2988)
* Server error at /organization if not authorized to list organizations (#2990)
* Slow page rendering when using lots of snippets (#3000)
* Only allow JSONP callbacks on GET requests (#3002)
* Attempting to access non-existing helpers should raise HelperException (#3041)
* Deprecate h.url, make it use h.url_for internally (#3055)
* Tests fail when LANG environment variable is set to German (#3060)
* Fix pagination style (CSS) (#3067)
* Login fails with 404 when using root_path (#3089)
* Resource view description is not rendered as Markdown (#3128)
* Clarify package_relationship_update documentation (#3132)
* `q` parameter in followee_list action has no effect (#3167)
* Zh cn translation formatter fix (#3238)
* Users are not removed in related tables if the main user entry is deleted (#3265)

API changes and deprecations:
* Replace `c.__version__` with new helper `h.ckan_version()` (#3103)


v2.5.3 2016-11-02
=================

* DataPusher called multiple times when creating a dataset (#2856)
* Default view is re-added when removed before DataStore upload is complete (#3011)
* "Data API" button disappears on resource page after empty update (#3012)
* Uncaught email exceptions on user invite (#3077)
* Resource view description is not rendered as Markdown (#3128)
* Fix broken html5lib dependency (#3180)
* ZH_cn translation formatter fix (#3238)
* Incorrect i18n-paths in extension's setup.cfg (#3275)
* Changing your user name produces an error and logs you out (#2394)
* Fix "Load more" functionality in the dashboard (#2346)
* Fix filters not working when embedding a resource view (#2657)
* Proper sanitation of header name on SlickGrid view (#2923)
* Fix unicode error when indexing field of type JSON (#2969)
* Fix group feeds returning no datasets (#2955)
* Replace MapQuest tiles in Recline with Stamen Terrain (#3162)
* Fix bulk operations not taking effect (#3199)
* Raise validation errors on group/org_member_create (#3108)
* Incorrect warnings when ckan.views.default_views is empty (#3093)
* Don't show deleted users/datasets on member_list (#3078)

v2.5.2 2016-03-31
=================

Expand Down Expand Up @@ -94,6 +216,21 @@ v2.5.0 2015-12-17

Cancelled release

v2.4.4 2016-11-02
=================

* Changing your user name produces an error and logs you out (#2394)
* Fix "Load more" functionality in the dashboard (#2346)
* Fix filters not working when embedding a resource view (#2657)
* Proper sanitation of header name on SlickGrid view (#2923)
* Fix unicode error when indexing field of type JSON (#2969)
* Fix group feeds returning no datasets (#2955)
* Replace MapQuest tiles in Recline with Stamen Terrain (#3162)
* Fix bulk operations not taking effect (#3199)
* Raise validation errors on group/org_member_create (#3108)
* Incorrect warnings when ckan.views.default_views is empty (#3093)
* Don't show deleted users/datasets on member_list (#3078)

v2.4.3 2016-03-31
=================

Expand Down Expand Up @@ -221,13 +358,19 @@ Changes and deprecations
* Config option ``site_url`` is now required - CKAN will not abort during
start-up if it is not set. (#1976)

v2.3.3 2015-12-17
v2.3.5 2016-11-02
=================

Bug fixes:
* Fix Markdown rendering issue
* Return default error page on fanstatic errors
* Prevent authentication when using API callbacks
* Fix "Load more" functionality in the dashboard (#2346)
* Fix filters not working when embedding a resource view (#2657)
* Proper sanitation of header name on SlickGrid view (#2923)
* Fix unicode error when indexing field of type JSON (#2969)
* Fix group feeds returning no datasets (#2955)
* Replace MapQuest tiles in Recline with Stamen Terrain (#3162)
* Fix bulk operations not taking effect (#3199)
* Raise validation errors on group/org_member_create (#3108)
* Incorrect warnings when ckan.views.default_views is empty (#3093)
* Don't show deleted users/datasets on member_list (#3078)

v2.3.4 2016-03-31
=================
Expand Down
3 changes: 3 additions & 0 deletions ckan/config/routing.py
Expand Up @@ -427,6 +427,9 @@ def make_map():
m.connect('/testing/primer', action='primer')
m.connect('/testing/markup', action='markup')

# robots.txt
map.connect('/(robots.txt)', controller='template', action='view')

# Mark all unmarked routes added up until now as core routes
for route in map.matchlist:
if not hasattr(route, '_ckan_core'):
Expand Down
26 changes: 21 additions & 5 deletions ckan/controllers/feed.py
Expand Up @@ -30,6 +30,7 @@
import ckan.lib.base as base
import ckan.lib.helpers as h
import ckan.logic as logic
import ckan.plugins as plugins

from ckan.common import _, config, c, request, response, json

Expand Down Expand Up @@ -365,10 +366,18 @@ def output_feed(self, results, feed_title, feed_description,
config.get('ckan.site_url', '').strip()

# TODO language
feed = _FixedAtom1Feed(
title=feed_title,
link=feed_link,
description=feed_description,
feed_class = None
for plugin in plugins.PluginImplementations(plugins.IFeed):
if hasattr(plugin, 'get_feed_class'):
feed_class = plugin.get_feed_class()

if not feed_class:
feed_class = _FixedAtom1Feed

feed = feed_class(
feed_title,
feed_link,
feed_description,
language=u'en',
author_name=author_name,
author_link=author_link,
Expand All @@ -381,6 +390,12 @@ def output_feed(self, results, feed_title, feed_description,
)

for pkg in results:
additional_fields = {}

for plugin in plugins.PluginImplementations(plugins.IFeed):
if hasattr(plugin, 'get_item_additional_fields'):
additional_fields = plugin.get_item_additional_fields(pkg)

feed.add_item(
title=pkg.get('title', ''),
link=self.base_url + h.url_for(controller='package',
Expand All @@ -400,7 +415,8 @@ def output_feed(self, results, feed_title, feed_description,
id=pkg['name'],
ver='2'),
unicode(len(json.dumps(pkg))), # TODO fix this
u'application/json')
u'application/json'),
**additional_fields
)
response.content_type = feed.mime_type
return feed.writeString('utf-8')
Expand Down
11 changes: 8 additions & 3 deletions ckan/controllers/template.py
Expand Up @@ -2,12 +2,13 @@

import ckan.lib.base as base
import ckan.lib.render
from ckan.common import response


class TemplateController(base.BaseController):

def view(self, url):
"""By default, the final controller tried to fulfill the request
u"""By default, the final controller tried to fulfill the request
when no other routes match. It may be used to display a template
when all else fails, e.g.::
Expand All @@ -28,12 +29,16 @@ def view(self, url):
By default this controller aborts the request with a 404 (Not
Found)
"""
if url.endswith(u'.txt'):
response.headers[u'Content-Type'] = u'text/plain; charset=utf-8'
# Default content-type is text/html
try:
return base.render(url)
except ckan.lib.render.TemplateNotFound:
if url.endswith('.html'):
if url.endswith(u'.html'):
base.abort(404)
url += '.html'
url += u'.html'
response.headers[u'Content-Type'] = u'text/html; charset=utf-8'
try:
return base.render(url)
except ckan.lib.render.TemplateNotFound:
Expand Down
Binary file modified ckan/i18n/ar/LC_MESSAGES/ckan.mo
Binary file not shown.

0 comments on commit 2180b83

Please sign in to comment.