Ejemplo n.º 1
0
    def handle_noargs(self, **options):
        # create empty config.yaml
        if path("config.yaml").exists():
            print "config.yaml exists, skipping."
        else:
            file("config.yaml", "w").write(config_yaml)

        # create index.html
        if path("index.html").exists():
            print "index.html exists, skipping."
        else:
            create_page(url="index.html", title="Blog", content=index_html)

        # archive, tags, categories etc will be handled by views.py in future.
        # create _posts with one dummy post
        if path("_posts").exists():
            print "_posts exists, skipping."
        else:
            create_post(dummy_post_title, dummy_post_md)

        print 'All Done.'
        print 'Run "djangothis jekyll_post" or "djangothis jekyll_page" to'
        print 'create new blog post or page.'
        print 'Run "djangothis" to start server.'
Ejemplo n.º 2
0
    def handle_noargs(self, **options):
        # create empty config.yaml
        if path("config.yaml").exists():
            print "config.yaml exists, skipping."
        else:
            file("config.yaml", "w").write(config_yaml)

        # create index.html
        if path("index.html").exists():
            print "index.html exists, skipping."
        else:
            create_page(url="index.html", title="Blog", content=index_html)

        # archive, tags, categories etc will be handled by views.py in future.
        # create _posts with one dummy post
        if path("_posts").exists():
            print "_posts exists, skipping."
        else:
            create_post(dummy_post_title, dummy_post_md)

        print 'All Done.'
        print 'Run "djangothis jekyll_post" or "djangothis jekyll_page" to'
        print 'create new blog post or page.'
        print 'Run "djangothis" to start server.'
Ejemplo n.º 3
0
 def handle(self, *args, **options):
     if len(args) == 0:
         raise CommandError("Title of post required.")
     title = " ".join(args)
     title = title.strip()
     create_post(title=title, content="")
Ejemplo n.º 4
0
 def handle(self, *args, **options):
     if len(args) == 0:
         raise CommandError("Title of post required.")
     title = " ".join(args)
     title = title.strip()
     create_post(title=title, content="")