Пример #1
0
def setup_module(module):
    Initializer(TEST_SITE.path).initialize(ROOT, template='test', force=True)
    setup_env(TEST_SITE.path)
    settings.SITE_PRE_PROCESSORS = {
            '/': {
                'hydeengine.site_pre_processors.NodeInjector' : {
                       'variable' : 'blog_node',
                       'path' : 'content/blog'
                }
            }
        }
    settings.LISTING_PAGE_NAMES = ['listing', 'index', 'default']
Пример #2
0
def setup_module(module):
    Initializer(TEST_SITE.path).initialize(ROOT, template='test', force=True)
    setup_env(TEST_SITE.path)
    ORIGINAL_PRE_PROCESSORS = settings.SITE_PRE_PROCESSORS
    settings.SITE_PRE_PROCESSORS = {
        '/': {
            'hydeengine.site_pre_processors.NodeInjector': {
                'variable': 'blog_node',
                'path': 'content/blog'
            }
        }
    }
    settings.LISTING_PAGE_NAMES = ['listing', 'index', 'default']
Пример #3
0
    def init_site(self, site, force=False):
        if not site in self.settings["sites"]:
            raise Exception("Site [%s] is not configured." % (site,))

        self.site_path = FileSystemEntity(self.settings["sites"][site]["path"]).humblepath
        if not hasattr(settings, "siteinfo"):
            setup_env(self.site_path)
            setattr(settings, "siteinfo", {})

        if not site in settings.siteinfo or force:
            self.siteinfo = SiteInfo(settings, self.site_path)
            self.siteinfo.refresh()
            settings.siteinfo[site] = self.siteinfo
        else:
            self.siteinfo = settings.siteinfo[site]
Пример #4
0
    def init_site(self, site, force=False):
        if not site in self.settings['sites']:
            raise Exception("Site [%s] is not configured." % (site, ))

        self.site_path = FileSystemEntity(
            self.settings['sites'][site]["path"]).humblepath
        if not hasattr(settings, 'siteinfo'):
            setup_env(self.site_path)
            setattr(settings, 'siteinfo', {})

        if not site in settings.siteinfo or force:
            self.siteinfo = SiteInfo(settings, self.site_path)
            self.siteinfo.refresh()
            settings.siteinfo[site] = self.siteinfo
        else:
            self.siteinfo = settings.siteinfo[site]
Пример #5
0
def setup_module(module):
    Initializer(TEST_SITE.path).initialize(ROOT, template="test", force=True)
    setup_env(TEST_SITE.path)
Пример #6
0
def setup_module(module):
    Initializer(TEST_SITE.path).initialize(ROOT, template="test", force=True)
    setup_env(TEST_SITE.path)