ckanext-fileedit
A minimal text editor for CKAN sysadmins. Lets you edit text files through the CKAN Admin interface. You can provide a function to validate file contents before they are saved (e.g. to ensure a JSON or template file is valid), and a function to run after the file was saved successfully (e.g. to restart the web server or clear a cache).
Installation
git clone https://github.com/wardi/ckanext-fileedit.git
cd ckanext-fileedit
python setup.py develop
Add file_edit to the ckan.plugins setting in your CKAN config file.
Minimal Configuration
ckan.plugins = ... file_edit
file_edit.editable_files = [{"path": "/path/to/my/file"}]
Full Configuration
file_edit.editable_files = [
{
"path": "/path/to/my/file",
"label": "My File",
"validate": "ckanext.mytheme.validators:file_validator",
"after_update": "ckanext.mytheme.tasks:notify_owner"
},
{
"path": "/path/to/another_file"
}
]
Info
2 stars, 1 fork. By wardi.