Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Avanov committed Jan 8, 2014
1 parent 04d9637 commit 4181238
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -329,15 +329,15 @@ methods, instead of this:
@view_config(route_name='rest', request_method='GET', renderer='json')
def get(self):
return {'method: 'GET'}
return {'method': 'GET'}
@view_config(route_name='rest', request_method='POST', renderer='json')
def post(self):
return {'method: 'POST'}
return {'method': 'POST'}
@view_config(route_name='rest', request_method='DELETE', renderer='json')
def delete(self):
return {'method: 'DELETE'}
return {'method': 'DELETE'}
You can do this:

Expand All @@ -354,15 +354,15 @@ You can do this:
@view_config(request_method='GET')
def get(self):
return {'method: 'GET'}
return {'method': 'GET'}
@view_config(request_method='POST')
def post(self):
return {'method: 'POST'}
return {'method': 'POST'}
@view_config(request_method='DELETE')
def delete(self):
return {'method: 'DELETE'}
return {'method': 'DELETE'}
In the above example, we were able to take the ``route_name='rest'`` and
``renderer='json'`` arguments out of the call to each individual ``@view_config``
Expand Down

0 comments on commit 4181238

Please sign in to comment.