Commit Graph

190 Commits

Author SHA1 Message Date
Andy Freeland
7d43f41e4a Remove 'Hold down "Control" ...' message from help_text
When getting the help_text from a field where `many=True`, Django
appends 'Hold down "Control", or "Command" on a Mac, to select more than
one.' to the help_text. This makes some sense in Django's ModelForms,
but no sense in the API.
2013-07-04 01:51:24 -04:00
David Sanders
fcaca73709 Pep8 lint 2013-06-11 16:10:25 -06:00
David Sanders
656897c2da Update ModelField to work with a broader range of fields
Add support for fields that use min and max value validators.
2013-06-11 16:09:32 -06:00
Tom Christie
40e09472d8 Never deepcopy validators. Closes #913 2013-06-06 08:56:39 +01:00
Tom Christie
b15a6ccef2 Serializer field 'default' argument may be a callable 2013-06-02 20:12:49 +01:00
Gustavo Andrés Angulo
de1cc5f8c1 Fix default field when is a simple callable function. 2013-05-29 11:45:54 -05:00
Tom Christie
fcaee6e580 Clean up OPTIONS implementation 2013-05-24 23:44:23 +01:00
Tom Christie
760e8642bd Merge branch 'issue-192-expose-fields-for-options' of https://github.com/grimborg/django-rest-framework into improved-options-support 2013-05-24 21:21:56 +01:00
Oscar Vilaplana
a1deb5eac7 simplified, moved field humanizing to Field. broken tests 2013-05-23 08:26:55 +02:00
Tom Christie
cdc3c37465 Merge and styling fixes 2013-05-21 12:01:56 +01:00
David Jones
c3fd7c6685 Updated SlugField to raise validation errors for invalid slugs 2013-05-20 13:04:38 +01:00
Oscar Vilaplana
e80488b619 Added min_length and max_length 2013-05-19 15:08:41 +02:00
Oscar Vilaplana
696c053f4f s/Single Character/String/ 2013-05-19 15:04:43 +02:00
Oscar Vilaplana
b915c1d4d8 Made field label optional in OPTIONS 2013-05-19 11:15:38 +02:00
Nikolaus Schlemm
c0f3a1c397 Integrated status quo of grimborg's awesome humanize_field() for exposing field metadata via OPTIONS :) 2013-05-19 09:25:02 +02:00
Nikolaus Schlemm
9454e23aa9 Merge branch 'master' of git://github.com/tomchristie/django-rest-framework into issue-192-expose-fields-for-options 2013-05-19 09:02:07 +02:00
Nikolaus Schlemm
843ae60237 Merge branch 'issue-192-expose-fields-for-options' of git://github.com/grimborg/django-rest-framework into issue-192-expose-fields-for-options
Conflicts:
	rest_framework/tests/fields.py
2013-05-18 18:34:21 +02:00
Oscar Vilaplana
fecadacab1 added tests for form 2013-05-18 18:27:53 +02:00
Oscar Vilaplana
4dffcb5d77 Added humanized field names and types 2013-05-18 18:10:17 +02:00
Ryan Kaskel
579f77ceaa Move function to compat. 2013-05-18 17:04:17 +01:00
Ryan Kaskel
33f702d306 Merge latest changes from master. 2013-05-18 16:26:17 +01:00
Ryan Kaskel
10e451a85a Handle Python 3 strings and lazy strings. 2013-05-18 16:21:18 +01:00
Markus Törnqvist
48c1b2233b Merge branch 'master' into mjtorn-master
Conflicts:
	rest_framework/serializers.py
	rest_framework/tests/serializer.py

Fixed conflicts
2013-05-18 18:13:31 +03:00
Stephan Groß
9f9cb97d65 Add TestCases for default field values 2013-05-18 16:24:54 +02:00
Ryan Kaskel
22874e441d Merge latest changes from master. 2013-05-18 14:17:50 +01:00
Tom Christie
6d425aa3be Merge pull request #831 from brianz/master
Allow nested fields to be missing
2013-05-18 04:36:00 -07:00
Pablo Recio
53a8004401 Merge branch 'master' into 725-blank-choice-dash
Conflicts:
	rest_framework/tests/fields.py
2013-05-18 12:51:40 +02:00
Pablo Recio
ab8bd566f9 Adding BLANK_CHOICE_DASH as a choice if the model's field isn't required 2013-05-18 12:41:52 +02:00
Tom Christie
a73c16b85f serializers.Field respects ordering on dicts if it exists. Closes #832 2013-05-18 11:27:48 +01:00
Markus Törnqvist
3691cd2ffd Use smart_text() instead of nonexistant smart_unicode() 2013-05-18 13:26:59 +03:00
Markus Törnqvist
85faebbb75 Merge branch 'mikee2185-master' into mjtorn-master
Conflicts:
	rest_framework/fields.py
	rest_framework/serializers.py
	rest_framework/tests/models.py
	rest_framework/tests/serializer.py

Fixed all the conflicts.
2013-05-18 13:24:36 +03:00
Brian Zambrano
24c9c455fe Allow for missing non-required nested objects.
Serializer fields which are themselves serializers should not be required.
Specifically, if a nested object is set to "required=False", it should be
possible to serialize the main object and have the sub-object set to None/null.
2013-05-13 14:41:12 -07:00
Tom Christie
b443560080 Fix DATETIME_FORMAT, DATE_FORMAT, TIME_FORMAT settings. Closes #798 2013-05-08 20:38:50 +01:00
Tom Christie
dc7b1d6430 2.2's PendingDeprecationWarnings now become DeprecationWarnings. 2.3's PendingDeprecationWarnings added. 2013-04-29 12:45:00 +01:00
Tom Christie
d985aec3c9 DecimalField 2013-04-26 13:59:06 +01:00
Tom Christie
95abe6e844 Cleanup docstrings 2013-04-25 12:47:34 +01:00
Stephan Groß
cac6697025 Return Decimal instance instead of string 2013-04-15 15:24:14 +02:00
Stephan Groß
9d80f01bce Fix init call 2013-04-15 15:15:55 +02:00
Stephan Groß
ad436d966f Add DecimalField support 2013-04-15 13:02:18 +02:00
Matteo Suppo
b5640bb778 Forcing translations of lazy translatable strings in Field to_native method 2013-03-23 14:18:55 +01:00
Tom Christie
8adde506e8 Default date/time fields now return python date/time objects again by default 2013-03-21 08:41:54 +00:00
Tom Christie
20fd738c85 iso formated datetime aware fields with +0000 offset should use 'Z' suffix instead 2013-03-20 13:05:59 +00:00
Tom Christie
a798a5350a Fix duplicated database queries for paginated lists.
Closes #713.
2013-03-13 11:42:12 +00:00
Tom Christie
ad336cc636 Fix broken None value for TimeField.
Refs #707.
2013-03-07 09:03:53 +00:00
Kevin Stone
2f8d8b499e Patched DateField and DateTimeField to check for None values before trying to perform date(time) conversion.
Signed-off-by: Kevin Stone <kevinastone@gmail.com>
2013-03-06 15:16:37 -08:00
Tom Christie
1106596c80 Clean ups to datetime formatting 2013-03-06 12:19:39 +00:00
Tom Christie
c20ebe95f6 Merge datetime formats 2013-03-05 17:50:28 +00:00
Stephan Groß
5e5cd6f7f7 Fix for django 1.3 compatibility 2013-03-01 17:15:39 +01:00
Stephan Groß
12905449a5 Add format class attributes 2013-03-01 16:59:47 +01:00
Stephan Groß
9c964cf37b Add new ISO8601 setting + integration 2013-03-01 16:50:18 +01:00