Attachment files dispatching is now done through `RawAttachmentView`
view that checks for appropiate permissions.
When using the development server this view just redirects to the real
media path of the file.
When using the production server the special redirection header
`X-Accel-Redirect` is used instead to improve efficiency by instructing
the server to dispatch the file instead of django, but you also need the
following configuration (Nginx):
location /attachment-files {
internal;
alias /path/to/taiga/media/attachment-files;
}
It's recommended to also restrict the direct access from outside to the
`attachment-files` directory by using some configuration like this:
location /media/attachment-files {
deny all;
}
The stars application has been removed in favor of a more generic voting
application that works with any model. Starring a project is just a
special case of voting a project.
Usage.
Add a vote:
votes.add_vote(<model instance>, user)
Remove a vote:
votes.remove_vote(<model instance>, user)
Get the queryset of users that voted an object:
votes.get_voters(<model instance>)
Get the number of votes an object has:
votes.get_votes(<model instance>)
Get the objects of type <model> voted by an user:
votes.get_voted(user, <model>)
The issues application is already making use of the votes application
through the following urls:
/api/v1/issues/<id>/upvote <- url name is "issues-upvote"
/api/v1/issues/<id>/downvote <- url name is "issues-downvote"