Switch to some more clear properties for FileAttachment and fix some breakages.

Review Request #2370 — Created May 18, 2011 and submitted

Information

Review Board
master

Reviewers

This cleans up a bit of the FileAttachment code and fixes some API breakages.

FileAttachment had some getters for certain information, but they weren't
particularly clear. Instead, we now use properties for the few things we do
care about. The web API has been updated for these new properties as well.

The API had a missing/broken DELETE handler. This just provides a version of the
Screenshot handlers for this, since they're basically the same.

We also set the draft caption along with the caption, and fix setting
file attachment comment text.
Tested these along with my other file attachment changes. The unit tests pass
and the functionality works.
david
  1. Ship It!
  2. 
      
DO
  1. 
      
  2. reviewboard/attachments/forms.py (Diff revision 1)
     
     
     
    may phai lam xafsafawf
    1. Sorry, I just tested my account :(
  3. 
      
DO
  1. Looks good  to me!
    (Just a simple test)
    1. ditto :(
    2. Hai:
      
      Hey - there's a way better place to do this kind of testing - see http://demo.reviewboard.org.
      
      Thanks!
      
      -Mike
  2.