Commit Graph

3070 Commits

Author SHA1 Message Date
Mads Jensen
d4cdb21de9 Fixes #3786
Minor fix for dictionary key lookup in settings file
2016-01-06 22:51:11 +01:00
Kevin Massey
7cd3933144 Fixes #3804, avoiding update of Meta.extra_kwargs
Added unit test to cover.
2016-01-06 15:04:51 -05:00
Craig de Stigter
651319e2da Fix nested validation error being rendered incorrectly.
Previously an extra list wrapped nested validation errors raised from serializer's validate() methods.
That was inconsistent with the format of validation errors raised by validate_<fieldname> methods.
i.e. these two resulted in *different* behaviour:

    def validate_foo(self):
        raise ValidationError(['bar'])

    def validate(self):
        raise ValidationError({'foo': ['bar']})
2016-01-06 16:05:43 +13:00
Tom Christie
37f7b76f72 Merge pull request #3785 from sheppard/authtoken-import
don't import authtoken model until needed
2016-01-05 17:28:48 +00:00
S. Andrew Sheppard
1712c00001 update invalid token case 2016-01-05 09:42:22 -06:00
Xavier Ordoquy
dceb686700 Merge pull request #3774 from tomchristie/decimalfield_validators
Min/MaxValueValidator is no longer transferred from a model's DecimalField
2016-01-04 16:36:44 +01:00
Kevin Brown
a772326112 Merged two DecimalValidator tests together
These two tests were previously added in
7d79cf35b7
but we have now discovered that there are not actually two separate
cases, there was just a  bug in the code that made it look that way.

This also removes a redundant check to see if `DecimalValidator` was
defined.
2016-01-04 10:22:17 -05:00
S. Andrew Sheppard
ff29fdd875 don't import authtoken model until needed 2015-12-30 15:44:19 -06:00
Kevin Brown
87605e1e39 Don't filter out the DecimalValidator if it is not supported
Previously, all validators set on a DecimalField in Django would be
stripped when converted to a Django REST framework field. This was
because any validator that was an instance of `DecimalValidator` would
be removed, and when `DecimalValidator` wasn't supported (so it was
`None`), all validators would be removed.

This fixes the issue by only removing the `DecimalValidator` instances
if the `DecimalValidator` is supported.
2015-12-24 14:10:48 -05:00
Robert Romano
5fc938cbd1 The Internet Engineering Task Force approved the new HTTP status code 451. Adding to status.py and docs appropriately. 2015-12-23 12:54:17 -08:00
Michael Lissner
f15026be10 Fixes #3756, adding the name to the HTML title, if it exists. 2015-12-22 10:31:18 -08:00
Tom Christie
18cdfcd712 Merge pull request #3731 from mjparker777/master
Issue 3726 DateTimeField not handling empty values
2015-12-18 11:27:12 +00:00
Tom Christie
61e7f7b0cc Merge pull request #3715 from Cheglader/settings_errors
Raise error when setting a removed rest_framework setting for #3644
2015-12-18 11:19:06 +00:00
mjparker777
d9c360845d changed datefield to match code layout of datetime and time changes 2015-12-17 12:21:44 -07:00
mjparker777
f3d5e1482b Merge remote-tracking branch 'upstream/master' 2015-12-17 12:20:47 -07:00
Luis San Pablo
c389aeb051 Lint import ordring 2015-12-16 18:46:23 -06:00
Luis San Pablo
62e2a9706f Fixed import order settings 2015-12-16 18:37:50 -06:00
Luis San Pablo
dab6bf4b1a Changed error to warning message 2015-12-16 18:35:02 -06:00
Tom Linford
c78980771d AutoFilterSet should subclass from self.default_filter_set 2015-12-16 15:36:07 -08:00
Dan Lipsitt
fb94be18be docstring typo fix: DateAndFiles -> DataAndFiles 2015-12-16 10:42:10 -08:00
Xavier Ordoquy
ef8bde2d42 Bump version to 3.3.2 2015-12-14 07:33:17 +01:00
Xavier Ordoquy
485c297a04 Translations update. 2015-12-14 07:31:38 +01:00
mjparker777
decc5fa901 Merge remote-tracking branch 'upstream/master' 2015-12-13 17:51:06 -07:00
mjparker777
fc08236ab8 updated timefield also 2015-12-13 16:09:56 -07:00
mjparker777
bf60c08010 Issue 3726 DateTimeField not handling empty values 2015-12-13 12:21:13 -07:00
Luis San Pablo
fbd89d6b7e Moved SETTINGS_DOC 2015-12-12 02:02:53 -06:00
Xavier Ordoquy
7a5d81c0b4 Add extra args/kwargs to authtoken's views (#3718) 2015-12-11 07:16:04 +01:00
Raphael Merx
fcc0a70f7c Fixed suggestion for format in test renderer
Rendered would suggest using format='JSON' when the right argument is
format='json'.
2015-12-10 15:19:03 -08:00
Luis San Pablo
a615e37277 Removed depreceated constant 2015-12-07 23:30:45 -06:00
Luis San Pablo
5802dc0f98 Initial, fixes #3644 2015-12-07 23:25:40 -06:00
Luis San Pablo
0f85165b69 Fixed num args for % 2015-12-07 22:36:02 -06:00
Luis San Pablo
5117dad2ca removed setting typo 2015-12-07 22:32:23 -06:00
Luis San Pablo
13c66b9dfe Return error 2015-12-07 21:53:33 -06:00
Luis San Pablo
d86a901aff Removed Settings raise attribute error 2015-12-07 21:45:44 -06:00
knbk
e203967e09 Add app_name to rest_framework.urls.
This allows users in Django 1.9+ to include the authentication urls
without specifying the namespace, as in:

    urlpatterns = [
        ...
        url(r'^auth/', include('rest_framework.urls'))
    ]
2015-12-08 02:25:00 +01:00
Xavier Ordoquy
f3949e994d Update base translation file. 2015-12-07 18:56:47 +01:00
Tom Christie
c227b8188e Merge pull request #3705 from mcastle/patch-2
Admin and API browser fails for views without a filter_class
2015-12-07 10:10:24 +00:00
Marlon
c1b70538a2 Resolve #3596
Uses #3597, but without using `Context`.
2015-12-05 11:10:39 -06:00
Piotr Śniegowski
2faa7bc288 Add missing csrf_token in AdminRenderer post form. 2015-12-04 23:23:56 +01:00
Luis San Pablo
44a3d41ce9 Implement __getnewargs__ for #3628 2015-12-03 21:12:03 +00:00
bphillips
c153bcb479 Added validation to UUIDField to properly catch invalid input types (lists, tuples, etc). 2015-12-01 14:09:10 -05:00
José Padilla
d2f90fd6af Merge pull request #3662 from awwester/ticket_3228
#3228 - add confirm modal for delete
2015-12-01 10:50:34 -04:00
Adam Wester
6d1ed851b5 #3228 - add confirm modal for delete 2015-12-01 07:51:29 -05:00
Tom Christie
832d6322a7 Merge pull request #3631 from syphar/paginat
allow setting a custom Django Paginator class
2015-11-30 20:58:32 +00:00
Tom Christie
8dea1aeed0 Merge pull request #3677 from Ernest0x/patch-4
Updated NestedBoundField to also handle empty string when rendering its form
2015-11-27 13:21:58 +00:00
Tom Christie
0d0aff44ac Merge pull request #3668 from akx/exc-hiding
Reveal previously hidden AttributeErrors and TypeErrors
2015-11-27 11:51:25 +00:00
Aarni Koskela
69688289ce Ensure Django{Model,Object}Permissions don't hide exceptions.
Quietly catching `AttributeError` and `TypeError` when calling
`get_queryset()` is rather insidious, as those exceptions get caught no
matter where they might happen in the call stack.
2015-11-27 12:46:30 +02:00
Petros Moisiadis
570187b959 Updated NestedBoundField to also handle empty string when rendering its form
If a NestedBoundField field has a value of `None` and is inside another NestedBoundField field, it will have its value converted to an empty string while the form of its enclosing field is being rendered. So, NestedBoundField fields with an empty string value must be handled the same way as NestedBoundField fields with a `None` value.
2015-11-26 17:07:57 +02:00
Aarni Koskela
47c9bb143c Fix smart_repr() to also clean upper-case hex addresses.
Windows Pythons seem to like printing addresses in upper-case, while Linux
Pythons like lower-case hexes.

This led to an amusing (for a given value of "amusing", anyway) situation
where some repr tests would fail if the objects they were testing happened
to be allocated at an address with a hex digit in the range A..F.
2015-11-26 15:48:04 +02:00
Xavier Ordoquy
d6c326623f Make DRF compatible with multi template engine in Django 1.8 2015-11-25 07:37:01 +01:00
Steven Loria
b209fe04fc Fix typo in docstring for ReadOnlyField 2015-11-20 13:51:21 -05:00
Andrei Fokau
2acc6a756c Use related_objects api for Django 1.9+ 2015-11-19 13:04:37 +01:00
Tom Christie
378b7b8963 Merge pull request #3655 from andreif/fix/headers-order
Sort response headers in api renderer
2015-11-18 17:25:54 +00:00
Xavier Ordoquy
edc5a79b85 Merge pull request #3497 from Ins1ne/feature/3340
update docs about detail page link for AdminRenderer
2015-11-18 17:38:07 +01:00
Andrei Fokau
8692816401 Sort response headers in api renderer to keep the same order 2015-11-18 17:33:12 +01:00
Ryan Hiebert
a19f152065 Note possibility of overriding get_queryset 2015-11-18 10:26:00 -06:00
Andrei Fokau
802ee5d0ea Fix template.render deprecation warnings for 1.9+ 2015-11-18 17:06:35 +01:00
Ryan Hiebert
389b48e394 Avoid making a new module for this function 2015-11-18 08:19:27 -06:00
Tom Christie
04158e187e Merge pull request #3513 from pattisdr/feature/ListField_needs_to_enforce_list
ListField does not enforce that input is a list
2015-11-18 12:19:40 +00:00
Ryan Hiebert
dca2de3a5c Make the override check a utility function 2015-11-16 12:21:58 -06:00
Martin Hill
ff36cbe4ba same logic, more pythonic 2015-11-14 23:04:32 -05:00
Martin Hill
bac6f1fcf4 check if field.to_fields is None 2015-11-14 18:26:29 -05:00
Martin Hill
e475464945 fix for issue #3634 2015-11-14 17:00:07 -05:00
Ryan Hiebert
fe12816b82 Move default validation back into init method 2015-11-13 15:16:27 -06:00
Denis Cornehl
3806af3d15 allow setting a custom Django Paginator in pagination.PageNumberPagination 2015-11-13 16:04:12 +01:00
d6bels
82eb4c8d71 Login form autofocus 2015-11-11 10:51:20 +01:00
Michael J. Schultz
abc6fa05e6 Markdown 2.1 compatible 2015-11-09 11:47:00 -06:00
Ryan Hiebert
f2452936e9 Allow no queryset when get_queryset overridden
The user may wish to provide a dynamic queryset on a `RelatedField`
based on the `context`. The way to do that is to create a subclass of
`RelatedField` (or a child) and override the `get_queryset` method.
However, this is undocumented, and instantiating that field without a
`queryset` argument (because it's not needed) will raise an assertion
error.

Document `.get_queryset(self)` as an official part of the API of
`RelatedField`, and don't enforce the use of `queryset` when
`get_queryset` is overridden.
2015-11-05 17:34:02 -06:00
Michael J. Schultz
b2e74fb523 Use markdown 2.6 extension_configs to configure extension 2015-11-05 10:52:31 -06:00
Michael J. Schultz
d9d34e4886 Use full python dot path to extension 2015-11-05 10:48:19 -06:00
Michael J. Schultz
276bc3bc2b Remove safe_mode since it is not safe. 2015-11-05 10:47:56 -06:00
nfletton
f85ad301eb Fix regression causing raw data form to not display 2015-11-04 15:43:25 -07:00
Tom Christie
33b512b1f2 Version 3.3.1 2015-11-04 14:49:57 +00:00
Tom Christie
544c24e7cb Merge pull request #3593 from tomchristie/primary-key-check-for-to-field
Proper 'primary key' checking on to_fields.
2015-11-04 14:49:11 +00:00
Tom Christie
54b79db214 Proper 'is primary key' checking 2015-11-04 14:37:32 +00:00
Tom Christie
95f92e995c Merge pull request #3560 from ericholscher/fix-empty-filter
Allow HTML to render when no filter_class is defined.
2015-11-04 14:20:03 +00:00
Tom Christie
bfdf795843 Merge pull request #3592 from tomchristie/request-parsing-when-post-accessed
Request parsing when .POST accessed
2015-11-04 14:17:55 +00:00
Tom Christie
d587ad1021 Use REST framework request parsing when accessing old-style .POST 2015-11-04 14:10:51 +00:00
Xavier Ordoquy
ce491b3424 Merge pull request #3568 from jpadilla/decimal-validator
Add compat util for DecimalValidator
2015-10-30 12:54:08 +01:00
José Padilla
08e4a98822 Merge pull request #3564 from mcastle/patch-1
Fix trans template tag error on admin
2015-10-30 06:29:25 -04:00
JocelynDelalande
3b25207099 typo 2015-10-29 16:20:44 +01:00
José Padilla
41d1e42e9c Add compat util for DecimalValidator 2015-10-29 06:42:16 -04:00
Marlon
3c6ce9dfc0 Fix trans template tag error
Trans template tag requires `{% load i18n %}` at top of template.
2015-10-28 22:47:52 -05:00
Eric Holscher
32bd1a2f0b Use better names for filter variable 2015-10-28 14:36:24 -07:00
Eric Holscher
378d6a1a19 Allow HTML to render when no filter_class is defined.
Previously it required a filter_class,
or else it would error when calling `cls()`.
This now sets the `filter` context to `None`
if one does not exist.

Fixes #3559
2015-10-28 12:39:20 -07:00
Rense VanderHoek
0d568ed59f format_html was missing in optional_logout template-tag
The new format_html() was still missing in optional_logout template-tag
at the NoReverseMatch exception.
2015-10-28 18:48:58 +01:00
José Padilla
b8c9c809ff Merge pull request #3547 from nikolas/bootstrap-3.3.5
Update bootstrap from 3.2.0 to 3.3.5
2015-10-28 09:42:01 -04:00
Tom Christie
bb555e6e5e Version 3.3.0 2015-10-28 11:32:15 +00:00
Tom Christie
fa6f053323 Merge pull request #3544 from dursk/nested-as-form-fields
Correctly handle False in NestedBoundField.as_form_field()
2015-10-27 16:55:36 +00:00
Nik Nyby
8c6ded38de Update bootstrap from 3.2.0 to 3.3.5 2015-10-26 10:40:59 -04:00
José Padilla
21cad8646a Use format_html in tags that generate HTML 2015-10-25 08:31:28 -04:00
Matthew Madurski
8aed3d4862 Correctly handle false in nested as_form_field 2015-10-24 19:48:17 -04:00
Tom Christie
84e9013417 Merge pull request #3531 from tomchristie/version-3.3
Version 3.3
2015-10-23 16:24:08 +01:00
Tom Christie
0fb1ebcfcf Remove unused import 2015-10-23 16:07:48 +01:00
José Padilla
d64bfef56a Map all supported FilePathField options 2015-10-23 10:08:29 -04:00
auvipy
fa93d79026 removed south_migrations directory 2015-10-23 10:00:01 -04:00
auvipy
b71e6b596f removed south migrations 2015-10-23 10:00:00 -04:00
Tom Christie
cf33008571 Release notes etc 2015-10-22 14:05:52 +01:00
Tom Christie
c53c9eddfe Merge pull request #3315 from tomchristie/filters
First pass at HTML rendering for filters
2015-10-22 11:42:35 +01:00
Tom Christie
0c6d46729c Docs on the filter HTML interface 2015-10-22 11:37:27 +01:00
Tom Christie
6305ae8916 Merge pull request #3475 from tomchristie/forms-api
Forms API
2015-10-22 09:59:57 +01:00
likeon
322bda8159 Added support for the to_field on ForeignKey fields 2015-10-21 15:33:18 +03:00
Dawn Pattison
8fa7c5c914 Exclude collections.Mapping from allowable data types in ListField 2015-10-20 08:56:39 -04:00
Tom Christie
34eb18b498 Merge branch 'master' into filters
Conflicts:
	rest_framework/compat.py
	rest_framework/filters.py
2015-10-19 13:14:42 +01:00
Omer Katz
2e178bc970 Replaced all dict and set conversions from lists to dict and set literals. 2015-10-17 12:00:11 +03:00
Dawn Pattison
dac1637bb3 Use set instead of Set 2015-10-16 16:06:18 -04:00
Dawn Pattison
b9316154b1 Add tuple and Set to allowed ListField data types 2015-10-16 16:02:13 -04:00
Dawn Pattison
f808f08a0d Require that data is a list. 2015-10-16 14:43:43 -04:00
José Padilla
a1dad503cf Map TextField max_length to CharField 2015-10-16 07:17:33 -04:00
Xavier Ordoquy
1b4a41cb80 Merge pull request #3502 from auvipy/master
removed south migrations
2015-10-15 10:41:07 +02:00
auvipy
4db2501399 removed south_migrations directory 2015-10-15 14:17:56 +06:00
auvipy
392df94693 removed south migrations 2015-10-15 14:16:35 +06:00
Aider Ibragimov
79008ea210 fix typo for adding jquery string in AdminRenderer 2015-10-14 15:56:26 +03:00
Aider Ibragimov
5342f22009 return typo back for new pr, update docs 2015-10-14 15:54:43 +03:00
Aider Ibragimov
b19865f88d fix typo in adding jquery string, update docs about detail page link for AdminRenderer 2015-10-14 15:14:35 +03:00
Tom Christie
90247afe29 Docs on Forms API 2015-10-12 21:14:58 +01:00
Dulmandakh
431ac45168 Update compat.py
try to import guardian if it's in INSTALLED_APPS
2015-10-09 11:03:19 +08:00
Tom Christie
41182c6f06 Formns API 2015-10-06 10:58:20 +01:00
Marlon
670b0b710b Use serializers.ValidationError
Per django rest framework docs, and to prevent confusion with Django's ValidationError, `serializers.ValidationError` is preferred to `exceptions.ValidationError`.
2015-09-30 21:09:37 -05:00
Philippe Ombredanne
3262ee6c90 Fixed minor doc typo. 2015-09-29 21:59:09 +02:00
Tom Christie
265ec8ac62 Handle binary or unicode with JSONField 2015-09-28 17:47:51 +01:00
Tom Christie
ec8098b7e2 Work around 2.x/3.x json.dumps() return type fuzziness 2015-09-28 17:32:36 +01:00
Tom Christie
10dbf1316f Added JSONField. Closes #3170. 2015-09-28 17:25:52 +01:00
Tom Christie
bae47b7f36 Merge pull request #3453 from tomchristie/remove-content-overriding
Remove content overriding
2015-09-28 16:42:42 +01:00
Tom Christie
c64896c849 More cleanup of browser overrides 2015-09-28 15:33:55 +01:00
Tom Christie
d7142e23ac Merge branch 'master' into remove-content-overriding 2015-09-28 15:15:50 +01:00
Tom Christie
02e1f69d2b Django 1.9 support 2015-09-28 11:44:07 +01:00
Tom Christie
2d0b54e263 Merge branch 'drop-django-16' oft https://github.com/carltongibson/django-rest-framework into carltongibson-drop-django-16
Conflicts:
	docs/topics/release-notes.md
2015-09-28 11:17:48 +01:00
Tom Christie
ca8313aeac Merge branch 'master' into version-3.3
Conflicts:
	docs/topics/release-notes.md
2015-09-28 10:57:14 +01:00
Tom Christie
6284bceaaf Merge pull request #3363 from tomchristie/dont-access-settings-on-import
Access settings lazily, not at module import.
2015-09-24 15:42:31 +01:00
Stian Jensen
62c000bc12 Use model error_messages when available
In the automatically applied UniqueValidator, use the error message from
error_messages defined in the model instead of the generic default
UniqueValidator message.

This fixes #2878.
2015-09-23 15:20:44 +02:00
Tom Christie
51443166a8 Merge pull request #3431 from paolopaolopaolo/issue-3265
Guard against calling `serializer.data` before `serializer.save()`
2015-09-23 09:51:54 +01:00
paolopaolopaolo
7640bfea9e Add assert statement to .save() method in Serializer:
- Asserts that `_data` does not exist when calling `.save()`
2015-09-22 11:49:51 -07:00
Carlton Gibson
45ace5010e Remove OrderedDict fallback 2015-09-22 16:35:38 +02:00
Carlton Gibson
0b34408172 Remove unittest.skipUnless 2015-09-22 16:24:22 +02:00
Carlton Gibson
6e86a53c92 Remove apps.get_model fallback
* Corrects presumed logic error in `ResolveModelWithPatchedDjangoTests`
2015-09-22 16:14:45 +02:00
Carlton Gibson
68c88e180f Remove ContentType import fallback 2015-09-22 15:55:39 +02:00
Carlton Gibson
8ea1606abf Remove Django 1.5 clean_manytomany_helptext fallback 2015-09-21 20:16:52 +02:00
Carlton Gibson
25de8c960f Remove Django 1.5 get_model_name fallback 2015-09-21 20:10:31 +02:00
Carlton Gibson
4a1ab3c18c Fix isort errors 2015-09-21 16:29:33 +02:00
Carlton Gibson
e625cff8a5 Remove Django 1.5 URLValidator fallback 2015-09-21 16:22:46 +02:00
Carlton Gibson
9216dc9a25 Remove Django 1.5 EmailValidator fallback 2015-09-21 16:20:07 +02:00
Xavier Ordoquy
26715c2dae Merge remote-tracking branch 'origin/master' into release/3.2.4 2015-09-21 13:25:49 +02:00
Xavier Ordoquy
f2c65512c6 Merge pull request #3415 from adamsc64/issue_2761
Fixed #2761 - ListField truncation on HTTP PATCH
2015-09-21 13:06:44 +02:00
Xavier Ordoquy
089b8af4c1 Update the translations. 2015-09-21 08:07:56 +02:00
Xavier Ordoquy
d0510438b2 Bump version to 3.2.4. 2015-09-20 22:04:25 +02:00
Xavier Ordoquy
df26614e85 Translation update. 2015-09-20 21:59:47 +02:00
Christopher Adams
9ccfc94077 Fixed #2761 - ListField truncation on HTTP PATCH
- Checked ``partial`` state when getting value in appropriate field
  classes; return ``empty`` immediately if key not submitted.
2015-09-19 10:18:04 -04:00
Tom Christie
eec1156f63 AJAX forms in admin interface 2015-09-17 16:53:28 +01:00
Tom Christie
343fd5ec3d Merge branch 'canassa-method-not-allowed-not-raised' into remove-content-overriding 2015-09-17 16:39:30 +01:00
Tom Christie
4b4130e8b2 Fix request cloning, so method becomes set 2015-09-17 16:34:03 +01:00
Tom Christie
a3067bea55 Merge branch 'master' into version-3.3 2015-09-17 16:24:46 +01:00
Tom Christie
566812ac0b Remove method and content overriding 2015-09-17 15:17:29 +01:00
Steven Loria
284f9faa07 Correctly handle [] and {} as invalid inputs to BooleanField 2015-09-11 23:12:18 -04:00
Xavier Ordoquy
4404d40f60 Only pass allow_empty to the ListSerializer if it was in the arguments.
Helps with backward compatibility.
2015-09-06 23:02:44 +02:00
Tom Christie
f9e53091c1 Drop handling of ImproperlyConfigured 2015-09-03 16:40:12 +01:00
Tom Christie
8b7ebb9d2c Fixed import sorting 2015-09-03 16:29:13 +01:00
Xavier Ordoquy
dcdd765647 Avoid passing allow_empty to the ListSerializer children. 2015-09-03 17:27:33 +02:00
Tom Christie
10da18b20b Access settings lazily, not at module import 2015-09-03 16:24:13 +01:00
Tom Christie
39ec564ae9 Do not access settings on compat import 2015-09-03 14:22:13 +01:00
Tom Christie
e9e88cbc60 Merge branch 'master' of github.com:tomchristie/django-rest-framework 2015-09-03 11:24:07 +01:00
Tom Christie
f9d1a34fdd Fix nested HTML dictionaries. Closes #3314. 2015-09-03 11:23:58 +01:00
Tom Christie
afd2a8f8f0 Adjust ModelField.null mappings now that Django-25320 is resolved 2015-09-03 10:12:52 +01:00
raphaelmerx
b9782b6850 DurationField accepts integers 2015-09-02 16:47:50 -07:00
Tom Christie
f87573ffa3 Merge pull request #3345 from jpadilla/fields
Update ModelSerializer 'fields'/'exclude'/'__all__' behavior
2015-08-28 14:57:05 +01:00
Tom Christie
f34777a2e9 Translations for HTML filters 2015-08-28 14:55:22 +01:00
Tom Christie
78632849cf Comment against model_field.null 1.98 behavior 2015-08-28 13:29:57 +01:00
Tom Christie
8db6367188 Deal with 1.9's differing null behavior on reverse relationships and m2m 2015-08-28 12:08:32 +01:00
Tom Christie
b51c1ff0b0 Django 1.9's test case HttpResponse.json() is not cachable. 2015-08-28 11:55:23 +01:00
Tom Christie
a5ddd90df0 Log in and log out require escape and mark_safe 2015-08-28 10:27:49 +01:00
Tom Christie
24a2c3f5c3 Resolve unittest compat 2015-08-28 10:19:18 +01:00
Tom Christie
e70da5ac6b Compat for GenericForeignKey, GenericRelation 2015-08-28 10:03:08 +01:00
José Padilla
654e0e4527 Update ModelSerializer fields behavior 2015-08-27 13:09:08 -04:00
Tom Christie
4f27697467 Fix get_model import 2015-08-27 17:28:12 +01:00
Tom Christie
48540f180a unittest compat fallback 2015-08-27 17:11:53 +01:00
Tom Christie
0b77e733a8 Don't display filter control on detail views 2015-08-27 14:35:39 +01:00
Tom Christie
9bcb1477e2 Minor tweaks 2015-08-27 14:28:28 +01:00
Tom Christie
aeb57913c9 Filter HTML refinments 2015-08-27 14:25:44 +01:00
Tom Christie
ea630bf3d1 Merge branch 'master' into filters 2015-08-27 14:02:15 +01:00
Rikuoja
65df9fd5c6 Fix #3323 2015-08-24 17:02:49 +03:00
Tom Christie
0198bce34f Release 3.2.3 2015-08-24 10:59:52 +01:00
Tom Christie
b271946b31 Merge pull request #3321 from tomchristie/empty-charfield-html
Resolve empty HTML charfield behavior.
2015-08-24 10:41:36 +01:00
Tom Christie
9ac646385f Resolve empty HTML charfield behavior. Closes #3318. 2015-08-24 10:13:16 +01:00
Tom Christie
5db900c625 First pass at HTML rendering for filters 2015-08-21 16:13:52 +01:00
borzdyko
314daaedfa Using https://docs.djangoproject.com/en/1.8/ref/models/querysets/#regex for search filter by starting field with '$' 2015-08-21 18:13:13 +03:00
Tom Christie
c271568bf5 Remove erronous checkin 2015-08-21 10:57:46 +01:00
Tom Christie
314c0095aa iter_options function should have no cutoff by deault 2015-08-21 10:56:22 +01:00
Tom Christie
99beeb80e1 No cutoff for default ChoiceField, only for relationships 2015-08-21 10:53:10 +01:00
Tom Christie
f4412d0827 Docs for select cutoffs 2015-08-21 10:52:44 +01:00
Tom Christie
b6c4d8c25a Resolve duplicate error for IPAddressField. Closes #3250. 2015-08-20 12:38:48 +01:00
Tom Christie
75be91912c Allow AdminRenderer to function when pagination is disabled. Closes #3275. 2015-08-20 12:28:00 +01:00
Tom Christie
d86fd67895 Fix display of select multiple HTML fields. Closes #3290. 2015-08-20 12:11:14 +01:00
Tom Christie
b4b2dc18fa Clean-up refactoring of SearchFilter implementation 2015-08-20 11:35:32 +01:00
Tom Christie
aa4cd7e9d7 Guard against LimitOffsetPagination edge case. Closes #3303. 2015-08-20 10:12:52 +01:00
José Padilla
8af366a732 Raise error when source= use on a child.
Closes #3292
2015-08-19 12:32:16 -04:00
Omer Katz
792005806b Cached the field's root and context property. 2015-08-18 12:38:13 +03:00
Ollie Walsh
332c30afb9 Lint 2015-08-14 12:20:25 +01:00
Ollie Walsh
3d0292e1cd Do not ignore overridden View.get_view_name() in breadcrumbs 2015-08-14 12:16:57 +01:00
Tom Christie
1b53e804ee 3.2.2 Release 2015-08-13 10:23:22 +01:00
Tom Christie
0e6c467851 Merge pull request #3263 from jgadelange/master
Resolved issue with rendering of nested serializers form when value is None
2015-08-13 10:16:19 +01:00
Tom Christie
18af181191 Fix boolean checkboxes setting to False. Closes #3258. Closes #2776. 2015-08-13 09:56:03 +01:00
Jeffrey de Lange
f5a9904cc8 Resolved issue with rendering of nested serializers form when value is None 2015-08-11 20:27:41 +02:00
Tom Christie
a3e64fbe0d Resolve issue with rendering nested serializer forms with empty values. Closes #3260. 2015-08-11 16:25:02 +01:00
Tom Christie
0df99a6c95 Fix erronous request.files docs, and incorrect request.FILES behavior. Closes #3261. 2015-08-11 16:21:02 +01:00
Tom Christie
b7e47e3d67 Merge branch 'master' of github.com:tomchristie/django-rest-framework 2015-08-11 09:24:16 +01:00
Tom Christie
83e49dbe63 Fix checkbox input display. Refs #3258. 2015-08-11 09:23:49 +01:00
Tom Christie
4509dbc24e Merge pull request #3241 from jpadilla/master
Raise error if passed a serializer instance
2015-08-10 17:41:01 +01:00
James Beith
5c0a2b79b3 Remove converting a string in to a string
The `display_value` method returns a text type.
2015-08-10 15:33:04 +01:00
James Beith
2f6e5d0509 Add display value method
Returns the text representation of the instance. Subclasses can override this method to provide a different display value used for populating the `choices` property.
2015-08-10 11:03:57 +01:00
José Padilla
7a0416c50b Raise error if passed a serializer instance 2015-08-07 13:12:37 -04:00
Tom Christie
0cbfbc27d8 Tweak erronous assignment 2015-08-07 15:41:46 +01:00
Tom Christie
3ea394dbff Version 3.2.1 2015-08-07 14:55:18 +01:00
Tom Christie
368fb9fb2a Merge pull request #3238 from kezabelle/bugfix/3235
Fixed #3235 - ListField now returns the QueryDict value even if it's a list of only one item.
2015-08-07 14:44:32 +01:00
Tom Christie
65e1c938eb Fix for 1, 0 being rendered as true, false in the admin. Closes #3227. 2015-08-07 14:38:36 +01:00
Tom Christie
e63dcab8b3 Fix for rendering select templates on relationships 2015-08-07 14:36:00 +01:00
Tom Christie
88609ba3a3 Merge branch 'master' of github.com:tomchristie/django-rest-framework 2015-08-07 14:24:37 +01:00
Tom Christie
19c1976fcc Leave requests.FILES alone, for compat with regular Django requests. Closes #3239. 2015-08-07 14:24:28 +01:00
Keryn Knight
0078f66104 Fixed #3235 - A querydict which yields a list with only one value now correctly returns the provided data. 2015-08-07 11:43:17 +01:00
Tymur Maryokhin
4e5da16961 Remove Django 1.4 compat code 2015-08-07 00:02:29 +02:00
Tom Christie
67ddd54a89 Merge pull request #3226 from tomchristie/version-3.2
Version 3.2
2015-08-06 14:30:46 +01:00
Tom Christie
b4f1a8a367 Update translations 2015-08-06 13:22:53 +01:00
Tom Christie
78053c7e6c Upgrade version to 3.2.0 2015-08-06 13:18:51 +01:00
Tom Christie
24dec32e7a Added test_iter_options 2015-08-06 12:18:09 +01:00
Tom Christie
4d69286efa Use same structure for both .choices and .grouped_choices 2015-08-06 12:03:38 +01:00
Tom Christie
a6fefe78ff Added docstring 2015-08-06 11:44:39 +01:00
Tom Christie
27ac5a3680 Support grouped choices 2015-08-06 11:43:03 +01:00
Tom Christie
95a1550388 Merge branch 'grouped-choices-fix' of https://github.com/maxpeterson/django-rest-framework into maxpeterson-grouped-choices-fix 2015-08-06 10:04:52 +01:00
Tom Christie
38a1b3ec6b Rationalize decimal logic. Closes #3222. 2015-08-06 09:51:00 +01:00
Tom Christie
f7d44dfae0 Loud errors on request.DATA et al. 2015-08-05 17:07:47 +01:00
Tom Christie
6942fa5dab Mask view docstring on 401 and 403 responses. Closes #3216. 2015-08-05 13:59:55 +01:00
Tom Christie
6161ac7d07 Fix parse_html_dict signature. Closes #3212. 2015-08-05 13:45:56 +01:00
Tom Christie
7b51508600 Error on double underscore ordering with CursorPagination. Refs #3221. 2015-08-05 13:42:44 +01:00
Tom Christie
bf35906dc0 FilePathField subclassing from ChoiceField 2015-08-03 10:17:41 +01:00
Tom Christie
877e964d7e Don't need to support Django 1.4 with FilePathField. 2015-08-03 10:15:28 +01:00
Tom Christie
8d7c0a8474 Merge branch 'feature/filepathfield' of https://github.com/Ins1ne/django-rest-framework into Ins1ne-feature/filepathfield 2015-08-03 10:09:46 +01:00
Tom Christie
650866cc43 Blank relational fields map to required=False serializer fields. Closes #3210. 2015-08-03 09:48:03 +01:00
Tom Christie
472784b70a Docs for custom hyperlinked fields. 2015-08-03 09:27:03 +01:00
Tom Christie
a543fae180 Merge pull request #2766 from delinhabit/allow-null-list-serializer
Modify subtle ChildSerializer(many=True, allow_null=True) behavior.
2015-07-31 10:11:21 +01:00
Tom Christie
e68d737825 Respect blank on many to many, and set allow_empty=False if it is not present. Closes #2804. 2015-07-30 17:03:08 +01:00
Tom Christie
ed3f9593af Merge branch 'version-3.2' into remove-url-from-future 2015-07-30 16:02:40 +01:00
Tom Christie
1b3b01e042 Remove unused imports 2015-07-30 15:59:27 +01:00
Tom Christie
c8ad0cce19 Bump minimum Django version to 1.5 2015-07-30 15:43:39 +01:00
Tom Christie
c203ca4c64 Deprecations 2015-07-30 15:26:42 +01:00
Tom Christie
5b39d820be Remove 'load url from future' tags in templates. 2015-07-30 15:14:02 +01:00
Tom Christie
1f55bc747b Merge pull request #2926 from tomchristie/admin-style
Admin style renderer
2015-07-30 15:01:37 +01:00
Tom Christie
79b825ef32 Drop unused import 2015-07-30 14:38:04 +01:00
Tom Christie
5c1d6a9200 Docs for AdminRenderer 2015-07-30 14:07:51 +01:00
Hachikooking
d2ae7d4fcd Add args to the function call for unnamed parameters 2015-07-29 14:43:25 +02:00
clemence.lop
2109f55244 Correct API ROOT to enable parametered urls 2015-07-28 15:55:49 +02:00
Tom Christie
6e3ba202af Merge pull request #2690 from delinhabit/hyperlinked-relation-callable-source
Support source='some_method' for HyperlinkedRelatedField.
2015-07-27 16:19:48 +01:00
Ion Scerbatiuc
d4353cc1fd Moved the code comment inside the if block and removed whitespace 2015-07-27 07:57:05 -07:00
Ion Scerbatiuc
0386a01673 Addressed CR comments 2015-07-27 07:45:35 -07:00
Tom Christie
402fb39396 HStoreField maps to ListField(CharField(allow_blank=True). Closes #2659. 2015-07-27 13:18:49 +01:00
Tom Christie
f1e2135b04 Restyle horizontal checkbox. Closes #2783. 2015-07-27 13:11:24 +01:00
Tom Christie
798cd1a637 Fix for DjangoObjectPermissionsFilter with Guardian < 1.3 2015-07-27 10:20:37 +01:00
Ion Scerbatiuc
47a22a55ca Added a possible fix 2015-07-25 09:44:00 -07:00
Ion Scerbatiuc
bf25a6ecbc Test case for using allow_null with many=True and a fix for it 2015-07-25 08:10:15 -07:00
Tom Christie
bdeb28944f Use RuntimeError, not AssertionError when guarding against direct View.queryset evalutation. Refs #3180. 2015-07-24 09:13:39 +01:00
Tom Christie
108dfafa44 Fix Django 1.5/1.4 compat issue 2015-07-24 09:02:16 +01:00
Tom Christie
c0e3e670ca Fix Django compat for Queryset import 2015-07-23 17:43:49 +01:00
Tom Christie
e05021c8c6 Guard against erronous direct .queryset evaluation in CBVs. 2015-07-23 17:17:18 +01:00
Tom Christie
4c1597efe0 Error modals 2015-07-23 16:16:48 +01:00
Tom Christie
b996266431 Merge master 2015-07-23 15:28:29 +01:00
Tom Christie
92008d3d16 None -> '' in the context of form field values 2015-07-23 14:36:23 +01:00
Tom Christie
90fe0fb881 Errors in browsable API on error. Closes #3024. 2015-07-23 14:31:25 +01:00
Tom Christie
22631c73a7 Resolve assertion error with LimitOffsetPagination and erronous parameters. Closes #2920. 2015-07-23 12:41:35 +01:00
Aider Ibragimov
205f388631 fix import sort order 2015-07-19 01:32:51 +03:00
Aider Ibragimov
c4f1c98572 fix lint issues 2015-07-19 01:22:57 +03:00
Aider Ibragimov
a1397ac699 fix bugs, move version branching to compat, update ModelSerializer mapping 2015-07-19 00:26:03 +03:00
Aider Ibragimov
d845157983 Merge branch 'master' of https://github.com/tomchristie/django-rest-framework into feature/filepathfield 2015-07-18 23:34:07 +03:00
Tom Christie
85cc8e9f1a Merge pull request #3168 from tomchristie/error-on-erronous-commit-argument
Helpful error on erronous 'serializer.save(commit=False)'
2015-07-17 12:50:06 +01:00
Tom Christie
138e9fcc8f Helpful error on erronous 'serializer.save(commit=False)' 2015-07-17 12:39:22 +01:00
Tom Christie
788aae2aaf Upgrade guardian support to 1.3. Closes #3163. 2015-07-16 16:46:07 +01:00
Tom Christie
0ccb148183 Support QueryDict list arguments with ListField. Closes #3155. 2015-07-16 15:59:15 +01:00
Tom Christie
e14391e041 Fix for ModelSerializer ChoiceField with nonstandard args. Closes #3126. 2015-07-16 15:46:27 +01:00
Tom Christie
713333d354 Merge branch 'master' of github.com:tomchristie/django-rest-framework 2015-07-16 15:17:27 +01:00
Tom Christie
806b0b34da Include nested objects in metadata for OPTIONS. Closes #3156. Closes #2915. 2015-07-16 15:17:18 +01:00
Tom Christie
264d423493 Added allow_empty flag for ListField, ListSerializer, ManyRelation, MultipleChoiceField. 2015-07-16 13:51:15 +01:00
Tom Christie
a8acdbc388 Resolve issue with nested serializers in HTML forms. Closes #3153. 2015-07-16 12:04:38 +01:00
Tom Christie
d231f36588 Support default values being used for empty HTML fields. Closes #3130. 2015-07-16 11:47:40 +01:00
Tom Christie
7315ed8b00 Resolve browsable API form issues with nested serializers. Closes #3153. 2015-07-16 10:49:00 +01:00
Tom Christie
c879aaf398 page_size needs to be stored as state on CursorPagination. Refs 3147. 2015-07-16 10:26:16 +01:00
Tom Christie
a9f1d99cb5 Fix 'metadata' action on viewsets. Closes #3158. Closes #3157. Closes #3115. 2015-07-16 10:08:22 +01:00
Tom Christie
6b08e97b6a Form fields should use textual only value representations. Closes #3139. Closes #2416. Closes #2558. 2015-07-14 15:47:13 +01:00
Tom Christie
132eab7bbd Raise helpful error when erronously including nested data in multipart post requests with test client. Closes #2919. 2015-07-14 14:49:44 +01:00
Tom Christie
c14ad7add7 Handle .choices for related fields when queryset argument is actually a mamanger instance. Closes #3145. 2015-07-14 13:31:24 +01:00
Tom Christie
1b51bcdbae Merge branch 'master' of github.com:tomchristie/django-rest-framework 2015-07-14 13:21:20 +01:00
Tom Christie
bca2ea35df Ensure that realtionship fields '.choices' returns an empty dict when accessed with a read-only field. Closes #2910. 2015-07-14 13:21:08 +01:00
Tom Christie
9c952dcfe9 Merge pull request #3147 from tomchristie/uploadcare-cursor-limits
Add `get_page_size` hook to `CursorPagination`
2015-07-14 12:44:13 +01:00
Tom Christie
468361425d page_size should be local, not overwriting class attribute. 2015-07-14 12:32:27 +01:00
Tom Christie
3c57e08f62 Clarifications to read_only fields. Closes #3064. 2015-07-14 12:22:51 +01:00
Tom Christie
2b51d5594b Remove whitespace and comment changes 2015-07-14 11:41:25 +01:00
Tom Christie
14a32ae32d Add get_page_size hook to CursorPagination. Closes #3068. 2015-07-14 11:40:15 +01:00
Tom Christie
1d012aeb93 Merge branch 'cursor-limits' of https://github.com/uploadcare/django-rest-framework into uploadcare-cursor-limits 2015-07-14 11:37:18 +01:00
Tom Christie
209bcb9087 Added url_field_name class attribute to ModelSerializer. Closes #3106. 2015-07-14 11:21:33 +01:00
Tom Christie
538ffaf6c7 Store self.action='metadata' for OPTIONS requests on viewsets. Closes #3115. 2015-07-14 11:13:26 +01:00
homm
a3afcfb6d3 duplicate get_page_size and related properties from PageNumberPagination 2015-07-13 14:44:48 +03:00
homm
59905e9335 revert BasePageSizePagination class and CursorPagination inheritance 2015-07-13 14:36:47 +03:00
Juan Gutierrez
b0c5f9db2f allow a non-required nested serializer to validate correctly when receiving multipart data 2015-07-03 12:28:48 -04:00
Max Peterson
ee2afb83e2 Fix 1.4 tests and make flatten_choice a utility. 2015-07-03 13:56:49 +01:00
Max Peterson
56b3f19605 Add support for grouped choices.
This also adds support for mixing single and paired choices:
```
[
    ('poor', 'Poor quality'),
    'medium',
    ('good', 'Good quality'),
]
```
2015-07-03 12:27:01 +01:00
Julien Syx
2b979d4356 Adding recursion on child of List Field 2015-07-02 14:15:43 +02:00
Tom Christie
8d69c4c068 Improve OPTIONS descriptions for lists dicts and nested serializers 2015-07-02 12:55:42 +01:00
Tom Christie
e6ca0fcb4c Remove erronous newline 2015-07-02 11:53:05 +01:00
Tom Christie
37815920e3 Update to master and tweak remaining issues 2015-07-02 11:50:40 +01:00
Tom Christie
055986b5b0 More helpful exception when URL cannot reverse and field value was empty. Closes #2698. 2015-07-02 11:36:14 +01:00
Tom Christie
c4f908d4ee Introduce datetime_parser as class level attribute on all date/time fields. Refs #3093. 2015-07-02 11:23:52 +01:00
Tom Christie
6ce9e3baf0 Remove datetime_parser argument from DateTimeField 2015-07-02 11:22:18 +01:00
Tom Christie
6d79ea2cde Merge pull request #3093 from sorreltree/master
Ability to customize DateTimeField with a custom datetime_parser
2015-07-02 11:21:25 +01:00
Tom Christie
fb4233736f Empty settings should also be coerced to lists. Closes #3087. 2015-07-02 10:28:46 +01:00
Tom Christie
d979dc6522 Tweak exception message 2015-07-02 10:16:43 +01:00
Tom Christie
e3c3d8826f Merge pull request #3071 from antonyc/patch-1
Made exception message more verbose
2015-07-02 10:14:01 +01:00
Tom Christie
39ed03c21c Merge pull request #3088 from atleta/master
Handle AttributeError as well (when the imported module exists but the specified function/class does not).
2015-07-02 09:52:53 +01:00
Tyler Redzko
af08c70242 Update extra_kwargs on model serializer
Ensures that the 'read_only' and 'required' keys from `extra_kwargs` are
retained when present. Closes #3091.
2015-07-01 10:10:18 -04:00
Michael Bacon
5f40ab53de Ability to customize DateTimeField with a custom datetime_parser 2015-06-30 14:51:47 -04:00
Laszlo Marai
f0bced6413 Handle AttributeError as well (when the imported module exists but
the specified function/class does not).
2015-06-30 05:49:44 +02:00
Venelin Stoykov
c3c9a712fa Fix ManyRelatedField.choices
Use choices from self.child_relation. 
We don't need to repeat ourself because can get out of sync.
2015-06-29 15:35:55 +03:00
José Padilla
7351a3f6ca Sort imports with isort 2015-06-25 16:55:51 -04:00
José Padilla
83c9136c90 Cleanup import following PEP 8 style guide 2015-06-25 16:10:17 -04:00
Shtarev
e8b23c4789 thin logic 2015-06-25 21:14:00 +03:00
Tom Christie
47765bc429 Merge pull request #3034 from m-vellinga/master
Use get_queryset() for RelatedField choices property
2015-06-25 16:41:43 +01:00
José Padilla
d6e30c75ff Add test and fix for #2704 2015-06-25 09:35:36 -04:00
Tom Christie
321133242f Unsaved file objects may not have an associated URL. 2015-06-24 14:24:19 +01:00
Tom Christie
39ece9bee0 Support allow_blank=False with trim_whitespace=True. 2015-06-24 13:32:54 +01:00
Tom Christie
8329411cc3 Merge pull request #2539 from donewell/permission-detail
add message to custom permission
2015-06-24 11:32:02 +01:00
Tom Christie
8d4c96ecd6 Merge pull request #3012 from jannon/fix-allow-blank-mapping
only include 'allow_blank' on supported fields
2015-06-24 11:01:10 +01:00
Anton Chaporgin
47acec0f9d Made exception message more verbose
This exception helps you to upgrade from 2 -> 3 and since a lot of fields may be in 2 using serializers.Field as parent class, this message should contain at least name of upgraded field to help user to grep and fix the codebase faster.
2015-06-24 11:59:49 +03:00
homm
30b36a594f use PageSizePaginationMixin for CursorPagination
tests for custom page_size in CursorPagination
2015-06-23 19:14:10 +03:00
homm
60656e9182 merge CursorPagination.decode_cursor and _decode_cursor
merge `CursorPagination.encode_cursor` and `_encode_cursor`
2015-06-23 19:00:42 +03:00
homm
9a5373d41c make PageSizePaginationMixin from all this page_size stuff 2015-06-23 18:19:38 +03:00
homm
ab03729b58 allow cursor format customization 2015-06-23 18:00:26 +03:00
José Padilla
83ef64dbf5 Document setting URL_FORMAT_OVERRIDE to None
This also hides the format dropdown from the
Browsable API if URL_FORMAT_OVERRIDE is disabled.

Closes #3057
2015-06-23 07:50:44 -04:00
Tom Christie
1e678791de Merge pull request #2922 from thedrow/patch-11
Cache fields list for to_internal_value and to_representation
2015-06-23 08:53:32 +01:00
Tom Christie
e3b578258a Merge pull request #2769 from nonZero/patch-1
Wrong error message on bad field lookup
2015-06-22 17:04:04 +01:00
Tom Christie
15a386e85d Merge pull request #3045 from paxnovem/issue_3042
Fixed many=False issue on related fields
2015-06-22 15:40:59 +01:00
Markus Korn
b42b16d0e6 compat: invert logic for checking the django version when implementing
RequestFactory.generic()
2015-06-22 16:13:42 +02:00
Markus Korn
06c61fc511 compat: only add compat implementation of RequestFactory.generic() if not
provided by django
2015-06-22 14:05:56 +02:00
Omer Katz
1701ddae35 Fixed formatting of _readable_fields list comprehension to match the formatting of the _writable_fields list comprehension. 2015-06-20 08:51:03 +03:00
Brian Grohe
51cda112f5 Simplified if statement to one line solution
Based on feedback on the pull request, changed solution to
be simpler for issue 3042
2015-06-19 09:21:35 -04:00
José Padilla
5e917789ec Consistent 2 space tabbing and formatting 2015-06-18 09:00:05 -04:00
Brian Grohe
d24990ece2 Fixed many=False issue in related fields
Added check to pop many from kwargs before passing to __init__
Fixed my lint issue from the previous commit
2015-06-17 13:48:34 -04:00
Jannon Frank
2c415d7e03 models.TextFields get mapped to serializers.CharField too 2015-06-16 14:05:19 -07:00
Xavier Ordoquy
139ba7adeb Merge pull request #3006 from osantana/master
Handle invalid characters in "Authorization: token ..." headers
2015-06-16 22:40:15 +02:00
José Padilla
0be6d87fac Fix versioning urls 2015-06-15 16:51:37 -04:00
José Padilla
7f0acbd5a5 Merge pull request #3026 from linovia/feature/format_suffix_patterns_and_trailing_slash
`format_suffix_patterns` is applied before the trailing slash.
2015-06-15 16:38:12 -04:00
Thomas Stephenson
a1e0bae9da Custom serialization of PrimaryKeyRelatedField values
Adds a 'pk_field' parameter which can be used to proxy serialization and
deserialization of arbitrary primary key values.
2015-06-15 04:43:49 +10:00
Kevin Brown
b0889446a5 Merge pull request #3027 from linovia/feature/url_patterns_removal
Remove `django.conf.urls.pattern`
2015-06-11 16:40:40 -04:00
Xavier Ordoquy
1e51230f1b Remove django.conf.urls.pattern as it'll be removed in Django 2.0 2015-06-11 00:45:23 +02:00
Xavier Ordoquy
e7e5946c2e format_suffix_patterns is applied before the trailing slash. 2015-06-11 00:32:05 +02:00
hellysmile
c292b3d132 Fix set_rollback on @transaction.non_atomic_requests. 2015-06-08 07:10:57 +03:00
Ash Hoover
35c28a2a71 Include correct limits in LimitOffsetPagination link urls 2015-06-05 08:56:33 -07:00
Jannon Frank
b0752217ae only include 'allow_blank' on CharField 2015-06-05 02:21:13 -07:00
Xavier Ordoquy
8935db1be9 Merge pull request #3003 from linovia/release/3.1.3
Release 3.1.3
2015-06-04 15:04:55 +01:00
Xavier Ordoquy
9a20609223 Merge pull request #3004 from linovia/translations/3.1.3
Translations updated for 3.1.3
2015-06-04 14:59:32 +01:00
Tom Christie
a3d6601e09 Merge pull request #3008 from linovia/feature/ipaddress-fix
`IPAddressField` improvements
2015-06-04 14:54:50 +01:00
Tom Christie
e8cc948f6b Merge pull request #2695 from delinhabit/refactor-decimalfield
[enhancement] Refactored DecimalField to allow easier subclassing
2015-06-04 14:26:28 +01:00
Xavier Ordoquy
dee5fb5647 Merge remote-tracking branch 'reference/master' into feature/ipaddress-fix
Conflicts:
	docs/api-guide/fields.md
2015-06-04 14:21:33 +01:00
Osvaldo Santana Neto
7ae71deb84 Handle invalid characters in headers 2015-06-03 14:55:34 -03:00
Xavier Ordoquy
051b86e6fd Translations updated for 3.1.3 2015-06-03 17:34:13 +01:00
Xavier Ordoquy
f3dbe9bb2a Bump to version 3.1.3 2015-06-03 16:57:18 +01:00
Xavier Ordoquy
0c66c7cfa6 Merge pull request #3000 from linovia/ovangle/uuid_format2
Add 'format' argument to UUIDField
2015-06-03 12:32:23 +01:00
Tom Christie
b1b47036d7 Use six.text_type for hyperlink names 2015-06-03 11:53:27 +01:00
Tom Christie
99e97fa9d3 Cleanup hyperlink rendering implementation 2015-06-03 11:47:33 +01:00
Tom Christie
ae704eec58 Fix issue with pagination control always displaying 2015-06-03 11:35:03 +01:00
Tom Christie
25bb3b1502 Use chevron control for row linking, rather than hyperlinking first item 2015-06-03 11:15:54 +01:00
Tom Christie
90f2e26679 Add Hyperlink and rendering in admin style renderer 2015-06-03 11:00:38 +01:00
Shtarev
745d8d0004 added comment 2015-06-03 09:04:28 +03:00
Xavier Ordoquy
734bf3cfe6 Merge pull request #2981 from jannon/fix-model-serializer-metadata
Read-Only RelatedField Metadata Failure Test and Fix
2015-06-02 15:09:05 +01:00
Xavier Ordoquy
0c97dd1806 Merge remote-tracking branch 'reference/master' 2015-06-02 13:04:57 +01:00
Xavier Ordoquy
8fa3284620 Merge remote-tracking branch 'reference/master' 2015-06-02 10:24:28 +01:00
Jannon Frank
a97c989248 fix read_only related field metadata 2015-06-02 00:40:00 -07:00
Nicolas Delaby
c2d2417237 Tell default error handler to doom the transaction on error
if `ATOMIC_REQUESTS` is enabled.
2015-06-02 09:19:58 +02:00
Xavier Ordoquy
d79956d40e Translation update. 2015-06-02 00:20:46 +01:00
Xavier Ordoquy
f8eacc5bc0 Merge pull request #2993 from linovia/bug/2894
MultipleChoiceField empties incorrectly on a partial update using multipart/form-data (#2894)
2015-06-01 17:48:20 +01:00
Xavier Ordoquy
14055dd3f4 Merge pull request #2989 from ticosax/duration-field
Add DurationField
2015-06-01 17:38:57 +01:00
Nicolas Delaby
f701ecceb7 Add DurationField 2015-06-01 18:20:53 +02:00
Xavier Ordoquy
5c90bf9cc0 Fix for #2894 thanks to @carljm 2015-06-01 16:13:35 +01:00
Xavier Ordoquy
e3f856ff1d Merge pull request #2975 from sheppard/read-only-nested
can't create nested serializers for unique_together relations
2015-06-01 12:01:40 +01:00
Corentin Smith
fa29f7dd1f Fix minor typo 2015-05-30 17:57:35 +02:00
Xavier Ordoquy
ecb3ba5e1f Merge pull request #2948 from bimusiek/master
Added test ensuring DecimalField accepts `2E+2` as 200 and validates decimal place correctly.
2015-05-29 11:52:33 +02:00
S. Andrew Sheppard
8c7b5fc5c1 pop required extra_kwargs if read_only is set 2015-05-27 21:14:13 -05:00
Tom Christie
95a27a108d Merge pull request #2933 from cancan101/overide_method_action
Set the action on a view when override_method regardless of its None-ness
2015-05-27 09:10:58 +01:00
Petros Moisiadis
192719eed0 Improve coding style
On Tom's suggestion, improve coding style by using a single-line call to getattr() with a default value instead of a multi-line if/else clause.
2015-05-19 20:00:19 +03:00
Petros Moisiadis
a96ebd74b1 Fix flake8 error
Fix flake8 error
2015-05-19 19:48:53 +03:00
Petros Moisiadis
c63ea01f4f Support User model in Django 1.4 that has not a USERNAME_FIELD attribute
Support User model in Django 1.4 that has not a USERNAME_FIELD attribute.
2015-05-19 19:05:50 +03:00
Tom Christie
c916ad6315 Handle create and delete redirects 2015-05-19 16:30:45 +01:00
Petros Moisiadis
43b4ae752d Import get_user_model from compat module
Import get_user_model from compat module to be compatible with older django versions (e.g. 1.4).
2015-05-19 18:00:17 +03:00
Petros Moisiadis
a13075486d Compatibility code for getting user model
Compatibility code for getting user model
2015-05-19 17:57:27 +03:00
Tom Christie
ec8e7f27e7 Fixes for format preservation 2015-05-19 15:49:37 +01:00
Petros Moisiadis
bb002262ac Support basic authentication with custom user models that change username field
Support basic authentication with custom user models with a username field that is not named 'username'.
2015-05-19 17:42:44 +03:00
Michał Hernas
e8c226c2db Fixed lint problems 2015-05-18 16:55:40 +02:00
Michał Hernas
069ea31cfb Added test ensuring DecimalField accepts 2E+2 as 200 and validates
decimal place correctly.
2015-05-18 16:42:24 +02:00
Omer Katz
67ff078388 Renamed the cached fields lists. 2015-05-17 09:54:33 +03:00
David Sanders
b7edd46313 Use simpler dict.get() rather than try/except 2015-05-16 01:01:27 +10:00
tony
0906bf2c08 fix empty and_query 2015-05-15 16:44:12 +03:00
tony
de95598a1e removed using view.model.objects 2015-05-15 13:46:56 +03:00
David Sanders
8e84a9f6d0 Allow invalid outputs to pass through to_representation() for ChoiceField & MultipleChoiceField 2015-05-15 18:59:10 +10:00
Tom Christie
b4d82a0f55 Preserve format query param 2015-05-15 09:18:45 +01:00
tony
c47ec60ea2 no need to do distinct on every loop cycle & add analogue of distinct for oracle users 2015-05-14 17:04:22 +03:00
tony
7813d2fb35 fix DISTINCT for Oracle databases 2015-05-14 13:57:36 +03:00