Opened 18 years ago
Closed 17 years ago
#4572 closed (fixed)
How to use form_for_instance could benefit from more explanation
Reported by: | Owned by: | Jacob | |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I've attached a patch.
Attachments (3)
Change History (10)
by , 18 years ago
Attachment: | form_for_instance_patch.txt added |
---|
comment:1 by , 18 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
Your description doesn't match the code, you actually create a new form class using form_for_instance
and instantiate this in GET and POST.
comment:2 by , 17 years ago
You are absolutely correct. I'll fix this as soon as I can. Unfortunately, I'm at a hotel with not very reliable wireless service and can't access the SVN repository, so it will probably be Monday afternoon before I can get to it.
by , 17 years ago
Attachment: | form_for_instance_patch.2.txt added |
---|
patch to clarify how to use form_for_instance
comment:4 by , 17 years ago
if request.method == 'POST':
is actually the proper way to check for a POST call, the ticket is a bit messy adding in some ignores, and get_object_or_404
isn't a function of the Manager - it's a shortcut.
Maybe you could submit as a .diff or .patch too, that might fix trac not displaying the patch correctly.
Thanks :)
by , 17 years ago
Attachment: | form_for_instance.patch added |
---|
comment:5 by , 17 years ago
OK...
- request.method == 'POST'...check
- get_object_or_404() function fixed (big whoops on that)...check
- submitted as .patch, which does fix the display...check
I don't understand what you mean by "the ticket is a bit messy adding in some ignores," but will be happy to de-messify if you can clarify.
I don't know why you're being so picky about all these issues. If everything is perfect before it gets checked in, there won't be anything for anyone else to fix later. :-) Seriously, though, thanks for looking.
comment:6 by , 17 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Don't worry, Adrian will still find lots to fix with it. I just go after the glaring mistakes ;)
comment:7 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
patch including an extra paragraph of explanation for form_for_instance