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


Python settings.DEFAULT_CONFIG类代码示例

本文整理汇总了Python中pelican.settings.DEFAULT_CONFIG的典型用法代码示例。如果您正苦于以下问题:Python DEFAULT_CONFIG类的具体用法?Python DEFAULT_CONFIG怎么用?Python DEFAULT_CONFIG使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: initialized

def initialized(pelican):
	global fancybox_settings
	from pelican.settings import DEFAULT_CONFIG
	DEFAULT_CONFIG.setdefault('FANCYBOX_SETTINGS', {})
	if pelican:
		pelican.settings.setdefault('FANCYBOX_SETTINGS', {})
		fancybox_settings = supercopy(pelican.settings['FANCYBOX_SETTINGS'])
开发者ID:kaizer666,项目名称:pelican-fancybox,代码行数:7,代码来源:fancybox.py

示例2: initialized

def initialized(pelican):
	from pelican.settings import DEFAULT_CONFIG
	DEFAULT_CONFIG.setdefault('PELICAN_COMMENT_SYSTEM', False)
	DEFAULT_CONFIG.setdefault('PELICAN_COMMENT_SYSTEM_DIR' 'comments')
	if pelican:
		pelican.settings.setdefault('PELICAN_COMMENT_SYSTEM', False)
		pelican.settings.setdefault('PELICAN_COMMENT_SYSTEM_DIR', 'comments')
开发者ID:eingrossfilou,项目名称:pelican-plugins,代码行数:7,代码来源:pelican_comment_system.py

示例3: initialized

def initialized(pelican):
    from pelican.settings import DEFAULT_CONFIG
    DEFAULT_CONFIG.setdefault('STATIC_COMMENTS', False)
    DEFAULT_CONFIG.setdefault('STATIC_COMMENTS_DIR' 'comments')
    if pelican:
        pelican.settings.setdefault('STATIC_COMMENTS', False)
        pelican.settings.setdefault('STATIC_COMMENTS_DIR', 'comments')
开发者ID:0xMF,项目名称:pelican-plugins,代码行数:7,代码来源:static_comments.py

示例4: initialized

def initialized(pelican):
    from pelican.settings import DEFAULT_CONFIG
    DEFAULT_CONFIG.setdefault('DISQUS_SECRET_KEY', '')
    DEFAULT_CONFIG.setdefault('DISQUS_PUBLIC_KEY', '')
    if pelican:
        pelican.settings.setdefault('DISQUS_SECRET_KEY', '')
        pelican.settings.setdefault('DISQUS_PUBLIC_KEY', '')
开发者ID:0xMF,项目名称:pelican-plugins,代码行数:7,代码来源:disqus_static.py

示例5: initialized

def initialized(pelican):
    from pelican.settings import DEFAULT_CONFIG

    DEFAULT_CONFIG.setdefault("SUMMARY_BEGIN_MARKER", "<!-- PELICAN_BEGIN_SUMMARY -->")
    DEFAULT_CONFIG.setdefault("SUMMARY_END_MARKER", "<!-- PELICAN_END_SUMMARY -->")
    if pelican:
        pelican.settings.setdefault("SUMMARY_BEGIN_MARKER", "<!-- PELICAN_BEGIN_SUMMARY -->")
        pelican.settings.setdefault("SUMMARY_END_MARKER", "<!-- PELICAN_END_SUMMARY -->")
开发者ID:EmuxEvans,项目名称:linuxtoy.org,代码行数:8,代码来源:summary.py

示例6: initialized

def initialized(pelican):
    """Initialize the plugin """

    from pelican.settings import DEFAULT_CONFIG
    DEFAULT_CONFIG.setdefault('MDF_DEFAULT_CONFIG', '')
    DEFAULT_CONFIG.setdefault('BOOTSTRAPPER_FIGURES', False)
    if pelican:
        pelican.settings.setdefault('MDF_DEFAULT_CONFIG', '')
        pelican.settings.setdefault('BOOTSTRAPPER_FIGURES', False)
开发者ID:bnice5000,项目名称:markdown_figure,代码行数:9,代码来源:markdown_figure.py

示例7: setdefault

def setdefault(pelican, settings):
    from pelican.settings import DEFAULT_CONFIG
    for key, value in settings:
        DEFAULT_CONFIG.setdefault(key, value)

    if not pelican:
        return

    for key, value in settings:
        pelican.settings.setdefault(key, value)
开发者ID:DjalelBBZ,项目名称:pelican-plugins,代码行数:10,代码来源:pelican_comment_system.py

示例8: init_default_config

def init_default_config(pelican):
    from pelican.settings import DEFAULT_CONFIG

    TOC_DEFAULT = {
        'TOC_HEADERS': '^h[1-6]',
        'TOC_RUN': 'true'
    }

    DEFAULT_CONFIG.setdefault('TOC', TOC_DEFAULT)
    if(pelican):
        pelican.settings.setdefault('TOC', TOC_DEFAULT)
开发者ID:sbadia,项目名称:site,代码行数:11,代码来源:toc.py

示例9: initialized

def initialized(pelican):
    from pelican.settings import DEFAULT_CONFIG
    DEFAULT_CONFIG.setdefault('ARTICLEHEAD_BEGIN_MARKER',
                              '<!-- ARTICLE_HEAD_BEGIN -->')
    DEFAULT_CONFIG.setdefault('ARTICLEHEAD_END_MARKER',
                              '<!-- ARTICLE_HEAD_END -->')
    if pelican:
        pelican.settings.setdefault('ARTICLEHEAD_BEGIN_MARKER',
                                  '<!-- ARTICLE_HEAD_BEGIN -->')
        pelican.settings.setdefault('ARTICLEHEAD_END_MARKER',
                                    '<!-- ARTICLE_HEAD_END -->')
开发者ID:drewbarbs,项目名称:homepage,代码行数:11,代码来源:headextra.py

示例10: initialized

def initialized(pelican):
    p = os.path.expanduser('~/Pictures')
    from pelican.settings import DEFAULT_CONFIG
    DEFAULT_CONFIG.setdefault('PHOTO_MTIME', False)
    DEFAULT_CONFIG.setdefault('PHOTO_LIBRARY', p)
    DEFAULT_CONFIG.setdefault('PHOTO_GALLERY', (1024, 768, 80))
    DEFAULT_CONFIG.setdefault('PHOTO_ARTICLE', ( 760, 506, 80))
    DEFAULT_CONFIG.setdefault('PHOTO_THUMB',   ( 192, 144, 60))
    if pelican:
        pelican.settings.setdefault('PHOTO_MTIME', False)
        pelican.settings.setdefault('PHOTO_LIBRARY', p)
        pelican.settings.setdefault('PHOTO_GALLERY', (1024, 768, 80))
        pelican.settings.setdefault('PHOTO_ARTICLE', ( 760, 506, 80))
        pelican.settings.setdefault('PHOTO_THUMB',   ( 192, 144, 60))
开发者ID:allanman,项目名称:pelican-plugins,代码行数:14,代码来源:photos.py

示例11: test_do_not_use_folder_as_category

    def test_do_not_use_folder_as_category(self):

        settings = DEFAULT_CONFIG.copy()
        settings['ARTICLE_DIR'] = 'content'
        settings['DEFAULT_CATEGORY'] = 'Default'
        settings['DEFAULT_DATE'] = (1970, 1, 1)
        settings['USE_FOLDER_AS_CATEGORY'] = False
        settings['filenames'] = {}
        generator = ArticlesGenerator(
            settings.copy(), settings, CUR_DIR, DEFAULT_CONFIG['THEME'], None,
            DEFAULT_CONFIG['MARKUP'])
        generator.generate_context()
        # test for name
        # categories are grouped by slug; if two categories have the same slug
        # but different names they will be grouped together, the first one in
        # terms of process order will define the name for that category
        categories = [cat.name for cat, _ in generator.categories]
        categories_alternatives = (
            sorted(['Default', 'Yeah', 'test', '指導書']),
            sorted(['Default', 'yeah', 'test', '指導書']),
        )
        self.assertTrue(sorted(categories) in categories_alternatives)
        # test for slug
        categories = [cat.slug for cat, _ in generator.categories]
        categories_expected = ['default', 'yeah', 'test', 'zhi-dao-shu']
        self.assertEqual(sorted(categories), sorted(categories_expected))
开发者ID:alefteris,项目名称:pelican,代码行数:26,代码来源:test_generators.py

示例12: twitter_card

def twitter_card(generator):
    """
     https://dev.twitter.com/cards
     TWITTER_CARD_USE = (True) # (False)
     TWITTER_CARD_SITE = '@website' # The site's Twitter handle like @my_blog
     TWITTER_CARD_SITE_ID = 123456 # The site's Twitter ID
     TWITTER_CARD_CREATOR = '@username' # Your twitter handle like @yourtwitname
     TWITTER_CARD_CREATOR_ID = 56789 # The site creator's id
     GRAVATAR_URL = ''
    """

    DEFAULT_CONFIG.setdefault('TWITTER_CARD_SITE', '')
    DEFAULT_CONFIG.setdefault('TWITTER_CARD_SITE_ID', '')
    DEFAULT_CONFIG.setdefault('TWITTER_CARD_CREATOR', '')
    DEFAULT_CONFIG.setdefault('TWITTER_CARD_CREATOR_ID', '')
    DEFAULT_CONFIG.setdefault('GRAVATAR_URL', '')
开发者ID:dm-wyncode,项目名称:zipped-code,代码行数:16,代码来源:twitter_card.py

示例13: get_settings

def get_settings(**kwargs):
    """Provide tweaked setting dictionaries for testing

    Set keyword arguments to override specific settings.
    """
    settings = DEFAULT_CONFIG.copy()
    for key,value in kwargs.items():
        settings[key] = value
    return settings
开发者ID:0xMF,项目名称:pelican,代码行数:9,代码来源:support.py

示例14: initialized

def initialized(pelican):
    from pelican.settings import DEFAULT_CONFIG
    DEFAULT_CONFIG.setdefault(
        'HTMLMINIFY_FILE_EXTENSIONS',
        ['html', 'htm']
    )
    DEFAULT_CONFIG.setdefault(
        'HTMLMINIFY_SETTINGS',
        {}
    )
    if pelican:
        pelican.settings.setdefault(
            'HTMLMINIFY_FILE_EXTENSIONS',
            DEFAULT_CONFIG['HTMLMINIFY_FILE_EXTENSIONS']
        )
        pelican.settings.setdefault(
            'HTMLMINIFY_SETTINGS',
            DEFAULT_CONFIG['HTMLMINIFY_SETTINGS']
        )
开发者ID:mankyd,项目名称:othm,代码行数:19,代码来源:htmlminify.py

示例15: initialized

def initialized(pelican):
    p = os.path.expanduser("~/Pictures")
    from pelican.settings import DEFAULT_CONFIG

    DEFAULT_CONFIG.setdefault("PHOTO_LIBRARY", p)
    DEFAULT_CONFIG.setdefault("PHOTO_GALLERY", (1024, 768, 80))
    DEFAULT_CONFIG.setdefault("PHOTO_ARTICLE", (760, 506, 80))
    DEFAULT_CONFIG.setdefault("PHOTO_THUMB", (192, 144, 60))
    if pelican:
        pelican.settings.setdefault("PHOTO_LIBRARY", p)
        pelican.settings.setdefault("PHOTO_GALLERY", (1024, 768, 80))
        pelican.settings.setdefault("PHOTO_ARTICLE", (760, 506, 80))
        pelican.settings.setdefault("PHOTO_THUMB", (192, 144, 60))
开发者ID:Raniz85,项目名称:blog.raneland.se,代码行数:13,代码来源:photos.py


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