mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-02 20:54:42 +03:00
Don't deprecate 'exclude'
Need to track outcome of Django's #19733, and decide on approach accordingly.
This commit is contained in:
parent
280dfa4343
commit
efb798cebc
|
@ -165,11 +165,6 @@ class BaseSerializer(Field):
|
||||||
|
|
||||||
# Remove anything in 'exclude'
|
# Remove anything in 'exclude'
|
||||||
if self.opts.exclude:
|
if self.opts.exclude:
|
||||||
# Note: To be deprecated in line with Django's ModelForm change.
|
|
||||||
# https://code.djangoproject.com/ticket/19733
|
|
||||||
warnings.warn('`exclude` option on serializers is due to be deprecated. '
|
|
||||||
'Use the `fields` option instead.',
|
|
||||||
PendingDeprecationWarning, stacklevel=2)
|
|
||||||
for key in self.opts.exclude:
|
for key in self.opts.exclude:
|
||||||
ret.pop(key, None)
|
ret.pop(key, None)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user