def load_articles(): for subdir in page_sources: files = list(walk_pattern(root/subdir, page_pattern)) print("Loading %d pages from %s" % (len(files), subdir)) for f in files: Article.create_from_px(str(f), str(root/subdir))
def create_bogus_blog_pages(): blog = Article(path='blog/index.px', title='Blog', text='') blog.save() Section(article=blog, title='Blog').save()
def load_articles(): for subdir in page_sources: files = list((root/subdir).walk(pattern='*.px')) print "Loading %d pages from %s" % (len(files), subdir) for f in files: Article.create_from_px(str(f), str(root/subdir))