User Tools

Site Tools


Menu

 ?

About

Basic concepts and guidelines

User Guides

For users

For mappers

Technical

Learn about Dokuwiki

code_snippets

Code Snippets

Delete all drafts

paster --plugin=ckan dataset list -c /etc/ckan/production.ini|grep \(draft\)\$|cut -f 1 -d ' '|xargs -I {} -P 3 paster --plugin=ckan dataset delete {} -c /etc/ckan/production.ini

Purge all datasets marked as deleted on CKAN

paster --plugin=ckan dataset list -c /etc/ckan/production.ini|grep \(deleted\)\$|cut -f 1 -d ' '|xargs -I {} -P 3 paster --plugin=ckan dataset purge {} -c /etc/ckan/production.ini

Credits: https://www.mishari.net/

Update odm_theme CKAN extension on PP

Instead of doing git pull

pip install --upgrade git+https://github.com/OpenDevelopmentMekong/ckanext-odm_theme.git

or

docker exec -it ckan bash
pip install --upgrade git+https://github.com/OpenDevelopmentMekong/ckanext-odm_theme.git
git clone https://github.com/OpenDevelopmentMekong/ckanext-odm_theme.git
cp -av ckanext-odm_theme/ckanext/odm_theme/* /usr/local/lib/python2.7/dist-packages/ckanext/odm_theme/
rm -rf ckanext-odm_theme
exit
docker restart ckan

Update odm_library CKAN extension on PP

Instead of doing git pull

pip install --upgrade git+https://github.com/OpenDevelopmentMekong/ckanext-odm_library.git

or

docker exec -it ckan bash
pip install --upgrade git+https://github.com/OpenDevelopmentMekong/ckanext-odm_library.git
git clone https://github.com/OpenDevelopmentMekong/ckanext-odm_library.git
cp -av ckanext-odm_library/ckanext/odm_library/* /usr/local/lib/python2.7/dist-packages/ckanext/odm_library/
rm -rf ckanext-odm_library
exit
docker restart ckan
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ad/Laos_location_map_Topographic.png/330px-Laos_location_map_Topographic.png" style="width:100%"/>
<ul>
<li><a href="https://data.opendevelopmentmekong.net">Link 1</a></li>
<li><a href="https://data.opendevelopmentmekong.net">Link 2</a></li>
</ul>
code_snippets.txt · Last modified: 2020/06/23 15:04 (external edit)