api.py 1012 Bytes
Newer Older
Jamesie Pic's avatar
Jamesie Pic committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from rest_framework import routers

from representatives.api import (
    ConstituencyViewSet,
    GroupViewSet,
    MandateViewSet,
    RepresentativeViewSet,
)

from representatives_votes.api import (
    DossierViewSet,
    ProposalViewSet,
    VoteViewSet,
)

16
from representatives_recommendations.api import (
17
    DossierScoreViewSet,
18
19
20
21
22
23
    RecommendationViewSet,
    RepresentativeScoreViewSet,
    ScoredVoteViewSet
)


Jamesie Pic's avatar
Jamesie Pic committed
24
25
26
27
router = routers.DefaultRouter()

router.register(r'constituencies', ConstituencyViewSet)
router.register(r'dossiers', DossierViewSet)
28
router.register(r'dossier_scores', DossierScoreViewSet)
Jamesie Pic's avatar
Jamesie Pic committed
29
30
31
router.register(r'groups', GroupViewSet)
router.register(r'mandates', MandateViewSet)
router.register(r'proposals', ProposalViewSet)
32
router.register(r'recommendations', RecommendationViewSet)
Jamesie Pic's avatar
Jamesie Pic committed
33
router.register(r'representatives', RepresentativeViewSet)
34
35
router.register(r'scores', RepresentativeScoreViewSet)
router.register(r'scored_votes', ScoredVoteViewSet)
Jamesie Pic's avatar
Jamesie Pic committed
36
router.register(r'votes', VoteViewSet)