# Path: app/api/views.py
# class PredictionList(generics.ListCreateAPIView):
# class PredictionDetail(generics.RetrieveUpdateDestroyAPIView):
# class SourceList(generics.ListCreateAPIView):
# class SourceDetail(generics.RetrieveUpdateDestroyAPIView):
# class CategoryList(generics.ListAPIView):
# class CategoryDetail(generics.RetrieveAPIView):
# class RealisationCreate(generics.CreateAPIView):
# class RealisationDetail(generics.RetrieveUpdateAPIView):
#     def get_serializer_class(self):


from django.conf.urls import patterns, url, include
from rest_framework import routers
from app.api import views

prediction_urls = patterns('',
    url(r'^(?P<pk>\d+)/?$', views.PredictionDetail.as_view(), name='prediction-detail'),
    url(r'^$', views.PredictionList.as_view(), name='prediction-list')
)

sources_urls = patterns('',
    url(r'^(?P<pk>\d+)/?$', views.SourceDetail.as_view(), name='source-detail'),
    url(r'^$', views.SourceList.as_view(), name='source-list')
)

categories_urls = patterns('',
    url(r'^(?P<pk>\d+)/?$', views.CategoryDetail.as_view(), name='category-detail'),
    url(r'^$', views.CategoryList.as_view(), name='category-list')
)

realisations_urls = patterns('',
    url(r'^(?P<pk>\d+)/?$', views.RealisationDetail.as_view(), name='realisation-detail'),

# Path: app/api/views.py
# class PredictionList(generics.ListCreateAPIView):
# class PredictionDetail(generics.RetrieveUpdateDestroyAPIView):
# class SourceList(generics.ListCreateAPIView):
# class SourceDetail(generics.RetrieveUpdateDestroyAPIView):
# class CategoryList(generics.ListAPIView):
# class CategoryDetail(generics.RetrieveAPIView):
# class RealisationCreate(generics.CreateAPIView):
# class RealisationDetail(generics.RetrieveUpdateAPIView):
#     def get_serializer_class(self):


# Path: app/api/urls.py
from django.conf.urls import patterns, url, include
from rest_framework import routers
from app.api import views


prediction_urls = patterns('',
    url(r'^(?P<pk>\d+)/?$', views.PredictionDetail.as_view(), name='prediction-detail'),
    url(r'^$', views.PredictionList.as_view(), name='prediction-list')
)

sources_urls = patterns('',
    url(r'^(?P<pk>\d+)/?$', views.SourceDetail.as_view(), name='source-detail'),
    url(r'^$', views.SourceList.as_view(), name='source-list')
)

categories_urls = patterns('',
    url(r'^(?P<pk>\d+)/?$', views.CategoryDetail.as_view(), name='category-detail'),
    url(r'^$', views.CategoryList.as_view(), name='category-list')
)

realisations_urls = patterns('',
    url(r'^(?P<pk>\d+)/?$', views.RealisationDetail.as_view(), name='realisation-detail'),

    url(r'^$', views.RealisationCreate.as_view(), name='realisation-create')