Skip to content

Commit

Permalink
Merge pull request #462 from bowlofeggs/docs-typo
Browse files Browse the repository at this point in the history
Correct a typo in a method signature in the docs.
  • Loading branch information
Natim committed Oct 26, 2017
2 parents 4f49b8b + 100f0f4 commit 688fce0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/source/upgrading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Now:
username = colander.SchemaNode(colander.String())
@signup.post(schema=SignupSchema(), validators=(colander_body_validator,))
def signup_postt(request):
def signup_post(request):
username = request.validated['username']
return {'success': True}
Expand All @@ -150,7 +150,7 @@ of the request (like querystring, body etc.), Cornice provides a validator that
takes an additionnal level of mapping for ``body``, ``querystring``, ``path`` or ``headers``
instead of the former ``location`` attribute on schema fields.

The ``request.validated`` hences reflects this additional level.
The ``request.validated`` hence reflects this additional level.

Before:

Expand Down Expand Up @@ -204,7 +204,7 @@ locations:
appstruct = super(SignupSchema, self).deserialize(cstruct)
username = appstruct['body']['username']
referrer = appstruct['querystring'].get('referrer')
if username == referred:
if username == referrer:
self.raise_invalid('Referrer cannot be the same as username')
return appstruct
Expand Down

0 comments on commit 688fce0

Please sign in to comment.