Comprehensive Knowledge Archive Network (CKAN) Developer Documentation Release 2.1.5
Total Page:16
File Type:pdf, Size:1020Kb
Comprehensive Knowledge Archive Network (CKAN) Developer Documentation Release 2.1.5 Open Knowledge Foundation July 22, 2015 Contents 1 Installing CKAN 3 1.1 Installing CKAN from Package.....................................3 1.2 Installing CKAN from Source......................................5 1.3 Deploying a Source Install........................................ 12 2 Upgrading CKAN 17 2.1 CKAN releases.............................................. 17 2.2 Release process.............................................. 18 2.3 Upgrading CKAN............................................ 22 3 Getting Started 29 3.1 Creating a Sysadmin User........................................ 29 3.2 Creating Test Data............................................ 29 3.3 The Admin Page............................................. 30 3.4 The Config File.............................................. 31 4 Features 33 4.1 Command Line Interface......................................... 33 4.2 Authorization............................................... 40 4.3 Data Viewer............................................... 43 4.4 FileStore and File Uploads........................................ 46 4.5 DataStore Extension........................................... 48 4.6 Apps & Ideas............................................... 55 4.7 Tag Vocabularies............................................. 55 4.8 Form Integration............................................. 56 4.9 Linked Data and RDF.......................................... 57 4.10 Background Tasks............................................ 59 4.11 Email Notifications............................................ 61 4.12 Page View Tracking........................................... 62 4.13 Multilingual Extension.......................................... 65 4.14 Stats Extension.............................................. 66 5 Writing Extensions 67 5.1 Plugins: An Overview.......................................... 67 5.2 Libraries Available To Extensions.................................... 67 5.3 Example Extension............................................ 69 5.4 Guidelines for writing extensions.................................... 70 5.5 Creating CKAN Extensions....................................... 70 i 5.6 Testing.................................................. 70 5.7 Plugin API Documentation........................................ 71 6 Theming 73 6.1 Create Custom Extension........................................ 73 7 The CKAN API 75 7.1 Legacy APIs............................................... 76 7.2 Making an API Request......................................... 84 7.3 Example: Importing Datasets with the CKAN API........................... 85 7.4 API Versions............................................... 86 7.5 Authentication and API Keys...................................... 86 7.6 GET-able API Functions......................................... 87 7.7 JSONP Support.............................................. 87 7.8 Action API Reference.......................................... 87 8 Contributing to CKAN 89 8.1 Reporting Issues............................................. 89 8.2 Translating CKAN............................................ 89 8.3 Coding Standards............................................. 92 8.4 Commit Messages............................................ 111 8.5 Frontend Development Guidelines.................................... 112 8.6 Writing Documentation......................................... 137 8.7 Making a Pull Request.......................................... 145 9 Testing CKAN 147 9.1 Installing Additional Dependencies................................... 147 9.2 Testing with SQLite........................................... 147 9.3 Testing with PostgreSQL......................................... 148 9.4 Migration Testing............................................ 148 9.5 Common error messages......................................... 148 9.6 Front-end Testing............................................. 149 10 Config File Options 153 10.1 General Settings............................................. 153 10.2 Database Settings............................................. 154 10.3 Site Settings............................................... 154 10.4 Authorization Settings.......................................... 156 10.5 Search Settings.............................................. 158 10.6 Plugins Settings............................................. 160 10.7 Front-End Settings............................................ 161 10.8 Theming Settings............................................. 165 10.9 Storage Settings............................................. 166 10.10 Activity Streams Settings........................................ 169 10.11 Feeds Settings.............................................. 169 10.12 Internationalisation Settings....................................... 170 10.13 Form Settings............................................... 171 10.14 Email Settings.............................................. 172 11 Changelog 175 11.1 v2.1.5 2015-07-22............................................ 175 11.2 v2.1.4 2015-03-04............................................ 175 11.3 v2.1.3 2014-10-15............................................ 175 11.4 v2.1.2 2014-02-04............................................ 176 11.5 v2.1.1 2013-11-8............................................. 177 ii 11.6 v2.1 2013-08-13............................................. 177 11.7 v2.0.7 2015-07-22............................................ 179 11.8 v2.0.6 2015-03-04............................................ 179 11.9 v2.0.5 2014-10-15............................................ 180 11.10 v2.0.4 2014-02-04............................................ 180 11.11 v2.0.3 2013-11-8............................................. 180 11.12 v2.0.2 2013-08-13............................................ 181 11.13 v2.0.1 2013-06-11............................................ 181 11.14 v2.0 2013-05-10............................................. 181 11.15 v1.8.2 2013-08-13............................................ 184 11.16 v1.8.1 2013-05-10............................................ 184 11.17 v1.8 2012-10-19............................................. 185 11.18 v1.7.4 2013-08-13............................................ 186 11.19 v1.7.3 2013-05-10............................................ 186 11.20 v1.7.2 2012-10-19............................................ 186 11.21 v1.7.1 2012-06-20............................................ 186 11.22 v1.7 2012-05-09............................................. 187 11.23 v1.6 2012-02-24............................................. 188 11.24 v1.5.1 2012-01-04............................................ 189 11.25 v1.5 2011-11-07............................................. 190 11.26 v1.4.3.1 2011-09-30........................................... 191 11.27 v1.4.3 2011-09-13............................................ 191 11.28 v1.4.2 2011-08-05............................................ 192 11.29 v1.4.1 2011-06-27............................................ 193 11.30 v1.4 2011-05-19............................................. 193 11.31 v1.3.3 2011-04-08............................................ 193 11.32 v1.3.2 2011-03-15............................................ 194 11.33 v1.3 2011-02-18............................................. 195 11.34 v1.2 2010-11-25............................................. 195 11.35 v1.1 2010-08-10............................................. 196 11.36 v1.0.2 2010-08-27............................................ 196 11.37 v1.0.1 2010-06-23............................................ 196 11.38 v1.0 2010-05-11............................................. 196 11.39 v0.11 2010-01-25............................................ 197 11.40 v0.10 2009-09-30............................................ 198 11.41 v0.9 2009-07-31............................................. 198 11.42 v0.8 2009-04-10............................................. 199 11.43 v0.7 2008-10-31............................................. 199 11.44 v0.6 2008-07-08............................................. 199 11.45 v0.5 2008-01-22............................................. 199 11.46 v0.4 2007-07-04............................................. 200 11.47 v0.3 2007-04-12............................................. 200 11.48 v0.2 2007-02............................................... 200 11.49 v0.1 2006-05............................................... 200 iii iv Comprehensive Knowledge Archive Network (CKAN) Developer Documentation, Release 2.1.5 This documentation covers how to set up and manage CKAN. For high-level information on what CKAN is, see the CKAN website. Structure & Audiences These docs are ordered with the beginner documentation first, and the most advanced documentation last: • Installing CKAN and Getting Started walk you through installing CKAN and setting up your own CKAN site with some basic customizations. These docs are for sysadmins who’re new to CKAN and want go get started with it. • The sections under Features cover setting up and using CKAN features, beyond those that just work out of the box. These are for sysadmins who want to learn how to manage and get more out of their CKAN site. • Writing Extensions, Theming and The CKAN API are advanced docs for developers who want to develop an extension, theme or API app using CKAN. • Contributing to CKAN and Testing CKAN are for testers, translators and core developers who