The following sections will teach you how to customize and extend CKAN’s features by developing your own CKAN extensions.
Some core extensions come packaged with CKAN. Core extensions don’t need to be installed before you can use them as they’re installed when you install CKAN, they can simply be enabled by following the setup instructions in each extension’s documentation (some core extensions are already enabled by default). For example, the datastore extension, multilingual extension, and stats extension are all core extensions, and the data viewer also uses core extensions to enable data previews for different file formats.
External extensions are CKAN extensions that don’t come packaged with CKAN, but must be downloaded and installed separately. A good place to find external extensions is the list of extensions on the CKAN wiki. Again, follow each extension’s own documentation to install, setup and use the extension.
- Writing extensions tutorial
- Using custom config settings in extensions
- Making configuration options runtime-editable
- Testing extensions
- Best practices for writing extensions
- Follow CKAN’s coding standards
- Use the plugins toolkit instead of importing CKAN
- Don’t edit CKAN’s database tables
- Implement each plugin class in a separate Python module
- Names of config settings should include the name of the extension
- Internationalize user-visible strings
- Add third party libraries to requirements.txt
- Do not automatically modify the database structure
- Customizing dataset and resource metadata fields using IDatasetForm
- Plugin interfaces reference
- Plugins toolkit reference
- Validator functions reference
- Internationalizing strings in extensions