From 81aec5e5fd6ec5e15e666bb3c9d25dc07e1cf2be Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 20 2014 10:09:23 +0000 Subject: Forward the username in each method of the fork controller and fix the new_issue endpoint --- diff --git a/progit/fork.py b/progit/fork.py index 45a3b49..a7675ce 100644 --- a/progit/fork.py +++ b/progit/fork.py @@ -410,11 +410,12 @@ def view_fork_issues(repo, username): 'issues.html', select='issues', repo=repo, + username=username, issues=issues, ) -@APP.route('/fork///new_issue') +@APP.route('/fork///new_issue', methods=('GET', 'POST')) def fork_new_issue(username, repo): """ Create a new issue """ @@ -447,10 +448,11 @@ def fork_new_issue(username, repo): flask.flash(str(err), 'error') return flask.render_template( - 'new_issues.html', + 'new_issue.html', select='issues', form=form, repo=repo, + username=username, ) @@ -473,6 +475,7 @@ def view_fork_issue(username, repo, issueid): select='issues', repo=repo, issue=issue, + username=username, )