Tom Christie
0dec36eb41
Version 3.5 ( #4525 )
...
* Start test case
* Added 'requests' test client
* Address typos
* Graceful fallback if requests is not installed.
* Add cookie support
* Tests for auth and CSRF
* Py3 compat
* py3 compat
* py3 compat
* Add get_requests_client
* Added SchemaGenerator.should_include_link
* add settings for html cutoff on related fields
* Router doesn't work if prefix is blank, though project urls.py handles prefix
* Fix Django 1.10 to-many deprecation
* Add django.core.urlresolvers compatibility
* Update django-filter & django-guardian
* Check for empty router prefix; adjust URL accordingly
It's easiest to fix this issue after we have made the regex. To try
to fix it before would require doing something different for List vs
Detail, which means we'd have to know which type of url we're
constructing before acting accordingly.
* Fix misc django deprecations
* Use TOC extension instead of header
* Fix deprecations for py3k
* Add py3k compatibility to is_simple_callable
* Add is_simple_callable tests
* Drop python 3.2 support (EOL, Dropped by Django)
* schema_renderers= should *set* the renderers, not append to them.
* API client (#4424 )
* Fix release notes
* Add note about 'User account is disabled.' vs 'Unable to log in'
* Clean up schema generation (#4527 )
* Handle multiple methods on custom action (#4529 )
* RequestsClient, CoreAPIClient
* exclude_from_schema
* Added 'get_schema_view()' shortcut
* Added schema descriptions
* Better descriptions for schemas
* Add type annotation to schema generation
* Coerce schema 'pk' in path to actual field name
* Deprecations move into assertion errors
* Use get_schema_view in tests
* Updte CoreJSON media type
* Handle schema structure correctly when path prefixs exist. Closes #4401
* Add PendingDeprecation to Router schema generation.
* Added SCHEMA_COERCE_PATH_PK and SCHEMA_COERCE_METHOD_NAMES
* Renamed and documented 'get_schema_fields' interface.
2016-10-10 13:03:46 +01:00
Camille Harang
e99b30d28b
Fix rest_framework.filters.OrderingFilter doesn't pass context to ser… ( #4543 )
...
* Fix rest_framework.filters.OrderingFilter doesn't pass context to serializers #4541
* #4541 Additional fix for remove_invalid_fields()
2016-10-10 11:59:02 +01:00
Rowan Seymour
883efbc19f
Case insensitive uniqueness validation ( #4534 )
2016-10-04 13:44:50 +01:00
Dmitry Dygalo
b82ec540ad
Remove code for old Django versions ( #4513 )
2016-09-23 23:03:02 +01:00
Tom Christie
7ab4a587d9
Version 3.4.7 ( #4501 )
2016-09-21 12:24:26 +01:00
Tom Christie
be74d11165
Fallback behavior for request parsing when request.POST already accessed. ( #4500 )
2016-09-21 11:49:09 +01:00
Ollie Ford
fe96ceced0
fixes response rendering with empty context ( #4495 )
...
This commit allows `response.render` to be called when
`response.rendered_context == {}`. This should be allowed, since
if [the JSONRenderer, for example](https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/renderers.py#L85-L92 ) receives a `None` context, it
sets it to an empty dictionary itself.
2016-09-17 03:13:34 +01:00
Tanner Hobson
fe4c4fa751
Fix indentation regression in API listing ( #4493 )
...
In commit 5392be4ddb
, there was a change
made when cleaning up the template for the API listing that caused 2
spaces to appear before every header item (except the first) and before
the first line of the body of the response. This meant that it often
looked like:
HTTP 200 OK
Allow: GET, OPTIONS
Content-Type: application/json
Vary: Accept
{
"key": "value",
"key2": "value2"
}
This change removes those leading spaces, so that it will now look like:
HTTP 200 OK
Allow: GET, OPTIONS
Content-Type: application/json
Vary: Accept
{
"key": "value",
"key2": "value2"
}
2016-09-17 03:09:49 +01:00
Tom Christie
4655501d51
Fix regression of RegexField
. ( #4490 )
...
* Don't deepcopy 'regex' arguments, instead treat as immutable.
2016-09-15 12:44:45 +01:00
José Padilla
6b6f319509
Add missing comma ( #4473 )
2016-09-08 14:01:26 +01:00
TakesxiSximada
5df54a711f
Set a view function's __module__ value to the WrappedAPIView object's __module__ ( #4465 )
2016-09-05 11:16:41 +01:00
Mathieu Pillard
07efbdb45e
Fix APIClient.get() when path contains unicode arguments ( #4458 )
2016-09-02 17:00:03 +01:00
dfavato
ec4761225e
Set self.count before self.limit in LimitOffsetPagination
...
By doing this it is possible to override get_limit in order to return all records if the request has a predefined param.
For example, if one wants that all records are retrieved if url has &limit=-1, get_limit could return self.count in this case.
Otherwise, if self.count is set after self.limit then, to achive the same result, one has to override get_limit and paginate_queryset, or run get_limit twice.
2016-08-23 14:52:20 -03:00
Tom Christie
f064ec6ac6
Version 3.4.6 ( #4436 )
2016-08-23 16:59:47 +01:00
Tom Christie
97806f9724
Add missing comma
2016-08-23 09:46:03 +01:00
José Padilla
d0ed482d70
Skip HiddenField from Schema fields ( #4429 )
2016-08-22 16:53:53 +01:00
orf
d540f0262b
Improve Create to show the original exception traceback ( #3508 )
2016-08-19 14:42:13 +01:00
Tom Christie
a335309b33
Add __str__ method to PKOnlyObject ( #4423 )
2016-08-19 14:37:27 +01:00
Tom Christie
63342e81db
Version 3.4.5 ( #4421 )
2016-08-19 12:45:20 +01:00
Tom Christie
382ea770b5
Improve debug error handling ( #4416 )
2016-08-18 14:42:15 +01:00
Tom Christie
b76984d222
Allow custom CSRF_HEADER_NAME setting. ( #4415 )
2016-08-18 11:24:03 +01:00
Tom Christie
e3f8d06baf
Include .action attribute on viewsets when generating schemas ( #4408 )
2016-08-15 17:10:55 +01:00
Tom Christie
101fd29039
Do not include uploads in request.POST ( #4407 )
2016-08-15 16:53:17 +01:00
Tom Christie
785b206b81
Tweak doctsring. Closes #4404 [ci skip]
2016-08-15 16:21:51 +01:00
James Beith
075a0bde5a
Fix template syntax error for as_list_of_strings
( #4403 )
2016-08-15 09:28:46 +01:00
Tom Christie
a7525d838a
Version 3.4.4 ( #4395 )
2016-08-12 12:08:25 +01:00
Tom Christie
ae720d9bde
Fix issue with generating categories for schema endpoints ( #4394 )
2016-08-12 10:58:47 +01:00
Neil Parsons
7466b61e62
Don't strip empty query params when paginating ( #4260 )
2016-08-12 10:50:16 +01:00
Leonid Shvechikov
1d26b398ad
Fix comment for SerializerMethodField.bind method ( #4389 )
...
It seems that the example was copy&pasted and not updated properly.
2016-08-11 22:15:21 +01:00
Tom Christie
ebf43346a1
Do not re-run query for empty results with LimitOffsetPagination ( #4388 )
2016-08-11 16:54:55 +01:00
Tom Christie
116917dbed
Add form field descriptions to schemas ( #4387 )
2016-08-11 16:18:33 +01:00
Tom Christie
01b498ec51
Fix schema categories for custom list actions ( #4386 )
2016-08-11 14:07:40 +01:00
Tom Christie
b50d8950ee
Pass request to schema generation ( #4383 )
...
Pass request to schema generation
2016-08-11 11:27:28 +01:00
Tom Christie
f16e880167
Stricter type validation for CharField. ( #4380 )
...
Stricter type validation for CharField
2016-08-10 17:22:19 +01:00
Tom Christie
f1a2eeb818
.choices property of RelatedField should preserve non-string values. ( #4379 )
...
Update RelatedField.choices to support non-string values
2016-08-10 16:38:59 +01:00
Akhil Lawrence
fa4ce50be7
Modified exception handler to throw django error page in case of 500 error ( #4172 )
...
Show Traceback HTML in browsable API
2016-08-10 15:24:32 +01:00
Daniel Hahler
378b04eeaa
Fix handling of ALLOWED_VERSIONS and no DEFAULT_VERSION ( #4370 )
...
When only `ALLOWED_VERSIONS` but no `DEFAULT_VERSION` is specified, a
version should be enforced.
2016-08-10 15:19:56 +01:00
Tom Christie
48f3db36d6
Allow optional max_digits on DecimalField ( #4377 )
2016-08-10 14:39:26 +01:00
Tom Christie
2d43b17f9a
Limit queryset when rendering relational choices. ( #4375 )
...
Limit querysets to html_cutoff when rendering relational choices
2016-08-10 13:01:10 +01:00
Tom Christie
8105a4ac5a
Resolve form display with ChoiceField, MultipleChoiceField and non-string choices. ( #4374 )
...
* Add tests for html-form-rendering choice fields
* Resolve issues with ChoiceField, MultipleChoiceField and non-string options
* Ensure None template comparisons don't match string None
2016-08-10 12:02:33 +01:00
Tom Christie
0781182646
Fix call to .resolve_context ( #4371 )
2016-08-09 17:48:29 +01:00
Dmitry Dygalo
e1768bdc16
Fixed various typos ( #4366 )
2016-08-08 09:32:22 +01:00
Tom Christie
bb613c5ad1
Version 3.4.3 ( #4361 )
...
* Version 3.4.3
2016-08-05 13:33:25 +01:00
Tom Christie
f9cf22edc8
Version 3.4.2 ( #4360 )
2016-08-05 12:38:19 +01:00
Tom Christie
d5178c9246
Include kwargs passed to 'as_view' when generating schemas ( #4359 )
2016-08-05 11:19:39 +01:00
Tom Christie
11a2468379
Access request.user.is_authenticated
as property not method, under Django 1.10+ ( #4358 )
...
* For Django >=1.10 use user.is_authenticated, not user.is_authenticated()
2016-08-05 11:04:01 +01:00
Tom Christie
aff146ae83
Filter HEAD out from schemas ( #4357 )
2016-08-05 10:23:40 +01:00
Tom Christie
a9a097496e
extra_kwargs takes precedence over uniqueness kwargs ( #4349 )
2016-08-02 14:33:15 +01:00
Tom Christie
bda16a518a
Dedent tabs. ( #4347 )
2016-08-02 13:33:14 +01:00
René Fleschenberg
9f5e841daf
Change template context generation in TemplateHTMLRenderer ( #4236 )
...
- Change the name of ``resolve_context()`` to ``get_template_context()``.
- Pass the renderer context to this method, to give subclasses more flexibility
when overriding.
2016-08-02 13:11:41 +01:00
Tom Christie
e37619f741
Serializer defaults should not be included in partial updates. ( #4346 )
...
Serializer default values should not be included in partial updates
2016-08-02 13:05:12 +01:00
Tom Christie
3ef3fee926
Descriptive error from FileUploadParser when filename not included. ( #4340 )
...
* Descriptive error from FileUploadParser when filename not included.
* Consistent handling of upload filenames
2016-08-01 18:44:58 +01:00
Tom Christie
46a44e52aa
Quantize incoming digitals ( #4339 )
2016-08-01 17:15:41 +01:00
Tom Christie
aa349fe767
Handle non-string input for IP fields ( #4338 )
2016-08-01 16:14:26 +01:00
jsurloppe
e997713313
urljoin with leading slash remove part of path ( #4332 )
2016-08-01 14:14:55 +01:00
Tom Christie
449ec1d724
Version 3.4.1 [ci skip] ( #4326 )
2016-07-28 13:34:35 +01:00
Tom Christie
e407dc7f01
Added root_renderers argument ( #4323 )
2016-07-28 12:50:51 +01:00
Tom Christie
061e0ed084
Added url and schema_url arguments ( #4321 )
2016-07-28 12:08:34 +01:00
Tom Christie
6a7d34ec34
Unique together checks should apply to fields that are read only, but have a default. ( #4316 )
2016-07-27 15:40:04 +01:00
Tom Christie
1acbc29d58
Minor style tweak. [ci skip]
2016-07-27 15:39:46 +01:00
Alexander Gaevsky
46a870c002
Fix schema generation for APIView, since it does not have get_serializer_class method. ( #4285 )
2016-07-27 15:36:36 +01:00
Tom Christie
3586c8a61a
Set view.format_kwarg in schema generator ( #4315 )
2016-07-27 14:43:45 +01:00
Tom Christie
8ebf81b150
Schema support should function when 'pagination_class = None' ( #4314 )
2016-07-27 13:02:48 +01:00
Tom Christie
351e0a4a99
Fix json indent parameter. Closes #4281 ( #4313 )
2016-07-27 11:49:01 +01:00
Sassan Haradji
f0f61aa077
use verbose_name instead of object_name in field_mapping ( #4299 )
...
* use verbose_name instead of object_name in error messages
2016-07-26 15:12:51 +01:00
Asif Saifuddin Auvi
b63099084f
twitter bootstrap minor update ( #4307 )
...
* updated bootstrap min css to 3.3.7
* updated bootstrap min javascript to 3.3.7
2016-07-26 14:09:04 +01:00
Gustavo Pantuza
da2ff1bc4a
Adding support for RFC 4918 status codes ( #4291 )
...
* Added HTTP status codes from RFC 4918
* Updated documentation about status codes
* Added reference to RFC 4918
2016-07-26 11:09:12 +01:00
Andi Albrecht
3ca0b15b17
Restore meta information for each search field. ( #4298 )
...
The meta information stored in opts needs to be restored for
each search field. Otherwise it references the wrong model
when an attribute of a related model comes before an attribute
of the original model in search fields. This doesn't apply to
m2m relations since must_call_distinct returns True in that
case.
2016-07-26 11:07:03 +01:00
Aymeric Augustin
a436515196
Add missing return statement.
...
Fix #4272 .
2016-07-16 22:44:49 +02:00
Tom Christie
8385ae42c0
3.4.0 Release ( #4258 )
...
* 3.4.0 Release
* Version 3.4 release
* Full release notes
* Update translation files
* Update release documentation
* Update release notes
* Docs on supporting alternate schema formats
* Add schema_renderers to DefaultRouter
2016-07-13 16:30:41 +01:00
Tom Christie
549210b50f
Don't strip microseconds in JSON output. ( #4256 )
2016-07-11 14:34:23 +01:00
Tom Christie
321c060dbe
Resolve incorrect media type ( #4254 )
2016-07-11 12:04:11 +01:00
kiyoqoko
6338ce80ab
Add localize keyword argument to DecimalField
( #4233 )
...
Add `localize` keyword argument for DecimalField
2016-07-06 16:07:16 +01:00
Tom Christie
6ff9840bde
Schemas & client libraries. ( #4179 )
...
* Added schema generation support.
* New tutorial section.
* API guide on schema generation.
* Topic guide on API clients.
2016-07-04 16:38:17 +01:00
Vikalp Jain
1d2fba906e
Fix issues with routers for custom list-route and detail-routes ( #4229 )
2016-06-29 17:27:17 +01:00
Vadim
c0f4dfd8f3
Add tests for the ListSerializer for the TestSerializerPartialUsage.
...
Additional fix partial update for the ListSerializer.
2016-06-29 09:48:31 +03:00
Vadim
53a1205dd0
Fix partial update for the ListSerializer.
2016-06-24 15:04:18 +03:00
Laurent De Marez
fdde44d9d1
Fix parsing multipart data using a nested serializer with list ( #3820 )
...
It is possible that a key in a MultiValueDict has multiple values, lists
are represented this way. When accessing a key in a MultiValueDict
it only returns the last element of that key. This becomes a problem
when parsing an html dict with a list inside of it.
To fix this problem we have to get and set the value using .getlist()
and .setlist().
2016-06-23 16:03:24 +01:00
Tom Christie
bc3485ab7d
Namespace versioning with nested namespaces ( #4219 )
...
Support nested namespaces with namespaced versioning.
2016-06-23 16:00:11 +01:00
Tom Christie
f81d516ae4
Robust uniqueness checks. ( #4217 )
...
* Robust uniqueness checks
* Add master to test matrix (allow_failures)
2016-06-23 15:09:23 +01:00
Tom Christie
e1f7cc4082
Minor refactoring of must_call_distinct ( #4215 )
2016-06-23 14:02:25 +01:00
Simon Charette
90bb0c58ce
Prevented unnecessary distinct() call in SearchFilter. ( #3938 )
...
* Prevented unnecessary distinct() call in SearchFilter.
* Refactored SearchFilter lookup prefixes.
2016-06-23 13:49:23 +01:00
Rowan Seymour
36ca4b8e06
Make offset_cutoff a class attribute in CursorPagination so that it can be easily overridden in subclasses ( #4212 )
2016-06-23 10:37:15 +01:00
Tom Christie
798a971f20
Simplfy TimeField passing through strings ( #4197 )
...
* Simplfy TimeField passing through strings
2016-06-14 16:05:00 +01:00
Tom Christie
9406e45b2c
Pass through strings as-in with DateTimeField ( #4196 )
2016-06-14 12:23:39 +01:00
Tom Christie
2e7fae7698
limit=0 should revert to default limit ( #4194 )
2016-06-13 16:32:43 +01:00
Tom Christie
c3b7fba918
Exclude read_only=True fields from unique_together validation & add docs. ( #4192 )
...
* Exclude read_only=True fields from unique_together validation
* Test to ensure that unique_together validators can be removed
* Do not add uniquness_extra_kwargs when validators are explicitly declared.
* Add docs on validation in complex cases
2016-06-13 13:31:12 +01:00
Tom Christie
9bffd35432
Handle bytestrings in JSON. Closes #4185 . ( #4191 )
2016-06-13 10:41:50 +01:00
Tom Christie
bb22ab8ee7
More robust form rendering in the browsable API ( #4181 )
2016-06-08 17:13:20 +01:00
Tom Christie
a5f822d067
Empty cases of .validated_data and .errors as lists not dicts for ListSerializer ( #4180 )
2016-06-08 15:55:09 +01:00
Asif Saifuddin Auvi
04e5b5b20a
removed AUTH_USER_MODEL compat property ( #4176 )
...
Removed unnecessary `AUTH_USER_MODEL` compat variable.
(No longer required)
2016-06-07 12:13:35 +01:00
Sergei Sinitsyn
94863ee6d0
Change serializer field help_text rendering in browsable api ( #3812 )
2016-06-02 15:21:57 +01:00
Tom Christie
75751cc64e
Allow relative style hyperlinked URLs
2016-06-02 15:03:17 +01:00
Tom Christie
9c996d7d2a
Clean up existing deprecation warnings. ( #4166 )
...
* Add Meta.fields = '__all__' to serializer classes where required.
* Add explicit on_delete=models.CASCADE to ForeignKey fields.
* Use '.remote_field' and '.model' in preference to '.rel' and '.to' when inspecting model fields.
* Use new value_from_object in preference to internal _get_val_from_obj
2016-06-02 14:39:10 +01:00
Tom Christie
05b0c2adff
Don't list M2M choices in OPTIONS requests. Refs #3751 . ( #4160 )
2016-06-01 17:28:32 +01:00
Simon Charette
014e24b024
Do not list related field choices in OPTIONS requests.
...
Do not list related field choices in OPTIONS requests.
2016-06-01 16:33:03 +01:00
Asif Saifuddin Auvi
b92901e591
updated jquery version to 1.12.4 ( #4157 )
...
Updated jquery version to 1.12.4
2016-06-01 15:33:36 +01:00
Tom Christie
994e1ba927
Django 1.10 support. ( #4158 )
...
* Added TEMPLATES setting to tests
* Remove deprecated view-string in URL conf
* Replace 'urls = ...' in test classes with override_settings('ROOT_URLCONF=...')
* Refactor UsingURLPatterns to use override_settings(ROOT_URLCONF=...) style
* Get model managers and names in a version-compatible manner.
* Apply override_settings to a TestCase, not a mixin class
* Use '.callback' property instead of private attributes when inspecting urlpatterns
* Pass 'user' to template explicitly
* Correct sorting of import statements.
* Remove unused TEMPLATE_LOADERS setting, in favor of TEMPLATES.
* Remove code style issue
* BaseFilter test requires a concrete model
* Resolve tox.ini issues
* Resolve isort differences between local and tox environments
2016-06-01 15:31:00 +01:00
Tom Christie
fe2aede18d
More robust default behavior on OrderingFilter ( #4156 )
2016-06-01 11:08:04 +01:00
KhasanovBI
92bf8b9197
Wrap guardian.VERSION in tuple, in django-guardian 1.4.2 version has list type and comparison fails. ( #4149 )
2016-05-26 20:22:38 +01:00
Kennedy Mwenja
592eea9b9e
* Use get_serializer_class in ordering filter* Test improper configuration of ordering* Raise ImproperlyConfigured when missing get_serializer_class
...
* Use get_serializer_class in ordering filter
* Test improper configuration of ordering
* Raise ImproperlyConfigured when missing get_serializer_class
2016-05-26 09:59:13 +01:00
Xiao Hanyu
19bdfda49a
Fix #3844 , refine validator for fields with <source=> kwargs
...
When serializers has fields with something like `source=user.email`, the
uniqueness validator should check `email` field instead of `user`, cause
`user` is a model object.
2016-05-26 10:58:37 +08:00
Ben Brostoff
400078311b
Fix typos in ReturnDict and ReturnList docstrings
2016-05-16 20:39:13 -04:00
KhasanovBI
768ae26aa4
Fix None values representation in childs of ListField, DictField. ( #4118 )
2016-05-16 09:30:23 +01:00
José Padilla
daccc2b8f3
Clean up js style and remove extra getCookie function ( #4123 )
2016-05-16 09:27:38 +01:00
José Padilla
5392be4ddb
Spring cleaning template styles ( #4124 )
2016-05-16 09:27:10 +01:00
Alexander Gaevsky
1328982de3
Set proper status code in AdminRenderer for the redirection after POST/DELETE requests. ( #4106 )
2016-05-16 09:22:28 +01:00
Tom Christie
ebb4070467
Resolve TimeField representation for midnight value. ( #4107 )
2016-05-10 11:56:36 +01:00
José Padilla
0795f7394c
Prevent raising exception when limit is 0 ( #4098 )
2016-05-10 10:58:24 +01:00
Hongxia Zhong
d39af5335c
Fix incorrect zh-hans and zh-hant locale directory path
2016-05-06 01:22:33 -07:00
Miro Hrončok
ffdac0d936
TokenAuthentication: Allow custom keyword in the header ( #4097 )
...
This allows subclassing TokenAuthentication and setting custom keyword,
thus allowing the Authorization header to be for example:
Bearer 956e252a-513c-48c5-92dd-bfddc364e812
It doesn't change the behavior of TokenAuthentication itself,
it simply allows to reuse the logic of TokenAuthentication without
the need of copy pasting the class and changing one hardcoded string.
Related: #4080
2016-05-04 10:53:34 +01:00
Germán Larraín
e19b21ecc5
Handle incorrectly padded HTTP basic auth header ( #4090 )
2016-05-03 09:24:55 +01:00
Daniele Varrazzo
88c80fe2e9
Fixed DecimalField arbitrary precision support ( #4075 )
2016-04-27 17:04:01 +01:00
José Padilla
4f16c54428
Merge pull request #4049 from clintonb/csrf-cookie-fix
...
Added support for custom CSRF cookie names
2016-04-26 11:43:23 -03:00
Xavier Ordoquy
1823662e1e
Merge pull request #4044 from linovia/merge/3.3.x_to_master
...
Merge the changes in 3.3.x back to master.
2016-04-21 11:31:15 +02:00
Clinton Blackburn
9d9658f128
Added support for custom CSRF cookie names
...
Instead of hardcoding the CSRF cookie name, the value is passed to the template as a context variable, rendered as a JavaScript variable, and read by csrf.js.
Fixes #4048
2016-04-11 23:58:55 -04:00
Simon Charette
d87f2bc7b6
OrderingFilter adjustements ( #3983 )
...
* Made sure the OrderingFilter relies on Field.verbose_name.
* Marked OrderingFilter's order labels for translation.
2016-04-08 15:37:23 +01:00
Xavier Ordoquy
bff3bebdbe
Merge remote-tracking branch 'reference/stable/3.3.x' into merge_test
...
# Conflicts:
# docs/topics/release-notes.md
2016-04-08 15:46:17 +02:00
Xavier Ordoquy
29a2e549c1
Merge remote-tracking branch 'reference/master' into bug/fix_correct_string_type
2016-04-07 18:03:12 +02:00
Xavier Ordoquy
2622588b30
Typo correction.
2016-04-07 18:00:17 +02:00
Xavier Ordoquy
019c6db759
Fix the string_types / text_types confusion introduced in #4025 ( #4035 )
2016-04-07 16:34:27 +01:00
Jonathan Liuti
78e4ea0d6e
No auth view failing permission should raise 403
...
A view with no `authentication_classes` set and that fails a
permission check should raise a 403 with the message from the
failing permission.
2016-04-07 16:24:26 +01:00
Xavier Ordoquy
763aab6b45
Fix the string_types / text_types confusion introduced in #4025
2016-04-05 16:29:16 +02:00
Nitesh Lohchab
09aa8f76c4
python2.x and 3.x compatible
2016-04-03 18:39:32 +05:30
Nitesh Lohchab
c22b92a66c
type('') to str
2016-04-03 00:07:45 +05:30
Xavier Ordoquy
67ac0486f5
Merge pull request #4006 from mochawich/patch-1
...
Reorder initializing the view
2016-03-31 13:53:14 +02:00
Tom Viner
3e5a1397d7
remove trailing slash from cramer cursor link
2016-03-24 20:37:38 +00:00
Xavier Ordoquy
cfb77ae6fa
Merge pull request #3273 from olliewalsh/breadcrumbs_view_name
...
Do not ignore overridden View.get_view_name() in breadcrumbs
2016-03-23 01:10:13 +01:00
Xavier Ordoquy
0e8306341d
Merge pull request #3936 from carltongibson/null-uuid-fk-take2
...
Fix None UUID ForeignKey serialization
2016-03-22 22:46:33 +01:00
Mohamad Nour Chawich
03270431ed
Reorder initializing the view
...
Determining the version and performing content negotiation should be done before ensuring the permission of the request. The reason is that these information can be used in handling the exceptions. For example different versions may return different error scheme. Also, the rendering class can be used to determine how to exception handler response should be rendered.
2016-03-20 21:46:37 +01:00
Maxime R
24694ddcb4
Fixed use of deprecated Query.aggregates
...
In Django 1.8 [`Query.aggregates` is replaced by `annotations`](https://docs.djangoproject.com/es/1.9/releases/1.8/#aggregate-methods-and-modules ).
Using aggregates currently raises a `RemovedInDjango20Warning`. [Django's source](https://github.com/django/django/blob/1.8/django/db/models/sql/query.py#L192 )
2016-03-18 16:16:13 +01:00
Stephan Groß
a101251a2a
Fix blank lines around docstrings
2016-03-17 11:06:47 +00:00
Xavier Ordoquy
265db86590
Translation update.
2016-03-14 08:31:27 +01:00
Carlton Gibson
2ef74cfa61
Bring check for null fk to BaseSerializer.to_representation
2016-03-13 20:39:19 +01:00
Mitar
2f49df8242
Run JavaScript only when DOM is ready.
2016-03-12 16:52:31 -08:00
Xavier Ordoquy
4399d601c5
Translation updates.
2016-03-07 20:25:10 +01:00
Jared Lang
e34a34e90b
Fix empty pk detection in HyperlinkRelatedField.get_url
...
This implementation allows detection of empty values that are non-nullable, allowing the field to return None values for such cases
2016-03-07 19:37:48 +01:00
Xavier Ordoquy
97cc83483f
Merge remote-tracking branch 'reference/stable/3.3.x' into stable/3.3.3
2016-03-01 10:39:34 +01:00
Jared Lang
7ac8cc760c
Fix empty pk detection in HyperlinkRelatedField.get_url
...
This implementation allows detection of empty values that are non-nullable, allowing the field to return None values for such cases
2016-02-29 12:56:56 -08:00
Xavier Ordoquy
753f4dc477
Fix sorting order.
2016-02-27 01:46:59 +01:00
Xavier Ordoquy
6ea6e37ac9
Add missing migration file for #3887
2016-02-27 00:51:35 +01:00
Xavier Ordoquy
24a2ec0501
Merge remote-tracking branch 'reference/stable/3.3.x' into stable/3.3.3
2016-02-27 00:36:23 +01:00
José Padilla
69c0de4faa
Merge pull request #3953 from akarambir/remove-old-django-checks
...
Closes #3952 : Remove old django checks from tests and compat
2016-02-19 11:08:45 -04:00
Karambir Singh Nain
69f1e3a9fd
Remove old django checks from tests and compat
...
Remove skipping of tests for Django<1.8. Remove several functions from compat.py not needed for Django>=1.8
2016-02-19 01:47:45 +05:30
Xavier Ordoquy
5e08231453
Remove informations about why the pagination didn't work.
...
We remove a couple of informations to lower the exposition of our internals.
2016-02-17 18:18:19 +01:00
Erick Wilder
8109752061
Closes #3937 . Support callable as the value of initial
for any serializer.Field
2016-02-17 10:52:21 +01:00
Carlton Gibson
20d1fdba69
Fix None UUID ForeignKey serialization
2016-02-16 09:29:48 +01:00
Xavier Ordoquy
f5822e7b71
Bump version to 3.3.3
2016-02-12 13:23:08 +01:00
Xavier Ordoquy
3693e938a4
Merge pull request #3908 from kostya0shift/fix_exceptions_force_text
...
Fixed _force_text_recursive typo
2016-02-12 08:24:13 +01:00
Federico Bond
03b5438d07
Add missing space in serializer error message
2016-02-11 15:09:21 -03:00
blag
89d575a52a
Remove version string from admin template
2016-02-09 05:56:47 -07:00
blag
d2ca8872c0
Remove version string from base template
2016-02-08 22:36:39 -07:00
Mikalai Radchuk
59ab3a291c
Fixes vertical html layout for BooleanField
...
`HTMLFormRenderer` renders `BooleanField` field as not checked if vertical layout are used.
2016-02-08 17:07:16 +03:00
Kostya Esmukov
3ea1fe61a0
Fixed _force_text_recursive typo
2016-02-07 18:58:19 +03:00
Simon Charette
1a052d6ee3
Silenced deprecation warnings on Django 1.8.
2016-02-04 13:49:55 -05:00
Mikalai Radchuk
1f2a32d506
Fixes docstrings in fields.py
...
Fixes docstrings for `to_choices_dict` and `flatten_choices_dict` functions in fields.py.
Mistakes were introduced in #4d69286
2016-02-03 12:36:00 +03:00
José Padilla
0512c394a3
Merge pull request #3875 from m1kola/bugfix/HTMLFormRenderer-render-renderer_context-default
...
Fixes AttributeError in HTMLFormRenderer.render
2016-02-01 16:28:11 -04:00
Mikhail Nacharov
d0f7b04805
enhancement #3886 Internationalization in admin interface rest_framework.authtoken
...
+ verbose_name in models.Token fields
+ Meta-options verbose_name & verbose_name_plural
+ Labels in AuthTokenSerializer fields in case of usages in Brousable API
+ provide AppConfig class as described in django documentation with verbose_name came through ugettext_lazy
2016-02-01 13:20:16 +05:00
Mikalay Radchuk
714607307e
Fixes AttributeError in HTMLFormRenderer.render
...
If `HTMLFormRenderer.render` will be called with default arguments,
`AttributeError: 'NoneType' object has no attribute 'get'` will be raised.
2016-01-26 21:26:30 +03:00
Xavier Ordoquy
9e8ddb88fc
Restore the abstract on Token model when the app isn't declared
...
The fact that we don't import Token from authentication doesn't invalidate
the need for the model to be abstract whenever the authtoken isn't listed
in the INSTALLED_APPS.
2016-01-21 13:28:32 +01:00
Xavier Ordoquy
328000fb34
Merge pull request #3624 from d6bels/master
...
Login form autofocus
2016-01-20 18:21:03 +01:00
Xavier Ordoquy
f1b28b4d63
Merge pull request #3605 from ryanhiebert/slug-related-field-queryset
...
RelatedField get_queryset and context
2016-01-20 18:17:29 +01:00
Xavier Ordoquy
e7fbd264ca
Merge pull request #3703 from sniegu/master
...
Add missing csrf_token in AdminRenderer post form.
2016-01-19 16:58:39 +01:00
Xavier Ordoquy
8ea7d6b5c6
Merge remote-tracking branch 'origin/master' into markdown-compat
...
Conflicts:
requirements/requirements-optionals.txt
2016-01-19 15:34:56 +01:00
Brad Montgomery
40b5774a33
QueryParameterVersioning does not use default version
...
QueryParameterVersioning does not fall back to the value used in the `DEFAULT_VERSION` setting, while other versioning schemes do. This looks like a minor change, and incorporates the `self.default_version` set in the superclass.
I'll sheepishly admit that I edited this inline without running any tests or anything, so please let me know if this needs more work.
2016-01-14 12:00:30 -06:00
Mads Jensen
215e1b6c6b
Regarding #3729
...
python -Werror generates warnings informing that on_delete is a required keyword in Django 2.0
2016-01-14 15:14:33 +01:00
Mads Jensen
a9c394f5b7
2015 update in __init__.py file
2016-01-13 12:54:56 +01:00
areski
4e01796303
Test for TimeField not handling empty values
2016-01-11 12:16:26 +01:00
areski
a76c3ed051
Fixed TimeField not handling empty values
2016-01-11 12:14:40 +01:00
Mikalai Radchuk
6b207d93d6
DateField.to_representation unicode compatibility
2016-01-11 13:11:01 +03:00
José Padilla
057cf13578
Merge pull request #3815 from atombrella/keys_dict_3786
...
Fixes #3786
2016-01-09 22:47:53 -04:00
Tom Christie
f01a3d9c36
Merge pull request #3801 from koordinates/fix-nested-validation-error
...
Fix nested validation error being rendered incorrectly.
2016-01-07 09:22:23 +00:00
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