当前位置: 首页>>代码示例>>Python>>正文


Python toolkit.add_public_directory方法代码示例

本文整理汇总了Python中ckan.plugins.toolkit.add_public_directory方法的典型用法代码示例。如果您正苦于以下问题:Python toolkit.add_public_directory方法的具体用法?Python toolkit.add_public_directory怎么用?Python toolkit.add_public_directory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ckan.plugins.toolkit的用法示例。


在下文中一共展示了toolkit.add_public_directory方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: update_config

# 需要导入模块: from ckan.plugins import toolkit [as 别名]
# 或者: from ckan.plugins.toolkit import add_public_directory [as 别名]
def update_config(self, config):

        # Add this plugin's templates dir to CKAN's extra_template_paths, so
        # that CKAN will use this plugin's custom templates.
        toolkit.add_template_directory(config, 'templates')

        # Add this plugin's public dir to CKAN's extra_public_paths, so
        # that CKAN will use this plugin's custom static files.
        toolkit.add_public_directory(config, 'public')

        # Register this plugin's fanstatic directory with CKAN.
        # Here, 'fanstatic' is the path to the fanstatic directory
        # (relative to this plugin.py file), and 'example_theme' is the name
        # that we'll use to refer to this fanstatic directory from CKAN
        # templates.
        toolkit.add_resource('fanstatic', 'example_theme') 
开发者ID:italia,项目名称:daf-recipes,代码行数:18,代码来源:plugin.py

示例2: update_config

# 需要导入模块: from ckan.plugins import toolkit [as 别名]
# 或者: from ckan.plugins.toolkit import add_public_directory [as 别名]
def update_config(self, config_):
        toolkit.add_template_directory(config_, 'templates')
        toolkit.add_public_directory(config_, 'public')
        toolkit.add_resource('fanstatic', 'discourse') 
开发者ID:OpenGov-OpenData,项目名称:ckanext-discourse,代码行数:6,代码来源:plugin.py

示例3: update_config

# 需要导入模块: from ckan.plugins import toolkit [as 别名]
# 或者: from ckan.plugins.toolkit import add_public_directory [as 别名]
def update_config(self, config):

        # Add this plugin's templates dir to CKAN's extra_template_paths, so
        # that CKAN will use this plugin's custom templates.
        toolkit.add_template_directory(config, 'templates')

        # Add this plugin's public dir to CKAN's extra_public_paths, so
        # that CKAN will use this plugin's custom static files.
        toolkit.add_public_directory(config, 'public') 
开发者ID:italia,项目名称:daf-recipes,代码行数:11,代码来源:plugin.py

示例4: update_config

# 需要导入模块: from ckan.plugins import toolkit [as 别名]
# 或者: from ckan.plugins.toolkit import add_public_directory [as 别名]
def update_config(self, config):
        '''
        Set up the resource library, public directory and
        template directory for the view
        '''
        toolkit.add_public_directory(config, 'theme/public')
        toolkit.add_template_directory(config, 'theme/templates')
        toolkit.add_resource('theme/public', 'ckanext-reclineview') 
开发者ID:italia,项目名称:daf-recipes,代码行数:10,代码来源:plugin.py

示例5: update_config

# 需要导入模块: from ckan.plugins import toolkit [as 别名]
# 或者: from ckan.plugins.toolkit import add_public_directory [as 别名]
def update_config(self, config_):
        toolkit.add_template_directory(config_, 'templates')
        toolkit.add_public_directory(config_, 'public')
        toolkit.add_resource('fanstatic', 'ckanext-dcatapit')

    # ------------- IDatasetForm ---------------# 
开发者ID:italia,项目名称:daf-recipes,代码行数:8,代码来源:plugin.py

示例6: update_config

# 需要导入模块: from ckan.plugins import toolkit [as 别名]
# 或者: from ckan.plugins.toolkit import add_public_directory [as 别名]
def update_config(self, config):
        # Add this plugin's templates dir to CKAN's extra_template_paths, so
        # that CKAN will use this plugin's custom templates.
        tk.add_template_directory(config, 'templates')

        # Register this plugin's fanstatic directory with CKAN.
        tk.add_public_directory(config, 'public')

        # Register this plugin's fanstatic directory with CKAN.
        tk.add_resource('fanstatic', 'datarequest')

    ######################################################################
    ############################## IROUTES ###############################
    ###################################################################### 
开发者ID:conwetlab,项目名称:ckanext-datarequests,代码行数:16,代码来源:plugin.py

示例7: update_config

# 需要导入模块: from ckan.plugins import toolkit [as 别名]
# 或者: from ckan.plugins.toolkit import add_public_directory [as 别名]
def update_config(self, config):
        tk.add_template_directory(config, 'templates')
        tk.add_public_directory(config, 'public')
        tk.add_resource('fanstatic', 'showcase')
        if tk.check_ckan_version(min_version='2.4'):
            tk.add_ckan_admin_tab(config, 'ckanext_showcase_admins',
                                  'Showcase Config')

    # IConfigurable 
开发者ID:ckan,项目名称:ckanext-showcase,代码行数:11,代码来源:plugin.py

示例8: update_config

# 需要导入模块: from ckan.plugins import toolkit [as 别名]
# 或者: from ckan.plugins.toolkit import add_public_directory [as 别名]
def update_config(self, config):
        toolkit.add_template_directory(config, 'templates')
        toolkit.add_public_directory(config, 'public')
        toolkit.add_resource('fanstatic', 'extractor')

    #
    # IConfigurable
    # 
开发者ID:stadt-karlsruhe,项目名称:ckanext-extractor,代码行数:10,代码来源:plugin.py

示例9: update_config

# 需要导入模块: from ckan.plugins import toolkit [as 别名]
# 或者: from ckan.plugins.toolkit import add_public_directory [as 别名]
def update_config(self, config_):
        toolkit.add_template_directory(config_, 'templates')
        toolkit.add_public_directory(config_, 'public')
        toolkit.add_resource('fanstatic', 'officedocs') 
开发者ID:jqnatividad,项目名称:ckanext-officedocs,代码行数:6,代码来源:plugin.py


注:本文中的ckan.plugins.toolkit.add_public_directory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。