Opened 18 years ago
Closed 18 years ago
#3079 closed enhancement (worksforme)
[patch] allow to disable POST handling in create_update generic views
Reported by: | Owned by: | Jacob | |
---|---|---|---|
Component: | Generic views | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Suppose you have custom templates for the create_update
generic views with more than one form. Then one needs to ensable the POST processing of the generic views only for one single form, and disable it for all the others (supposing of course the form actions all lead to the same view handler function).
This patch adds an additional keyword parameter handle_post=True
, which if set to False
prevents the object deletion/creation/edit even if the request method is a POST.
The patch is backwards compatible because the default value is True
.
Attachments (1)
Change History (3)
by , 18 years ago
Attachment: | django_handle_post_arg.diff added |
---|
comment:2 by , 18 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
worksforme given Ubernostrum's comment above. Do feel free to convince us otherwise though :)
add handle_post keyword arg