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

Method build_url_field

rest_framework/serializers.py:1383–1390  ·  view source on GitHub ↗

Create a field representing the object's own URL.

(self, field_name, model_class)

Source from the content-addressed store, hash-verified

1381 return field_class, field_kwargs
1382
1383 def build_url_field(self, field_name, model_class):
1384 """
1385 Create a field representing the object's own URL.
1386 """
1387 field_class = self.serializer_url_field
1388 field_kwargs = get_url_kwargs(model_class)
1389
1390 return field_class, field_kwargs
1391
1392 def build_unknown_field(self, field_name, model_class):
1393 """

Callers 1

build_fieldMethod · 0.95

Calls 1

get_url_kwargsFunction · 0.90

Tested by

no test coverage detected