跳转到主要内容

添加新数据时选择数据集类型

项目描述

Tests

ckanext-create_typed_package

将数据集类型选择器添加到“添加数据集”按钮。

Preview

安装

要安装 ckanext-create_typed_package

  1. 安装 ckanext-create_typed_package Python 包

     pip install ckanext-create-typed-package
    
  2. create_typed_package 添加到您的 CKAN 配置文件中的 ckan.plugins 设置。

配置设置

# Build list of package types using ckanext-scheming API instead of
# internal CKAN's package_type registry
# (optional, default: false).
create_typed_package.use_scheming = true

# Additional types that are not are not automatically added to the
# list for some reason
# (optional, default: []).
create_typed_package.additional_types = custom_type another_type

# Package types that need to be excluded from the list of available
# types
# (optional, default: []).
create_typed_package.exclude_types = custom_type another_type

# After clicking on "Add datset" button redirect user to special
# page with dataset type selector instead of using in-place modal
# (optional, default: false).
create_typed_package.use_separate_route = true

# URL where the special page with dataset type selector will be registered.
# (optional, default: /dataset/select-type).
create_typed_package.route_path = /create-package/select-type

# Custom label for dataset type. It will be used by `ctp_list_types`
# action and, as result, by the type-picker UI widget. Labels provided in a
# form `create_typed_package.label_for.<TYPE>`, where machine-name for a type
# is used instead of `<TYPE>`.
# (optional, default: tk._(type_machine_name)).
create_typed_package.label_for.dataset = Publication

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源代码分发

ckanext_create_typed_package-0.3.0.tar.gz (21.1 kB 查看哈希值)

上传时间

构建分发

ckanext_create_typed_package-0.3.0-py3-none-any.whl (23.1 kB 查看散列)

上传于 Python 3

支持