Skip to content

Commit 8710ac2

Browse files
author
Kevin Burke
committed
update Integer field docs
1 parent e585732 commit 8710ac2

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

docs/fields.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Renaming Attributes
5454
-------------------
5555

5656
Often times your public facing field name is different from your internal
57-
attribute naming. To configure this mapping, use the ``attribute`` kwarg. ::
57+
attribute naming. To configure this mapping, use the ``attribute`` kwarg. ::
5858

5959
fields = {
6060
'name': fields.String(attribute='private_name'),

flask_restful/fields.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,15 @@ def format(self, value):
176176

177177

178178
class Integer(Raw):
179+
""" Field for outputting an integer value.
180+
181+
:param int default: The default value for the field, if no value is
182+
specified.
183+
184+
:param attribute: If the public facing value differs from the internal
185+
value, use this to retrieve a different attribute from the response
186+
than the publicly named value.
187+
"""
179188
def __init__(self, default=0, attribute=None):
180189
super(Integer, self).__init__(default, attribute)
181190

0 commit comments

Comments
 (0)