[ckan-changes] [ckan/ckan] 0e9fc0: Fix up templates:

David Read noreply at github.com
Sat Feb 2 02:01:46 UTC 2019


  Branch: refs/heads/3484_revision_ui_removal2
  Home:   https://github.com/ckan/ckan
  Commit: 0e9fc05b73abae82e1e63824f33a7ff0d058459c
      https://github.com/ckan/ckan/commit/0e9fc05b73abae82e1e63824f33a7ff0d058459c
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2019-02-02 (Sat, 02 Feb 2019)

  Changed paths:
    M ckan/lib/dictization/model_dictize.py
    M ckan/templates-bs2/package/base.html
    M ckan/templates-bs2/package/base_form_page.html
    M ckan/templates-bs2/package/edit_base.html
    M ckan/templates-bs2/package/read.html
    M ckan/templates-bs2/package/read_base.html
    M ckan/templates-bs2/package/resource_read.html
    M ckan/templates-bs2/package/resources.html
    M ckan/templates-bs2/package/snippets/info.html
    M ckan/templates-bs2/package/snippets/resource_item.html
    M ckan/templates-bs2/package/snippets/resources.html
    M ckan/templates-bs2/package/snippets/resources_list.html
    M ckan/templates-bs2/package/snippets/tags.html
    M ckan/templates/package/base.html
    M ckan/templates/package/base_form_page.html
    M ckan/templates/package/edit_base.html
    M ckan/templates/package/read.html
    M ckan/templates/package/read_base.html
    M ckan/templates/package/resource_read.html
    M ckan/templates/package/resources.html
    M ckan/templates/package/snippets/info.html
    M ckan/templates/package/snippets/resource_item.html
    M ckan/templates/package/snippets/resources.html
    M ckan/templates/package/snippets/resources_list.html
    M ckan/templates/package/snippets/tags.html
    M ckan/views/dataset.py
    M ckan/views/resource.py

  Log Message:
  -----------
  Fix up templates:

* change pkg to pkg_dict in lots of places. ckan/views/dataset.py:read() renders ckan/templates/package/read.html with BOTH pkg and pkg_dict. So it is important to differentiate between the object and the dictionary. Also since we now use these templates for displaying the OLD version of a dataset (before we used ???), and the pkg is the current version, we should use the pkg_dict in most places. So we introduce some backwards incompatibility here, BUT it is almost CKAN 3.0 so I think this is ok. (same for ckan/views/resource.py:read() rendering ckan/templates/package/resource_read.html).

* Fix bug where calling logic.action.get:dashboard_activity_list() was affecting the pkg_dict in an activity list used by dataset_follower_count() - using copy.

* Fix some flask things - request.params->request.args and url_for.




More information about the ckan-changes mailing list