Beispiel #1
0
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))
Beispiel #2
0
def create_bogus_blog_pages():
    blog = Article(path='blog/index.px', title='Blog', text='')
    blog.save()
    Section(article=blog, title='Blog').save()
Beispiel #3
0
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))