api.py 931 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
17
18
19
20
21
22
from representatives_recommendations.api import (
    RecommendationViewSet,
    RepresentativeScoreViewSet,
    ScoredVoteViewSet
)


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

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