MCPcopy Create free account
hub / github.com/encode/django-rest-framework / __new__

Method __new__

rest_framework/serializers.py:309–311  ·  view source on GitHub ↗
(cls, name, bases, attrs)

Source from the content-addressed store, hash-verified

307 return dict(base_fields + fields)
308
309 def __new__(cls, name, bases, attrs):
310 attrs['_declared_fields'] = cls._get_declared_fields(bases, attrs)
311 return super().__new__(cls, name, bases, attrs)
312
313
314def as_serializer_error(exc):

Callers

nothing calls this directly

Calls 2

_get_declared_fieldsMethod · 0.80
__new__Method · 0.45

Tested by

no test coverage detected