Commit Graph

63 Commits

Author SHA1 Message Date
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
Roberto Rosario
8cc05bbefb Initial commit of new document upload workflow which allows for document promises to be returned after POST request, gh-issue #194. Add new signal when a document is uploaded and finally ready, gh-issue #193 and gh-issue #213. 2015-07-05 03:33:27 -04:00
Roberto Rosario
ace76fc69c Update apps for new ACLs refactor. 2015-07-01 16:36:20 -04:00
Roberto Rosario
1c084aa07b Split Permission and StoredPermission class and model into different modules. Simplified the Permission class. 2015-06-28 01:03:29 -04:00
Roberto Rosario
d26402974a Allow registering permission from the permission namespace. Replace all permission variables to be lowercase (style guide reserver uppercase variables for constants and literals). 2015-06-28 00:19:49 -04:00
Roberto Rosario
78198f3398 Smart settings refactor 2015-06-22 21:04:06 -04:00
Roberto Rosario
dc35ed6948 Add TODO reminder 2015-06-16 16:20:56 -04:00
Roberto Rosario
f4752a3f3f Further converter refactor and initial move from document-centric to page-centric image generation. Issue #93. 2015-06-06 06:26:44 -04:00
Roberto Rosario
b55acb6e12 Normalize import style 2015-01-24 17:05:32 -04:00
Roberto Rosario
d59ea3ede2 Add from __future__ import unicode_literals, issue #37 2015-01-19 04:06:40 -04:00
Roberto Rosario
1ffba7e40f Increase preview task timeout to 60 seconds to cover for even the wost load scenario. Consolidate literal to store the timeout value. 2015-01-13 02:56:13 -04:00
Roberto Rosario
790c5745f8 Add API endpoint to return the list of recent document for the current user 2014-12-13 05:32:27 -04:00
Roberto Rosario
e3f3553965 Merge new document API view with the document list API view (as a POST action) 2014-12-09 03:26:25 -04:00
Roberto Rosario
af51acebf5 Isse #56, Remove document versions major, minor and micro versioning fields 2014-12-09 03:15:23 -04:00
Roberto Rosario
c352be11bb Don't allow overidding the use when creating a new document, use the request user 2014-11-03 01:24:38 -04:00
Roberto Rosario
66538763bf Fix super calling method of document type list and delete views 2014-10-30 09:58:54 -04:00
Roberto Rosario
06bb9e9753 Update document creation API call to use SharedUploadedFile model 2014-10-29 05:52:52 -04:00
Roberto Rosario
9b037e3b9d Improve document's apps API endpoints docstrings 2014-10-27 15:08:08 -04:00
Roberto Rosario
744d8ec0d8 Make the new document label optional, the backend will use the filename is none is specified 2014-10-27 05:19:41 -04:00
Roberto Rosario
9c9632f920 Add proper document creation API endpoint 2014-10-27 04:49:29 -04:00
Roberto Rosario
eaefa305a2 Issue #56, remove document version fields 'release_level' and 'serial' 2014-10-18 02:32:11 -04:00
Roberto Rosario
8bac1525be PEP8 cleanups 2014-10-08 19:39:16 -04:00
Roberto Rosario
4b6c826574 Increase timeouts for the image conversion tasks 2014-10-07 19:38:14 -04:00