diff options
| author | Tom Christie | 2014-09-10 13:52:16 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-09-10 13:52:16 +0100 |
| commit | 01c8c0cad977fc0787dbfc78bd34f4fd37e613f4 (patch) | |
| tree | 0bb60e5f7c419555d583e50d4fef8cb658d11ca1 /rest_framework/fields.py | |
| parent | 234369aefdf08d7d0161d851866990754c00d31f (diff) | |
| download | django-rest-framework-01c8c0cad977fc0787dbfc78bd34f4fd37e613f4.tar.bz2 | |
Added help_text argument to fields
Diffstat (limited to 'rest_framework/fields.py')
| -rw-r--r-- | rest_framework/fields.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rest_framework/fields.py b/rest_framework/fields.py index e2bd5700..e71dce1d 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -101,7 +101,8 @@ class Field(object): def __init__(self, read_only=False, write_only=False, required=None, default=empty, initial=None, source=None, - label=None, style=None, error_messages=None, validators=[]): + label=None, help_text=None, style=None, + error_messages=None, validators=[]): self._creation_counter = Field._creation_counter Field._creation_counter += 1 @@ -122,6 +123,7 @@ class Field(object): self.source = source self.initial = initial self.label = label + self.help_text = help_text self.style = {} if style is None else style self.validators = validators or self.default_validators[:] @@ -372,7 +374,6 @@ class IntegerField(Field): self.validators.append(validators.MaxValueValidator(max_value)) if min_value is not None: self.validators.append(validators.MinValueValidator(min_value)) - print self.__class__.__name__, self.validators def to_native(self, data): try: |
