MCPcopy
hub / github.com/django/django / file_upload_getlist_count

Function file_upload_getlist_count

tests/file_uploads/views.py:136–145  ·  view source on GitHub ↗

Check the .getlist() function to ensure we receive the correct number of files.

(request)

Source from the content-addressed store, hash-verified

134
135
136def file_upload_getlist_count(request):
137 """
138 Check the .getlist() function to ensure we receive the correct number of
139 files.
140 """
141 file_counts = {}
142
143 for key in request.FILES:
144 file_counts[key] = len(request.FILES.getlist(key))
145 return JsonResponse(file_counts)
146
147
148def file_upload_errors(request):

Callers

nothing calls this directly

Calls 2

JsonResponseClass · 0.90
getlistMethod · 0.45

Tested by

no test coverage detected