Refactor rest_api app and the method end points are registered. All apps API URL endpoints are now registered under the 'rest_api' namespace.

Update DRF and DRF swagger versions. Update all apps API registration method.
This commit is contained in:
Roberto Rosario
2015-08-06 02:51:23 -04:00
parent ea02172a82
commit 960d60c39d
23 changed files with 680 additions and 418 deletions

View File

@@ -39,7 +39,7 @@ class DocumentIndexingApp(MayanAppConfig):
def ready(self):
super(DocumentIndexingApp, self).ready()
APIEndPoint('indexes', app_name='document_indexing')
APIEndPoint(app=self, version_string='1')
app.conf.CELERY_QUEUES.append(
Queue('indexing', Exchange('indexing'), routing_key='indexing'),
@@ -85,15 +85,6 @@ class DocumentIndexingApp(MayanAppConfig):
menu_setup.bind_links(links=(link_index_setup,))
menu_tools.bind_links(links=(link_rebuild_index_instances,))
post_document_created.connect(
document_created_index_update,
dispatch_uid='document_created_index_update', sender=Document
)
post_save.connect(
document_metadata_index_update,
dispatch_uid='document_metadata_index_update',
sender=DocumentMetadata
)
post_delete.connect(
document_index_delete, dispatch_uid='document_index_delete',
sender=Document
@@ -103,3 +94,12 @@ class DocumentIndexingApp(MayanAppConfig):
dispatch_uid='document_metadata_index_post_delete',
sender=DocumentMetadata
)
post_document_created.connect(
document_created_index_update,
dispatch_uid='document_created_index_update', sender=Document
)
post_save.connect(
document_metadata_index_update,
dispatch_uid='document_metadata_index_update',
sender=DocumentMetadata
)