With GeoKey 0.3 we introduced an easy way to add functionality to GeoKey by creating and installing extensions. This guide explains how to create and register your awesome extension.
We created a boilerplate for GeoKey extensions that you can use as a starting point for your own extension.
1. Download and unzip the boilerplate.
2. Rename all occurrences of
geokey-extension with the name of your Python package (e.g.
with a title of your extension (e.g.
My Awesome Extension). Don’t forget to
rename the directories accordingly.
3. Now install the extension using
Just move to the extension’s root directory and install the extension for
pip install -e .
4. Register the extension with GeoKey.
Add the package to installed apps in
INSTALLED_APPS += ( ... 'geokey_awesome_package' )
You are now ready to go.
You can add extension specific pages to GeoKey’s administration. The link
will then appear in the users dashboard under Extensions. Note, that GeoKey
expects the landing page to your extension at the named URL pattern
To register the extension, open
__init__.py in the app root and set:
You can also restrict the extension to superusers of the system. That way only superusers can access the admin pages of your extension and make change to its setup. Simply set: