Commit Graph

48 Commits

Author SHA1 Message Date
Roberto Rosario
5b37c7715d Fix document page render
Solve page_number > 1 error.
Add page_all to Document model.
Enable redactions.
Remove unused methods.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-09 00:38:08 -04:00
Roberto Rosario
8cf807899a Initial commit to support page mapping
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-08 18:45:53 -04:00
Roberto Rosario
4ecf075fd4 Add support for disabling document pages
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-07-30 03:11:20 -04:00
Roberto Rosario
2e1600c334 Remove obsolete DocumentPageCachedImage manager
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-07-29 02:53:07 -04:00
Roberto Rosario
f920dffc01 Remove document model cache invalidation
The cache invalidation is now handled by the file caching app.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-07-26 01:33:41 -04:00
Roberto Rosario
74c97314d7 Code style cleanups
Add keyword arguments. Sort arguments and models.
Move literals to their own module. Prepend handler_ to
signal handlers.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2019-04-26 03:32:35 -04:00
Roberto Rosario
c0f51103d2 Move stub filtering to the Document model manager
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2019-04-13 22:39:22 -04:00
Roberto Rosario
a96e7574b2 Add support for natural keys to the DocumentPageImageCache model.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-09-21 00:47:11 -04:00
Roberto Rosario
26b31da443 Add favorite documents per user. Adds new setting option DOCUMENTS_FAVORITE_COUNT.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-23 01:50:35 -04:00
Roberto Rosario
9a7e95f5b7 Add recently added document list view. The setting DOCUMENTS_RECENT_COUNT has been renamed to DOCUMENTS_RECENT_ACCESS_COUNT. New setting DOCUMENTS_RECENT_ADDED_COUNT added.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-22 04:06:46 -04:00
Roberto Rosario
5cd7ac88d6 Code cleanups.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-14 03:41:07 -04:00
Roberto Rosario
0626529228 Add natural key support to Document pages.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-03 18:52:13 -04:00
Roberto Rosario
e18c043c1f Improve natural key handing for the Document, Metadata, DocumentMetadata, DocumentTypeOCRSetting and UserProfileLocale models.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-02 16:00:22 -04:00
Roberto Rosario
c665e75871 Improve serialization migration for the models: Document, DocumentVersion, DocumentMetadata and DocumentTypeOCRSettings
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-08-01 05:09:43 -04:00
Roberto Rosario
57e7722f59 Don't show documents with 0 duplicates in the duplicated document list.
Also clean up the duplicated document model after a document is deleted.
Fix queue name typo.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-04-02 01:45:30 -04:00
Michael Price
8a3f9c7e4e Don't scan documents without at least a version for duplicates.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:00:12 -04:00
Roberto Rosario
f09321f6ab Fix deprecation warnings for Django 1.11 and Django 2.0.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-07-21 00:25:18 -04:00
Roberto Rosario
d4e1a506ed Add duplicated document scan support.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-07-06 02:56:35 -04:00
Roberto Rosario
1e194e04fa Move new version creation blocking from the documents app to the checkouts app.
Closes GitLab #294.
2016-12-22 01:45:43 -04:00
Roberto Rosario
45f90cce50 Return the instance when a document is added as recent for an user. 2016-03-19 02:20:01 -04:00
Roberto Rosario
da4c41c5b2 Change the way new document version are blocked, moving the logic to the documents app from the checkouts app signal handler. Disable the upload new document version button and have the new version upload view redirect to the document version list with a message. GitLab issue #231. 2015-10-23 06:06:59 -04:00
Roberto Rosario
5f9c847239 Move stub deletion code from tasks.py to the manager of the Document model. 2015-10-21 01:34:03 -04:00
Roberto Rosario
e791f2d36c Get deserialized documents by UUID only. 2015-10-19 01:21:16 -04:00
Roberto Rosario
32c7b0e379 Fix import typo. 2015-10-19 00:56:24 -04:00
Roberto Rosario
6e43b99ecd Add natural key serialization. 2015-10-17 05:13:58 -04:00
Roberto Rosario
3e7cd0c1ea Move retention policies enforcement code to the DocumentType model manager. Add corresponding tests (test_auto_trashing and test_auto_delete). 2015-09-27 00:35:56 -04:00
Roberto Rosario
48ac049736 Avoid using a loop when calculating recent document list. 2015-08-24 03:29:13 -04:00
Roberto Rosario
1e746c700a PEP8 cleanups. 2015-07-27 23:53:14 -04:00
Roberto Rosario
c2a0990e57 Change deprecated import of get_model. 2015-07-12 02:58:31 -04:00
Roberto Rosario
b642e4005e PEP8 cleanups 2015-07-06 02:07:50 -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
3e299f030a Add support to fully delete documents from trash can. Rename previous delete link and related code to 'move to trash'. gh-issue #188. 2015-07-03 18:35:10 -04:00
Roberto Rosario
98b988038e Implement document trash can and soft delete support. First half or gh-issue 188. 2015-07-03 03:28:02 -04:00
Roberto Rosario
78198f3398 Smart settings refactor 2015-06-22 21:04:06 -04:00
Roberto Rosario
394a90458a Improve way to cache document page images and invalidate them. Update related code. 2015-06-16 16:20:17 -04:00
Roberto Rosario
9db47a843f Convert documents app to new transformation system 2015-06-08 15:56:57 -04:00
Roberto Rosario
d59ea3ede2 Add from __future__ import unicode_literals, issue #37 2015-01-19 04:06:40 -04:00
Roberto Rosario
bed7137496 Don't require a label for new documents at the model manager level, use the filename by default 2015-01-03 23:35:19 -04:00
Roberto Rosario
84493b7a72 PEP8 Cleanups 2014-11-11 14:58:37 -04:00
Roberto Rosario
5bb21775f7 Add transaction.atomic, make sure the default language is used, return a list of versions not documents 2014-10-29 05:49:41 -04:00
Roberto Rosario
ea68e195b1 Issue #8, when a document is added force the change document type signal 2014-10-28 01:37:16 -04:00
Roberto Rosario
9c9632f920 Add proper document creation API endpoint 2014-10-27 04:49:29 -04:00
Roberto Rosario
e6c2628b2e Add document model manager to simplify and encapsulate document creation 2014-10-23 16:57:20 -04:00
Roberto Rosario
8cc8e8abc6 Simplify code, remove import 2014-10-18 01:00:39 -04:00
Roberto Rosario
b761037d99 Move all settings files from <app>/conf/settings.py to <app>/settings.py 2014-09-11 05:02:40 -04:00
Roberto Rosario
6b169b4526 Modernize exception handling, and improves Python 3.x compatibility 2014-07-20 16:42:30 -04:00
Roberto Rosario
d640eacec8 Update usage of datetime.now to Django timezone aware now() 2014-06-29 17:00:07 -04:00
Roberto Rosario
ec1745b50b Initial changes to support the new Django 1.6 project structure 2014-06-15 13:13:21 +02:00