Django

Code

Ticket #7654 (closed: fixed)

Opened 1 year ago

Last modified 10 months ago

Modifying upload handlers on the fly - accessing request.POST also makes it immutable

Reported by: Rozza Assigned to: nobody
Milestone: 1.0 Component: Documentation
Version: newforms-admin Keywords: newforms admin file uploadhandler
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

In the manual it warns accessing request.FILES will make the file uploaders immutable. However if you access request.POST like the @staff_member_required decorator does you can't then append or insert an upload handler in the view function.

As the parsing of the POST and FILES data is coupled - suggest updating the documentation to warn accessing request.POST has the same end effect as accessing request.FILES.

Attachments

upload_handling.txt.patch (0.7 kB) - added by Rozza on 07/07/08 06:21:05.
Small documentation patch
file_uploads_tests.patch (2.1 kB) - added by Rozza on 07/07/08 06:48:20.
Added Test case - which shows the behaviour

Change History

07/07/08 06:21:05 changed by Rozza

  • attachment upload_handling.txt.patch added.

Small documentation patch

07/07/08 06:48:20 changed by Rozza

  • attachment file_uploads_tests.patch added.

Added Test case - which shows the behaviour

08/08/08 16:30:01 changed by ericholscher

  • needs_better_patch changed.
  • needs_docs changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • milestone set to 1.0.

08/31/08 05:23:36 changed by ubernostrum

  • status changed from new to closed.
  • resolution set to fixed.

(In [8758]) Fixed #7654: Documented the fact that file upload handlers must be modified before reading request.POST


Add/Change #7654 (Modifying upload handlers on the fly - accessing request.POST also makes it immutable)




Change Properties
Action