taiga-back/tests/unit
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
..
__init__.py Adding some tests and a improved version of the wikilinks extension 2014-05-16 22:20:01 +02:00
conftest.py Moving fixture into standalone module and new module tests.utils 2014-05-27 13:28:46 +02:00
test_mdrender.py Flake8 corrections 2014-05-22 13:14:28 +02:00