Kevin Wood
78e8b1b010
Updated CreateOnlyDefault to call set_context on its default (if callable)
2015-02-27 22:14:15 -08:00
Janusz Harkot
9098856d46
fix DictKey initial value
2015-02-27 19:46:36 +01:00
Tom Christie
cda74b5997
Merge pull request #2608 from ezheidtmann/dont-swallow-errors-in-callable-sources
...
Dont swallow errors in callable sources
2015-02-27 09:13:01 +00:00
Evan Heidtmann
e6b06c34c1
Add explanation for this exception mutation
2015-02-26 09:20:17 -08:00
Evan Heidtmann
bdb73d5588
Avoid swallowing exceptions thrown in callable attributes
2015-02-26 09:05:46 -08:00
Rense VanderHoek
91416632a8
DecimalField fix
...
max_value and min_value are not in kwargs
2015-02-21 12:31:37 +01:00
Rense VanderHoek
9cb547b85f
Validator-fix, added min/max fields to test_metadata
2015-02-20 17:34:49 +01:00
Rense VanderHoek
c8609ba652
Set field length/values as actual attributes.
...
The SimpleMetadata class in metadata.py tries to getattr() attributes
on a field. For this to work, max_length and min_length have to be
actually set as an attribute.
Did the same for min_value and max_value and added those two to
SimpleMetadata.get_field_info
2015-02-20 16:31:12 +01:00
Tom Christie
c3425accde
Fix incorrect HTML parsing for DictField
2015-02-11 14:19:07 +00:00
Tom Christie
dec3493d7c
Minor cleanup
2015-02-06 14:43:43 +00:00
José Padilla
7f801b9a01
Add trim_whitespace to CharField #2517
...
If set to `True` then leading and trailing
whitespace is trimmed. Defaults to `True`.
2015-02-06 01:09:19 -04:00
Tom Christie
4ee4b4f2dc
Merge master
2015-01-30 14:00:25 +00:00
Tom Christie
35f6a82462
Added DictField and support for HStoreField.
2015-01-23 16:27:23 +00:00
Tom Christie
e8db1834d3
Added UUIDField.
2015-01-23 15:24:06 +00:00
Tom Christie
11efde8905
Merge pull request #2373 from jakul/document-translations-3.1
...
Document how to translate DRF error messages (version 3.1)
2015-01-09 11:57:02 +00:00
Craig Blaszczyk
58ec7669ae
swap backticks for double quotes
2015-01-07 18:22:30 +00:00
Craig Blaszczyk
91e316f781
prefer single quotes in source and double quotes in user visible strings; add some missing full stops to user visible strings
2015-01-07 12:46:23 +00:00
Craig Blaszczyk
9a4267049b
use double quotes in user messages
2015-01-07 12:33:37 +00:00
Craig Blaszczyk
4c32083b8b
use double quotes for user visible strings; end user visible strings in full stops; add some missing translation tags
2015-01-07 12:01:11 +00:00
Tom Christie
b6ca7248eb
required=False allows omission of value for output. Closes #2342
2015-01-05 14:32:12 +00:00
Craig Blaszczyk
a90ba2bc11
update error messages for language and consistency
2015-01-02 11:08:31 +00:00
Tom Christie
77e3021fea
Better behaviour with null and '' for blank HTML fields.
2014-12-20 16:26:51 +00:00
Tom Christie
87ac64e41b
Fixes for behavior with empty HTML fields.
2014-12-18 10:36:52 +00:00
Tom Christie
3fff5cb6e0
Fix empty HTML values when a default is provided.
2014-12-17 15:13:48 +00:00
Tom Christie
af53e34dd5
Merge pull request #2279 from tomchristie/fix-serializer-repr-unicode-bug
...
Use unicode internally everywhere for 'repr'.
2014-12-15 12:04:46 +00:00
Tom Christie
72e08a3e8b
Use unicode internally everywhere for 'repr'
2014-12-15 11:55:17 +00:00
Tom Christie
488b13e7b8
Better messaging for 'Field.to_representation'. Closes #2271 .
2014-12-15 09:29:54 +00:00
Tom Christie
aa571abb20
Better errors when serializer has incorrectly named field.
2014-12-13 14:58:04 +00:00
Peter Schmidt
fa1ef33bfc
Update CharField default min_length message.
2014-12-12 11:16:29 +11:00
Tom Christie
81d0b748b4
Improve field lookup behavior for dicts/mappings. Closes #2244 . Closes #2243 .
2014-12-10 09:16:01 +00:00
José Padilla
afe7ed9333
Add allow_blank for ChoiceField #2184
...
This makes a ChoiceField optional in HTML if
model field has `blank=True` set.
2014-12-09 09:25:06 -04:00
Tom Christie
eee02a47d9
Added ListSerializer.validate(). Closes #2168 .
2014-12-08 14:56:45 +00:00
Tymur Maryokhin
d54c67d79d
Removed custom StringIO, force_text, smart_text compat
2014-12-04 03:11:42 +01:00
Tom Christie
d2d7e1dfde
Drop Field.validate
2014-11-27 16:41:53 +00:00
Tom Christie
8579222cbd
Fix for nested attribute lookups where one is a callable
2014-11-27 15:14:11 +00:00
Tom Christie
1ffe4857ec
Support callable attributes in dotted source. Closes #2142 .
2014-11-27 08:10:52 +00:00
Tom Christie
06fd63dade
Don't use default_empty_html value for partial updates. Closes #2118 .
2014-11-25 11:14:28 +00:00
Tom Christie
6794b3380a
Fixes for defaulting empty HTML fields to '', None, or empty.
2014-11-20 12:15:33 +00:00
Tom Christie
e49d22dbda
Allow blank choices to render. Closes #2071 .
2014-11-19 09:31:26 +00:00
Tom Christie
0f508c5821
Docs for advanced default argument usage. Closes #1945
2014-11-17 18:36:32 +00:00
Tom Christie
62ce653c61
Update fields.py
2014-11-10 14:44:26 +00:00
Tom Christie
eafb7e1e24
ModelField fix. Closes #2018 .
2014-11-07 11:44:16 +00:00
Tymur Maryokhin
ea76dc18b6
Fixed base_url duplication in FileField.use_url
...
Django already joins base_url when constructing FileField.url
2014-11-06 18:20:55 +01:00
Tom Christie
4e001dbb7a
Drop usage of SortedDict. Closes #2027 .
2014-11-06 12:00:30 +00:00
Tom Christie
ed541864e6
Support for bulk create. Closes #1965 .
2014-11-06 10:34:59 +00:00
Tom Christie
73daf40715
ModelField should support max_length. Closes #2018 .
2014-11-05 15:51:45 +00:00
Tom Christie
0a5d088287
Fix failing copy of fields when RegexValidator is used. Closes #1954 .
2014-11-05 10:48:30 +00:00
Tom Christie
26b6180f50
Support None if initial part of dotted lookup returns None. Closes #1223 .
2014-11-05 10:28:34 +00:00
Tom Christie
207208fedf
Lazy loading of fields and validators. Closes #1963 .
2014-10-31 16:38:39 +00:00
Tom Christie
bacf8cfa9d
Guard against malicious string inputs for numbers. Closes #1903 .
2014-10-31 15:41:00 +00:00