Skip to content

Commit

Permalink
No need to pull of kwargs when using nodes decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
sloria committed Dec 1, 2015
1 parent f12d284 commit 4f34ffd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/osf/guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,16 @@ Views
def user_settings_put(auth, **kwargs):
#...
@must_be_contributor_or_public
def get_project_comments(auth, node, **kwargs):
# ...
# No
@must_be_logged_in
def user_settings_put(**kwargs):
auth = kwargs['auth']
#...
# Exception: when node and/or project are injected, you must pull off kwargs
@must_be_contributor_or_public
def get_project_comments(auth, **kwargs):
node = kwargs['node'] or kwargs['project']
# ...
- Use ``framework.flask.redirect`` to return redirect responses. It has the same functionality as ``flask.redirect`` except that it will reappend querystring parameters for view-only links when necessary. Do **not** use ``flask.redirect``.

Expand Down

0 comments on commit 4f34ffd

Please sign in to comment.