Adam Dobrawy
c2921b1eca
Reduce diff
2023-02-23 04:28:00 +01:00
Adam Dobrawy
854e22b6bc
Apply review commnents
2023-02-07 11:48:41 +01:00
Carlton Gibson
0407a0df8a
Dropped Python 2 compatibility. ( #6615 )
...
Thanks to Jon Dufresne (@jdufresne) for review.
Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com>
2019-04-30 17:53:44 +02:00
Tom Christie
2b6245db53
Ensure Location header is strictly a 'str', not subclass. Closes #5541 ( #5544 )
2017-10-30 13:08:52 +00:00
Tom Christie
24791cb353
Invalidate any existing prefetch cache on PUT requests. ( #4668 )
2016-11-11 09:44:35 +00:00
Tom Christie
d0b3b6470a
Fix prefetch_related updates. ( #4553 )
2016-10-11 11:07:40 +01:00
José Padilla
83c9136c90
Cleanup import following PEP 8 style guide
2015-06-25 16:10:17 -04:00
Tom Christie
73feaf6299
First pass at 3.1 pagination API
2015-01-09 15:30:36 +00:00
Tom Christie
d27b8cc09b
PUT as create docs, and move mixin out to external gist
2014-11-03 12:00:19 +00:00
Andy Freeland
81abf2bf34
Rename preform_update
to perform_update
2014-10-12 01:19:53 -04:00
Tom Christie
0cbb57b40f
Tweak pre/post save hooks. Return instance in .update().
2014-10-08 12:17:30 +01:00
Tom Christie
3fa4a1898a
Reintroduce save hooks
2014-10-07 17:21:12 +01:00
Tom Christie
3a3e2bf57d
Serializer.save() takes keyword arguments, not 'extras' argument
2014-10-03 13:42:06 +01:00
Craig de Stigter
857a8486b1
More spelling tweaks
2014-10-03 09:00:33 +13:00
Tom Christie
2859eaf524
request.data attribute
2014-09-26 10:46:52 +01:00
Tom Christie
d934824bff
Workin on
2014-09-05 16:29:46 +01:00
Tom Christie
f2852811f9
Getting tests passing
2014-09-02 17:41:23 +01:00
Tom Christie
ec096a1cac
Add relations and get tests running
2014-09-02 15:07:56 +01:00
Tom Christie
4ac4676a40
First pass
2014-08-29 16:46:26 +01:00
Tom Christie
e5e6329a22
Remove pk_url_field
, slug_url_field
, slug_field
.
...
Closes #1773 .
2014-08-29 11:29:26 +01:00
Tom Christie
b3bbf41670
Remove allow_empty
2014-08-29 11:09:35 +01:00
Xavier Ordoquy
d08536ad9d
Merge remote-tracking branch 'origin/master' into 2.4.0
...
Conflicts:
.travis.yml
docs/api-guide/fields.md
docs/api-guide/routers.md
docs/topics/release-notes.md
rest_framework/authentication.py
rest_framework/serializers.py
rest_framework/templatetags/rest_framework.py
rest_framework/tests/test_authentication.py
rest_framework/tests/test_filters.py
rest_framework/tests/test_hyperlinkedserializers.py
rest_framework/tests/test_serializer.py
rest_framework/tests/test_testing.py
rest_framework/utils/encoders.py
tox.ini
2014-04-13 00:05:57 +02:00
Tom Christie
d328f1827d
Tweak comment wrapping.
2014-02-18 12:30:55 +00:00
Ian Foote
dca8b98356
Remove unnecessary else
2014-02-18 12:28:02 +00:00
Ian Foote
f22aeeb0a3
Refactor UpdateModelMixin.update
...
Reduce nesting, return early in error cases.
2014-02-18 12:08:12 +00:00
Tom Christie
dde3b1dfcb
Use api_settings.URL_FIELD_NAME
2014-01-14 20:35:09 +00:00
Tom Christie
9c41c007af
Merge branch 'master' into 2.4.0
...
Conflicts:
.travis.yml
docs/api-guide/routers.md
docs/topics/release-notes.md
rest_framework/compat.py
2013-12-13 16:32:34 +00:00
Pablo Recio
699ec7236b
Adds pre_delete and post_delete hooks on
2013-12-03 00:07:41 +00:00
Krzysztof Jurewicz
9cea6880f7
Added handling of validation errors in PUT-as-create.
...
Fixes #1035 .
2013-11-19 15:49:31 +01:00
Tom Christie
216ac8a5c1
Use lookup_url_kwarg in presave if required
2013-10-21 17:19:28 +01:00
Tom Christie
9a5b2eefa9
Merge master
2013-08-30 09:28:33 +01:00
Tom Christie
e7927e9bca
Extra docs on PATCH with no object.
2013-08-23 13:35:50 +01:00
Krzysztof Jurewicz
e677f3ee5c
PATCH requests should not be able to create objects.
2013-08-13 13:26:30 +02:00
Tom Christie
379ad8a824
pending deprecations -> deprecated
2013-06-27 20:36:14 +01:00
Tom Christie
06b28f66ed
Tweak method ordering for better consistency
2013-05-22 09:07:12 +01:00
Tom Christie
34776da924
Minor mixin refactoring
2013-05-17 22:09:23 +01:00
Tom Christie
14ded26167
PendingDeprecation warning to allow_empty
2013-05-17 21:28:33 +01:00
Tom Christie
e4067bfb75
introduce lookup_field and add pendingdeprecationwarnings
2013-05-02 12:07:18 +01:00
Tom Christie
5d01ae661f
Simplify paginate_queryset method
2013-04-25 17:40:17 +01:00
Tom Christie
9bb1277e51
Cleaning up around bits of API that will be pending deprecation
2013-04-09 19:37:19 +01:00
Tom Christie
099163f81f
Removed SingleObjectMixin and MultipleObjectMixin
2013-04-09 18:45:15 +01:00
Tom Christie
371698331c
Tweaks
2013-04-04 22:24:30 +01:00
Tom Christie
acc8c1faa4
force_insert, force_update arguments. Closes #484 .
...
Confirmed by `assertNumQueries(…)` in tests.
2013-03-13 20:40:39 +00:00
toran billups
1a8f07def8
GenericAPIView now applies filter_backend for list and retrieve api views
...
Before this commit only the MultipleObjectAPIView would apply a
filter_backend, leaving the SingleObjectAPIView to return objects you
might otherwise expect to have been filtered out.
It's worth mentioning that when a SingleObjectAPIView makes a request
for an object that should be excluded, a 404 is the expected result.
2013-03-08 10:08:53 -06:00
Tom Christie
02ee6e5bf0
Fix out of date docstrings. Closes #689 .
2013-02-27 22:15:28 +00:00
Tom Christie
bc87bf13b4
Tests and fix for #666 .
...
Closes #666 .
2013-02-22 22:02:42 +00:00
Tom Christie
f5a0275547
Tidy up internal view permission checking logic.
...
Also document correctly - these methods are now public and will fall
under the deprecation policy from now on.
2013-02-12 08:58:28 +00:00
Tom Christie
29136ef2c6
Enforce PUT-as-create permissions
2013-02-10 16:50:46 +00:00
Tom Christie
c18fb0d695
Added a post_save
hook. Closes #558 .
2013-02-06 21:28:03 +00:00
Tom Christie
55fd646631
Set many explicitly from mixins. Refs #564 .
2013-02-06 13:04:11 +00:00