fixed submission file to have default content

This commit is contained in:
Brobin
2015-04-07 22:14:35 -05:00
parent f31ad72f92
commit 68ae4570dc
3 changed files with 3 additions and 3 deletions

View File

@@ -64,7 +64,7 @@ COMMENT_EDIT_FILE = """{content}
# Editing your comment # Editing your comment
""" """
SUBMISSION_FILE = """ SUBMISSION_FILE = """{content}
# Please enter your submission. Lines starting with '#' will be ignored, # Please enter your submission. Lines starting with '#' will be ignored,
# and an empty field aborts the submission. # and an empty field aborts the submission.
# #

View File

@@ -302,7 +302,7 @@ class BasePage(object):
if data['type'] == 'Submission': if data['type'] == 'Submission':
subreddit = self.reddit.get_subreddit(self.content.name) subreddit = self.reddit.get_subreddit(self.content.name)
sub = str(subreddit).split('/')[2] sub = str(subreddit).split('/')[2]
sub_file = '{content}' + SUBMISSION_FILE sub_file = SUBMISSION_FILE
content = data['text'] content = data['text']
info = sub_file.format(content=content, name=sub) info = sub_file.format(content=content, name=sub)

View File

@@ -126,7 +126,7 @@ class SubredditPage(BasePage):
return return
# Open the submission window # Open the submission window
submission_info = SUBMISSION_FILE.format(name=sub) submission_info = SUBMISSION_FILE.format(name=sub, content='')
curses.endwin() curses.endwin()
submission_text = open_editor(submission_info) submission_text = open_editor(submission_info)
curses.doupdate() curses.doupdate()