Roberto Rosario
023d82c96c
Update document API to use new MayanAPIviewset
...
Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@mayan-edms.com >
2019-02-19 03:37:16 -04:00
Roberto Rosario
74dfa53787
Update documents app
...
Rename the DeletedDocument proxy model to a TrashedDocument.
Rename the deleted_document views to trashed_document.
Rename the document and deleted_document URL parameters to
trashed_document.
Update URL parameters to the '_id' form.
Add keyword arguments.
Update use of .filter_by_access().
Enclose trashed document restore method in a transaction.
Sort arguments.
Update app for compliance with MERCs 5 and 6.
Add document page view tests.
Add favorite document view tests.
Movernize tests.
Replace use of urlencode with furl.
Update views to use ExternalObjectMixin.
Refactor the document and version download views.
Rename the DocumentDocumentTypeEditView to DocumentChangeTypeView.
Move the trashed document views to their own module.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com >
2019-01-28 05:25:48 -04:00
Roberto Rosario
35ef8ba7b8
Update documents app to comply with MERCs 5
...
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com >
2018-12-31 02:55:43 -04:00
Roberto Rosario
798446f362
Add klass argument to get_object_or_404 usage
...
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com >
2018-12-16 01:55:33 -04:00
Roberto Rosario
ab1482152e
Documents, Mailer: Sort imports, minor style fix
...
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com >
2018-12-07 17:20:00 -04:00
Roberto Rosario
8e69178e07
Project: Switch to full app paths
...
Instead of inserting the path of the apps into the Python app,
the apps are now referenced by their full import path.
This app name claves with external or native Python libraries.
Example: Mayan statistics app vs. Python new statistics library.
Every app reference is now prepended with 'mayan.apps'.
Existing config.yml files need to be updated manually.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-12-05 02:04:20 -04:00
Roberto Rosario
89d3fb9922
Cache: Beta stage
...
Add retry to race condition in intermediate image generation.
Remove DB index from cache file size field.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-12-03 04:26:00 -04:00
Roberto Rosario
77fc9b5831
Caching: MVP stage
...
Working implementation with three levels of organization per cache.
Cache -> Partition -> File.
Current non blocking lock for the intermediate file generation needs
to be replaced to a blocking lock.
Needs tests.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-12-02 05:00:35 -04:00
Roberto Rosario
52bbf62e26
Documents: PEP8 and code style cleanups
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-11-29 02:11:26 -04:00
Roberto Rosario
cb408c768d
PEP8: Code cleanups
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-11-27 04:26:56 -04:00
Roberto Rosario
4ee6add201
Documents: Document image API transformations
...
Add transformations support to the document image API.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-11-16 21:43:49 -04:00
Roberto Rosario
565f6caa0d
Add missing .value method to the document image cache setting usage.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-08 02:26:36 -04:00
Roberto Rosario
c9bb13f149
Add support for client side caching of document page images. The time
...
the images are cached is controlled by the new setting
DOCUMENTS_PAGE_IMAGE_CACHE_TIME which defaults to 3600 seconds (1 hour).
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-08-08 01:31:21 -04:00
Roberto Rosario
694f7675e5
Use the passthrough manager to be able to show previews for trashed documents again.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-06-08 17:38:28 -04:00
Roberto Rosario
da5445eef9
Rename the storages instance names for consistency.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-05 19:30:59 -04:00
Michael Price
424d6a5af9
Standardize the way storages are used. All apps that use storage now define their storages in the .storages modules instead of the .runtime module. The storage.backends.filebasedstorage.FileBasedStorage has been remove, instead Django's default storage is used and each app is responsible of specifying their default path.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-03 02:32:28 -04:00
Michael Price
de65d96fe2
Update cabinets and document_index api views docstrings. Update multi level docstrings as per Python best practices.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 20:27:45 -04:00
Michael Price
1fc06a350b
Consolidate the docstring of the API methods into a class docstring.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 20:22:35 -04:00
Michael Price
b9f7326f6f
Remove redundant get_serializer_context as this is already passed to the serializer by default.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 20:21:47 -04:00
Michael Price
8590bff6e4
Convert document thumbnails, preview, image preview and staging files to template base widgets. Unify all updated widgets. Display resolution settings are now specified as width and height and not a single resolution value.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 20:04:05 -04:00
Michael Price
afd4748426
Don't try to return a serializer if there is no request object. Used when the API view is being introspected.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 20:00:27 -04:00
Michael Price
9ca7ca5ce6
Make sure the document page image API goes via the proper queryset filtering.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 19:53:23 -04:00
Michael Price
4378b28777
Update API vies and serializers for the latest Django REST framework version. Replace DRF Swagger with DRF-YASG.
...
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 18:31:22 -04:00
Michael Price
b45be228d2
Update the remaining document app API tests to test with and without permissions.
...
Update the remaining API tests to conform to the updated API test class interface.
Signed-off-by: Michael Price <loneviking72@gmail.com >
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2018-04-01 02:30:37 -04:00
Michael Price
68c572bd6e
Require the document view permission to view the details of a trashed document.
...
Add a get method override to document the API endpoint.
Signed-off-by: Michael Price <loneviking72@gmail.com >
2018-04-01 01:33:27 -04:00
Roberto Rosario
1faa63f56c
Move extension preservetation code to the model. Improve document,
...
version and API views to include proper mimetype and encoding.
Update respective tests. GitLab issue #415 .
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-08-15 00:18:34 -04:00
Roberto Rosario
16e0b0e0e7
Add new document version list view permission. GitLab issue #379
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-14 22:09:01 -04:00
Roberto Rosario
6c6ca38374
Replace all instances of unicode only handling to use force_text.
...
Replace all __unicode__ methods to __str__ and the
@python_2_unicode_compatible decorator.
Replace all instance of smart_str, smart_unicode, force_uncode
with force_text.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-05 15:03:24 -04:00
Roberto Rosario
6b424b0eb1
Improve the documentation of the document creation API endpoint.
...
GitHub issue #255 . Thanks to @lcerliani opening the issue.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-07-04 20:28:36 -04:00
Roberto Rosario
63682a2945
Merge remote-tracking branch 'origin/master' into feature/master_merge
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-03-14 15:57:38 -04:00
Roberto Rosario
7341971c86
The deleted document restore API endpoint doesn't need a serializer.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-03-13 22:38:22 -04:00
Roberto Rosario
dd63bf3c7c
Fix key name typo in document page image generation.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-02-23 04:07:24 -04:00
Roberto Rosario
81e090f375
Update the document app API endpoints.
...
Use resource/<pk>/subresource/<pk> scheme.
2017-02-14 02:42:40 -04:00
Roberto Rosario
ce6f59b9bd
Merge remote-tracking branch 'origin/master' into feature/merge_master
2017-02-13 21:00:56 -04:00
Roberto Rosario
92ac4dc2f7
Add writable versions of the Document and Document Type serializers (GitLab issues #348 and #349 ).
2017-02-12 03:11:24 -04:00
Roberto Rosario
0992e22568
Typecast to integers only when there is querystring data.
2016-11-04 01:33:44 -04:00
Roberto Rosario
2cdee10d50
Make sure transformation arguments are always valid.
2016-11-03 15:34:32 -04:00
Roberto Rosario
5893e149e0
Reduce the check_access boilerplate code.
2016-11-02 04:58:05 -04:00
Roberto Rosario
c0194c63dc
Refactor document page image generation and transformation classes
...
to cache all transformed versions of a document page.
2016-11-02 02:34:57 -04:00
Roberto Rosario
6e3d99670c
Complete conversion of download views to CBV views using django-downloadview.
...
This also removes dependency on the filetransfers library.
2016-10-31 01:00:35 -04:00
Roberto Rosario
6dcbd62c15
Update all mention of "deleted documents" to "trashed documents" in the document app API. GitLab issue #276 .
2016-05-10 19:03:00 -04:00
Roberto Rosario
8bdd4ba452
Add API views to download documents and document versions.
2015-10-07 02:42:36 -04:00
Roberto Rosario
0d591e7ff6
Reorganize methods as per design document.
2015-09-17 02:56:46 -04:00
Roberto Rosario
960d60c39d
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.
2015-08-06 02:56:17 -04:00
Roberto Rosario
1e746c700a
PEP8 cleanups.
2015-07-27 23:53:14 -04:00
Roberto Rosario
4527563d89
PEP8 cleanups, specially E501 line too long.
2015-07-22 18:21:37 -04:00
Roberto Rosario
6b5312ff41
Update document creation API to return the id of the created document.
2015-07-15 01:02:24 -04:00
Roberto Rosario
133fcdc53c
Assign tasks to specific queues. Add support for transient queues. gh-issue #222 , gh-issue #230 .
2015-07-10 21:25:20 -04:00
Roberto Rosario
e891fe9525
PEP8 cleanups and code style cleanups.
2015-07-10 17:19:36 -04:00
Roberto Rosario
8bdd8e032d
Update documents app API views.
2015-07-06 03:02:17 -04:00