1
|
from pylons import config as pconfig
|
2
|
|
3
|
import ckan.plugins as plugins
|
4
|
import ckan.plugins.toolkit as toolkit
|
5
|
from ckan.lib.app_globals import set_global
|
6
|
|
7
|
|
8
|
class OzwilloThemePlugin(plugins.SingletonPlugin):
|
9
|
plugins.implements(plugins.IConfigurer)
|
10
|
|
11
|
def update_config(self, config_):
|
12
|
set_global('ckan.ozwillo_url',
|
13
|
pconfig.get('%s.ozwillo_url' % __name__))
|
14
|
|
15
|
toolkit.add_template_directory(config_, 'templates')
|
16
|
toolkit.add_public_directory(config_, 'public')
|
17
|
toolkit.add_resource('fanstatic', 'theme')
|