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']
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']
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]
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]
def setup_module(module): Initializer(TEST_SITE.path).initialize(ROOT, template="test", force=True) setup_env(TEST_SITE.path)