From 68ae4570dc98d9854a1891e094fd609e1275950c Mon Sep 17 00:00:00 2001 From: Brobin Date: Tue, 7 Apr 2015 22:14:35 -0500 Subject: [PATCH] fixed submission file to have default content --- rtv/docs.py | 2 +- rtv/page.py | 2 +- rtv/subreddit.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rtv/docs.py b/rtv/docs.py index 0cf48db..a14991a 100644 --- a/rtv/docs.py +++ b/rtv/docs.py @@ -64,7 +64,7 @@ COMMENT_EDIT_FILE = """{content} # Editing your comment """ -SUBMISSION_FILE = """ +SUBMISSION_FILE = """{content} # Please enter your submission. Lines starting with '#' will be ignored, # and an empty field aborts the submission. # diff --git a/rtv/page.py b/rtv/page.py index c129f64..f0b0596 100644 --- a/rtv/page.py +++ b/rtv/page.py @@ -302,7 +302,7 @@ class BasePage(object): if data['type'] == 'Submission': subreddit = self.reddit.get_subreddit(self.content.name) sub = str(subreddit).split('/')[2] - sub_file = '{content}' + SUBMISSION_FILE + sub_file = SUBMISSION_FILE content = data['text'] info = sub_file.format(content=content, name=sub) diff --git a/rtv/subreddit.py b/rtv/subreddit.py index 557974e..03ee2a3 100644 --- a/rtv/subreddit.py +++ b/rtv/subreddit.py @@ -126,7 +126,7 @@ class SubredditPage(BasePage): return # Open the submission window - submission_info = SUBMISSION_FILE.format(name=sub) + submission_info = SUBMISSION_FILE.format(name=sub, content='') curses.endwin() submission_text = open_editor(submission_info) curses.doupdate()