Don't deprecate 'exclude'

Need to track outcome of Django's #19733, and decide on approach
accordingly.
This commit is contained in:
Tom Christie 2013-02-06 08:48:41 +00:00
parent 280dfa4343
commit efb798cebc

View File

@ -165,11 +165,6 @@ class BaseSerializer(Field):
# Remove anything in '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:
ret.pop(key, None)