Project

General

Profile

Download (671 Bytes) Statistics
| Branch: | Tag: | Revision:

theme / ckanext / ozwillo_theme / plugin.py @ 5785e1fd

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