Commit 487c1524 authored by Jamesie Pic's avatar Jamesie Pic

Added API

parent 20999807
from rest_framework import routers
from representatives.api import (
ConstituencyViewSet,
GroupViewSet,
MandateViewSet,
RepresentativeViewSet,
)
from representatives_votes.api import (
DossierViewSet,
ProposalViewSet,
VoteViewSet,
)
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)
router.register(r'representatives', RepresentativeViewSet)
router.register(r'votes', VoteViewSet)
......@@ -84,6 +84,7 @@ INSTALLED_APPS = (
'bootstrap3',
'datetimewidget',
'django_filters',
'rest_framework',
'taggit',
# ---
'core',
......
......@@ -4,6 +4,7 @@ from django.contrib import admin
from django.views import generic
import views
import api
admin.autodiscover()
......@@ -34,5 +35,6 @@ urlpatterns = [
namespace='representatives_votes')),
url(r'positions/', include('representatives_positions.urls',
namespace='representatives_positions')),
url(r'api/', include(api.router.urls)),
url(r'^$', generic.TemplateView.as_view(template_name='home.html')),
]
......@@ -15,10 +15,11 @@ setup(name='political-memory',
'django-compressor>=1.6,<1.7',
'django-datetime-widget>=0.9,<1.0',
'django-filter>=0.11,<0.12',
'django-representatives>=0.0.9',
'django-representatives-votes>=0.0.7',
'django-representatives-votes>=0.0.12',
'django-representatives>=0.0.13',
'django-taggit>=0.17,<0.18',
'django>=1.8,<1.9',
'djangorestframework>=3.2.0,<3.3.0',
'hamlpy>=0.82,<0.83',
'ijson>=2.2,<2.3',
'lesscpy',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment