from __future__ import unicode_literals from django.conf.urls import patterns, url from .api_views import ( APIDeletedDocumentListView, APIDeletedDocumentRestoreView, APIDeletedDocumentView, APIDocumentDownloadView, APIDocumentView, APIDocumentListView, APIDocumentVersionDownloadView, APIDocumentPageImageView, APIDocumentPageView, APIDocumentTypeDocumentListView, APIDocumentTypeListView, APIDocumentTypeView, APIDocumentVersionsListView, APIDocumentVersionRevertView, APIDocumentVersionView, APIRecentDocumentListView ) from .views import ( ClearImageCacheView, DeletedDocumentDeleteView, DeletedDocumentDeleteManyView, DeletedDocumentListView, DocumentDownloadFormView, DocumentDownloadView, DocumentEditView, DocumentListView, DocumentPageListView, DocumentPageRotateLeftView, DocumentPageRotateRightView, DocumentPageView, DocumentPageViewResetView, DocumentPageZoomInView, DocumentPageZoomOutView, DocumentPreviewView, DocumentPrint, DocumentRestoreView, DocumentRestoreManyView, DocumentTrashView, DocumentTrashManyView, DocumentTypeCreateView, DocumentTypeDeleteView, DocumentTypeDocumentListView, DocumentTypeFilenameCreateView, DocumentTypeFilenameDeleteView, DocumentTypeFilenameEditView, DocumentTypeFilenameListView, DocumentTypeListView, DocumentTypeEditView, DocumentVersionDownloadFormView, DocumentVersionDownloadView, DocumentVersionListView, DocumentVersionRevertView, DocumentView, EmptyTrashCanView, RecentDocumentListView, document_clear_transformations, document_document_type_edit, document_multiple_clear_transformations, document_multiple_document_type_edit, document_multiple_update_page_count, document_page_navigation_first, document_page_navigation_last, document_page_navigation_next, document_page_navigation_previous, document_update_page_count ) urlpatterns = patterns( '', url(r'^list/$', DocumentListView.as_view(), name='document_list'), url( r'^list/recent/$', RecentDocumentListView.as_view(), name='document_list_recent' ), url( r'^list/deleted/$', DeletedDocumentListView.as_view(), name='document_list_deleted' ), url( r'^(?P\d+)/preview/$', DocumentPreviewView.as_view(), name='document_preview' ), url( r'^(?P\d+)/properties/$', DocumentView.as_view(), name='document_properties' ), url( r'^(?P\d+)/restore/$', DocumentRestoreView.as_view(), name='document_restore' ), url( r'^multiple/restore/$', DocumentRestoreManyView.as_view(), name='document_multiple_restore' ), url( r'^(?P\d+)/delete/$', DeletedDocumentDeleteView.as_view(), name='document_delete' ), url( r'^multiple/delete/$', DeletedDocumentDeleteManyView.as_view(), name='document_multiple_delete' ), url( r'^(?P\d+)/type/$', document_document_type_edit, name='document_document_type_edit' ), url( r'^multiple/type/$', document_multiple_document_type_edit, name='document_multiple_document_type_edit' ), url( r'^(?P\d+)/trash/$', DocumentTrashView.as_view(), name='document_trash' ), url( r'^multiple/trash/$', DocumentTrashManyView.as_view(), name='document_multiple_trash' ), url( r'^(?P\d+)/edit/$', DocumentEditView.as_view(), name='document_edit' ), url( r'^(?P\d+)/print/$', DocumentPrint.as_view(), name='document_print' ), url( r'^(?P\d+)/reset_page_count/$', document_update_page_count, name='document_update_page_count' ), url( r'^multiple/reset_page_count/$', document_multiple_update_page_count, name='document_multiple_update_page_count' ), url( r'^(?P\d+)/download/form/$', DocumentDownloadFormView.as_view(), name='document_download_form' ), url( r'^(?P\d+)/download/$', DocumentDownloadView.as_view(), name='document_download' ), url( r'^multiple/download/form/$', DocumentDownloadFormView.as_view(), name='document_multiple_download_form' ), url( r'^multiple/download/$', DocumentDownloadView.as_view(), name='document_multiple_download' ), url( r'^(?P\d+)/clear_transformations/$', document_clear_transformations, name='document_clear_transformations' ), url( r'^(?P\d+)/version/all/$', DocumentVersionListView.as_view(), name='document_version_list' ), url( r'^document/version/(?P\d+)/download/form/$', DocumentVersionDownloadFormView.as_view(), name='document_version_download_form' ), url( r'^document/version/(?P\d+)/download/$', DocumentVersionDownloadView.as_view(), name='document_version_download' ), url( r'^document/version/(?P\d+)/revert/$', DocumentVersionRevertView.as_view(), name='document_version_revert' ), url( r'^(?P\d+)/pages/all/$', DocumentPageListView.as_view(), name='document_pages' ), url( r'^multiple/clear_transformations/$', document_multiple_clear_transformations, name='document_multiple_clear_transformations' ), url( r'^cache/clear/$', ClearImageCacheView.as_view(), name='document_clear_image_cache' ), url( r'^trash_can/empty/$', EmptyTrashCanView.as_view(), name='trash_can_empty' ), url( r'^page/(?P\d+)/$', DocumentPageView.as_view(), name='document_page_view' ), url( r'^page/(?P\d+)/navigation/next/$', document_page_navigation_next, name='document_page_navigation_next' ), url( r'^page/(?P\d+)/navigation/previous/$', document_page_navigation_previous, name='document_page_navigation_previous' ), url( r'^page/(?P\d+)/navigation/first/$', document_page_navigation_first, name='document_page_navigation_first' ), url( r'^page/(?P\d+)/navigation/last/$', document_page_navigation_last, name='document_page_navigation_last' ), url( r'^page/(?P\d+)/zoom/in/$', DocumentPageZoomInView.as_view(), name='document_page_zoom_in' ), url( r'^page/(?P\d+)/zoom/out/$', DocumentPageZoomOutView.as_view(), name='document_page_zoom_out' ), url( r'^page/(?P\d+)/rotate/left/$', DocumentPageRotateLeftView.as_view(), name='document_page_rotate_left' ), url( r'^page/(?P\d+)/rotate/right/$', DocumentPageRotateRightView.as_view(), name='document_page_rotate_right' ), url( r'^page/(?P\d+)/reset/$', DocumentPageViewResetView.as_view(), name='document_page_view_reset' ), # Admin views url( r'^type/list/$', DocumentTypeListView.as_view(), name='document_type_list' ), url( r'^type/create/$', DocumentTypeCreateView.as_view(), name='document_type_create' ), url( r'^type/(?P\d+)/edit/$', DocumentTypeEditView.as_view(), name='document_type_edit' ), url( r'^type/(?P\d+)/delete/$', DocumentTypeDeleteView.as_view(), name='document_type_delete' ), url( r'^type/(?P\d+)/documents/$', DocumentTypeDocumentListView.as_view(), name='document_type_document_list' ), url( r'^type/(?P\d+)/filename/list/$', DocumentTypeFilenameListView.as_view(), name='document_type_filename_list' ), url( r'^type/filename/(?P\d+)/edit/$', DocumentTypeFilenameEditView.as_view(), name='document_type_filename_edit' ), url( r'^type/filename/(?P\d+)/delete/$', DocumentTypeFilenameDeleteView.as_view(), name='document_type_filename_delete' ), url( r'^type/(?P\d+)/filename/create/$', DocumentTypeFilenameCreateView.as_view(), name='document_type_filename_create' ), ) api_urls = patterns( '', url( r'^trashed_documents/$', APIDeletedDocumentListView.as_view(), name='trasheddocument-list' ), url( r'^trashed_documents/(?P[0-9]+)/$', APIDeletedDocumentView.as_view(), name='trasheddocument-detail' ), url( r'^trashed_documents/(?P[0-9]+)/restore/$', APIDeletedDocumentRestoreView.as_view(), name='trasheddocument-restore' ), url(r'^documents/$', APIDocumentListView.as_view(), name='document-list'), url( r'^documents/recent/$', APIRecentDocumentListView.as_view(), name='document-recent-list' ), url( r'^documents/(?P[0-9]+)/$', APIDocumentView.as_view(), name='document-detail' ), url( r'^documents/(?P[0-9]+)/versions/$', APIDocumentVersionsListView.as_view(), name='document-version-list' ), url( r'^documents/(?P[0-9]+)/download/$', APIDocumentDownloadView.as_view(), name='document-download' ), url( r'^document_version/(?P[0-9]+)/$', APIDocumentVersionView.as_view(), name='documentversion-detail' ), url( r'^document_version/(?P[0-9]+)/revert/$', APIDocumentVersionRevertView.as_view(), name='documentversion-revert' ), url( r'^document_version/(?P[0-9]+)/download/$', APIDocumentVersionDownloadView.as_view(), name='documentversion-download' ), url( r'^document_page/(?P[0-9]+)/$', APIDocumentPageView.as_view(), name='documentpage-detail' ), url( r'^document_page/(?P[0-9]+)/image/$', APIDocumentPageImageView.as_view(), name='documentpage-image' ), url( r'^document_types/(?P[0-9]+)/documents/$', APIDocumentTypeDocumentListView.as_view(), name='documenttype-document-list' ), url( r'^document_types/(?P[0-9]+)/$', APIDocumentTypeView.as_view(), name='documenttype-detail' ), url( r'^document_types/$', APIDocumentTypeListView.as_view(), name='documenttype-list' ), )