Project

General

Profile

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

theme / ckanext / ozwillo_theme / plugin.py @ b9619cfa

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
        set_global('ckan.ozwillo_portal_url',
15
                   pconfig.get('%s.ozwillo_portal_url' % __name__))
16

    
17
        toolkit.add_template_directory(config_, 'templates')
18
        toolkit.add_public_directory(config_, 'public')
19
        toolkit.add_resource('fanstatic', 'theme')
(2-2/2)