Mentors: Christian, David, Anselina
Students: Students: Salam, Raheman, Matthew, Peter
pencils down is on 8/12
- Avoid forms
- Have client talk to the API
- Post Screenshot of review request
- Idea: a small icon to copy the url to a specific review within a review request
- talk about it after finish the scroll thing
- go to https://reviews.reviewboard.org/users/PeterTran/reviews/ and copy the URLs from the rows there
- a .egg package can be easy_install’d, allowing someone to quickly and easily install it on their system
- q: why does the create method require the file to be passed in, if this is already contained in the path field?
- because it’s not contained there, FileField provides validation and stuff, but it’s up to the caller to actually use what’s in request.FILES for that field
- UPloadFIleForm was based on UploadDiffForm, which was written when Django forms was a very different thing and very limited
- my goal is to allow an empty (content-wise) file attachment to be created using the api, but The stock file attachment resource requires that the user have permission to edit the review request. However, people writing comments do not necessarily have this permission. Since this check is employed for good. reason (to prevent unauthorized parties from modifying the review request) is it not advisable to createa separate resource for the addition of fileAttachments associated with comments?
- we have base classes for a lot of the file attachment core functionality, you will have to write a resource for it.
- the API is one giant tree of resources. The expectation is that every resource class has one instance, which is in the tree at one location. we already have a few places that offers file attachment functinoality of some sort, so we have all the common code consolidated into BaseFileAttachmentResource. then, for every spot in the tree that we want to provide any file attachment functionality, we subclass BaseFileAttachmentResource, create an instance, and then reference that in the parent’s item_child_resources list.
- but BaseFileAttachmentResource is not itself an accessible resource is it?
- so you’d need to do that, and then maybe modify BaseFileAttachmentResource or override something there to provide what you need
- in your new subclass, you’d override get_queryset to only fetch file attachments that aren’t attached to a review request
waiting on the code review cycle