Commit Graph

11 Commits (9fd896c948d59d6ce8bbd1cdddb9b2567f4df1b9)

Author SHA1 Message Date
Andrey Antukh 9c4472a787 Add alejandro.alonso copyright preamble to test sources. 2016-01-08 16:08:46 +02:00
Andrey Antukh 501145bdcd Fix my email on copyright preamble on test source files. 2016-01-08 15:58:30 +02:00
David Barragán Merino f992d372df Update license message 2016-01-04 08:51:06 +01:00
David Barragán Merino 9b56a414f0 Fix dates in license messages. Change 2014 to 2014-2015 2015-10-13 11:27:15 +02:00
Alejandro Alonso da8024141b Refactoring likes, votes, watchers and favourites names 2015-10-02 14:16:35 +02:00
David Barragán Merino 44eee5212a Improve votes module 2015-08-26 13:35:17 +02:00
Jesús Espino c328414b4d Fixing a lot of flake8 errors on tests 2015-02-24 19:54:10 +01:00
Alejandro Alonso c285857844 Refactoring owner permissions, now only is_owner memberships are considered as owner users 2014-11-25 18:51:58 +01:00
Andrey Antukh 3061425a67 Improvements and fixes on tests. 2014-09-16 10:48:43 +02:00
David Barragán Merino 76bc2ac426 Add more licenses agreements to the tests.integration module 2014-06-22 11:33:44 +02:00
Anler Hp 9923e50603 Generic voting application
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"
2014-06-02 12:03:09 +02:00