Update the documents app to use the new way of registering API endpoints

This commit is contained in:
Roberto Rosario
2014-07-08 18:52:35 -04:00
parent 909dd582df
commit 2396d7dae9
5 changed files with 49 additions and 16 deletions
-7
View File
@@ -3,7 +3,6 @@ from __future__ import absolute_import
from django.conf.urls import url
from .cleanup import cleanup
from .api import APIDocumentView, APIDocumentVersionView, APIDocumentImageView, APIDocumentPageView
bootstrap_models = [
{
@@ -16,9 +15,3 @@ bootstrap_models = [
]
cleanup_functions = [cleanup]
version_0_api_services = [
{'urlpattern': url(r'^document/(?P<pk>[0-9]+)/$', APIDocumentView.as_view(), name='document-detail'), 'description': 'Show document data', 'url': 'document/<document ID>'},
{'urlpattern': url(r'^document_version/(?P<pk>[0-9]+)/$', APIDocumentVersionView.as_view(), name='documentversion-detail'), 'description': '', 'url': 'document_version/<document_version ID>'},
{'urlpattern': url(r'^document_page/(?P<pk>[0-9]+)/$', APIDocumentPageView.as_view(), name='documentpage-detail'), 'description': '', 'url': 'document_page/<document page_ID>'},
{'urlpattern': url(r'^document/(?P<pk>[0-9]+)/image/$', APIDocumentImageView.as_view(), name='document-image'), 'description': 'Return a base64 image of the document', 'url': 'document/<document_id>/image/?page=<page number>&zoom=<zoom percent>&rotate=<rotation degrees>'},
]