Limits the number of related items added to the choices dictionary on RelatedField

This commit is contained in:
Rubén Durá Tarí 2015-08-25 16:37:14 +01:00
parent 8264222497
commit cb29f1ab5e

View File

@ -154,7 +154,7 @@ class RelatedField(Field):
six.text_type(self.to_representation(item)),
self.display_value(item)
)
for item in queryset
for item in queryset[:self.html_cutoff]
])
@property