From 308099c0c2db93e3316363ea5f9212277761df90 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 8 Jul 2014 19:51:12 -0400 Subject: [PATCH] Prepend API to the API views --- mayan/apps/sources/api.py | 8 ++++---- mayan/apps/sources/urls.py | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mayan/apps/sources/api.py b/mayan/apps/sources/api.py index cd20fefeeb..78818aba37 100644 --- a/mayan/apps/sources/api.py +++ b/mayan/apps/sources/api.py @@ -23,7 +23,7 @@ logger = logging.getLogger(__name__) # API Views -class StagingSourceFileView(generics.GenericAPIView): +class APIStagingSourceFileView(generics.GenericAPIView): """ Details of the selected staging file. """ @@ -32,7 +32,7 @@ class StagingSourceFileView(generics.GenericAPIView): return Response(SerializerStagingFolderFile(staging_folder.get_file(encoded_filename=filename), context={'request': request}).data) -class StagingSourceListView(generics.ListAPIView): +class APIStagingSourceListView(generics.ListAPIView): """ Returns a list of all the staging folders and the files they contain. """ @@ -41,7 +41,7 @@ class StagingSourceListView(generics.ListAPIView): queryset = StagingFolder.objects.all() -class StagingSourceView(generics.RetrieveAPIView): +class APIStagingSourceView(generics.RetrieveAPIView): """ Details of the selected staging folders and the files it contains. """ @@ -49,7 +49,7 @@ class StagingSourceView(generics.RetrieveAPIView): queryset = StagingFolder.objects.all() -class StagingSourceFileImageView(generics.GenericAPIView): +class APIStagingSourceFileImageView(generics.GenericAPIView): """ Image of the selected staging file. """ diff --git a/mayan/apps/sources/urls.py b/mayan/apps/sources/urls.py index 7be35a5225..d289bc3b64 100644 --- a/mayan/apps/sources/urls.py +++ b/mayan/apps/sources/urls.py @@ -2,8 +2,8 @@ from __future__ import absolute_import from django.conf.urls import patterns, url -from .api import (StagingSourceListView, StagingSourceView, - StagingSourceFileView, StagingSourceFileImageView) +from .api import (APIStagingSourceListView, APIStagingSourceView, + APIStagingSourceFileView, APIStagingSourceFileImageView) from .literals import (SOURCE_CHOICE_WEB_FORM, SOURCE_CHOICE_STAGING, SOURCE_CHOICE_WATCH) from .wizards import DocumentCreateWizard @@ -40,8 +40,8 @@ urlpatterns = patterns('sources.views', ) api_urls = patterns('', - url(r'^staging_folders/file/(?P[0-9]+)/(?P.+)/image/$', StagingSourceFileImageView.as_view(), name='stagingfolderfile-image-view'), - url(r'^staging_folders/file/(?P[0-9]+)/(?P.+)/$', StagingSourceFileView.as_view(), name='stagingfolderfile-detail'), - url(r'^staging_folders/$', StagingSourceListView.as_view(), name='stagingfolder-list'), - url(r'^staging_folders/(?P[0-9]+)/$', StagingSourceView.as_view(), name='stagingfolder-detail') + url(r'^staging_folders/file/(?P[0-9]+)/(?P.+)/image/$', APIStagingSourceFileImageView.as_view(), name='stagingfolderfile-image-view'), + url(r'^staging_folders/file/(?P[0-9]+)/(?P.+)/$', APIStagingSourceFileView.as_view(), name='stagingfolderfile-detail'), + url(r'^staging_folders/$', APIStagingSourceListView.as_view(), name='stagingfolder-list'), + url(r'^staging_folders/(?P[0-9]+)/$', APIStagingSourceView.as_view(), name='stagingfolder-detail') )