[ckan-dev] Updating default main.css with an extension is not working

Ryan Maine balrogmi at msn.com
Wed Jul 10 16:46:18 UTC 2013


Hello

I'm unable to customize the default css appearence using a custom extension. But custom html templates in the same extension work perfectly, so I suppose the extension is succesfully installed. My extension has the following folders and files

ckanext-ryan/ckanext/ryan/public/base/main.css
ckanext-ryan/ckanext/ryan/public/base/main.min.css
ckanext-ryan/ckanext/ryan/templates/index.html
ckanext-ryan/ckanext/ryan/fanstatic
ckanext-ryan/ckanext/ryan/plugin.py
ckanext-ryan/setup.py

New "index.html" template works perfectly replacing the default "index.html" when I reload the site, but not the same for css files

This is my plugin.py file:

import ckan.plugins as p
class CustomRyan(p.SingletonPlugin):
    p.implements(p.IConfigurer)
    def update_config(self, config):
        # add template directory
        p.toolkit.add_template_directory(config, 'templates')
        p.toolkit.add_public_directory(config, 'public')
        p.toolkit.add_resource('fanstatic', 'ckanext-castello')

I only want to replace the default main.css or main.min.css file without modifying the core (so using an extension)

What else do I need to do?

Thanks and regards,
Ryan 		 	   		  



More information about the ckan-dev mailing list