Project

General

Profile

« Previous | Next » 

Revision 14fbb44a

Added by Serghei Mihai almost 8 years ago

ozwillo links built from a config var (#6604)

View differences:

ckanext/ozwillo_theme/plugin.py
1
from pylons import config as pconfig
2

  
1 3
import ckan.plugins as plugins
2 4
import ckan.plugins.toolkit as toolkit
5
from ckan.lib.app_globals import set_global
3 6

  
4 7

  
5 8
class OzwilloThemePlugin(plugins.SingletonPlugin):
6 9
    plugins.implements(plugins.IConfigurer)
7 10

  
8 11
    def update_config(self, config_):
12
        set_global('ckan.ozwillo_url',
13
                   pconfig.get('%s.ozwillo_url' % __name__))
14

  
9 15
        toolkit.add_template_directory(config_, 'templates')
10 16
        toolkit.add_public_directory(config_, 'public')
11 17
        toolkit.add_resource('fanstatic', 'theme')

Also available in: Unified diff