• 
      

    Add Amazon S3-based screenshot storage.

    Review Request #1080 — Created Sept. 16, 2009 and submitted

    Information

    Review Board
    master

    Reviewers

    Add Amazon S3-based screenshot storage.
    
    This builds upon my djblets changes to allow people to use django-storages'
    Amazon S3 storage backend. With this change, admins enter their Amazon AWS
    access key and secret key, and an S3 bucket name. Uploaded screenshots get saved
    to S3, and so do the according thumbnails.
    
    This change is almost entirely admin site/siteconfig updates for the UI to set
    the various settings keys that django and django-storages use to select the
    storage backend and configure it. The only change to non-admin code is to change
    the screenshot serializer to use the basename of the filename instead of the
    basename of the path, since not all storage backends implement the path
    property.
    Tested a bunch of screenshot uploads and thumbnailing against my S3 account.
    chipx86
    1. Awesome. I like this change. Just a few comments.
    2. reviewboard/admin/checks.py (Diff revision 1)
       
       
      Should use imp.find_module if possible.
      1. imp.find_module doesn't deal with hierarchical module names, so this would get a lot more complicated. I'd prefer to just keep using the import statement.
      2. Oh, good point. Fair enough.
    3. reviewboard/admin/checks.py (Diff revision 1)
       
       
      Same here.
    4. reviewboard/admin/forms.py (Diff revision 1)
       
       
       
       
      Two blank lines.
    5. reviewboard/admin/forms.py (Diff revision 1)
       
       
      This mostly just repeats the label. Can we say more about why this would be useful or something?
    6. 
        
    david
    Review request changed
    chipx86
    1. Looks good.
    2. reviewboard/admin/checks.py (Diff revision 2)
       
       
      So django-storage's top-level module is actually "backends" ? Hope that doesn't bite us at any point with the auth stuff...
      1. It didn't seem to cause any problems. We always import from "reviewboard.accounts.backends"
        
        Thanks for the reviews!
    3.