Changes between Initial Version and Version 1 of Ticket #28623, comment 2


Ignore:
Timestamp:
09/25/2017 11:42:28 AM (2 years ago)
Author:
Tim Graham
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28623, comment 2

    initial v1  
    1 Look at the usage code above: `handle_uploaded_file(request.FILES['file'])`. If you click on the docs for `request.FILES`, you'll see, "Each value in `FILES` is an `UploadedFile`." I'm not sure a more verbose name provides much benefit. If you read [https://docs.python.org/3/tutorial/inputoutput.html the Python docs for files], you'll see that `f` is a common variable name, probably to avoid clashing with the Python built-in `file`.
     1Look at the usage code above: `handle_uploaded_file(request.FILES['file'])`. If you click on the docs for `request.FILES`, you'll see, "Each value in `FILES` is an `UploadedFile`." I'm not sure a more verbose name provides much benefit. If you read [https://docs.python.org/3/tutorial/inputoutput.html the Python docs for files], you'll see that `f` is a common variable name, probably to avoid clashing with the Python built-in `file`. Also, the name `handle_uploaded_file` implies that the argument (the thing being handled) is an uploaded file.
Back to Top