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
36a51eeb73
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 solves name clashes 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 >
2019-04-05 02:02:57 -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
765530b386
Add missing field in field registration tuple.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-03-14 16:55:57 -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
31580ee51d
Add size field to the document version serializer.
...
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com >
2017-03-09 13:32:03 -04:00
Roberto Rosario
df4aabcc0a
Merge remote-tracking branch 'origin/master' into merge_test
2017-02-16 22:12:09 -04:00
Jesaja Everling
0b2406d616
Added DocumentTypeFilenameSerializer to display Quick links inline
2017-02-14 19:56:11 +02: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
5de3a60725
Rename the document type serializer link to its documents to documents_url
...
according to the new guidelines.
2017-02-08 17:03:57 -04:00
Roberto Rosario
7340989dc5
Fix trashed document list API view. Add addition trashed document API tests.
2017-02-07 20:46:30 -04:00
Roberto Rosario
5f99b123d7
Merge branch 'master' into master_merge
2017-02-03 14:08:34 -04:00
Roberto Rosario
73a4b685f0
Merge branch 'feature/hotfixes' of gitlab.com:mayan-edms/mayan-edms into feature/hotfixes
2017-02-02 00:44:11 -04:00
Roberto Rosario
3634284c5c
Set the document type in the document serializer to read only.
...
This change improves PUT requests and changing the document type
via the API is not supported anyways.
2017-01-30 00:46:56 -04:00
Roberto Rosario
7edb08a7cd
This is an issue of the DRF browseable interface. The exception is shown
...
in the Swagger interface or via CURL.
Revert "Model.save() errors are being silently ignored by Django REST Framework."
This reverts commit 288de26d2b .
2017-01-28 20:50:42 -04:00
Roberto Rosario
288de26d2b
Model.save() errors are being silently ignored by Django REST Framework.
...
Force raising a ValidationError on Model.save() errors.
GitLab issue #348 and #349 .
2017-01-28 18:13:27 -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
28f3b7551d
Consolidate document page image generation as binary or base64 to a single place at the converter class level.
2016-03-21 03:44:45 -04:00
Roberto Rosario
7a45164251
PEP8 cleanups.
2015-08-25 19:17:55 -04:00
Roberto Rosario
7392e80fc2
PEP8 Cleanups.
2015-08-24 20:55:45 -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
0b1230f214
Update serializer settings code.
2015-07-15 01:04:16 -04:00
Roberto Rosario
7e9fa745c6
'Expand' is no longer a feature of the document's apps, but of the source's app, remove it from the document's serializer.
2015-07-06 02:21:56 -04:00
Roberto Rosario
d59ea3ede2
Add from __future__ import unicode_literals, issue #37
2015-01-19 04:06:40 -04:00
Roberto Rosario
fd1f5d1dad
Make document language choices a configurable list. Issue #137 .
...
To override the default list of 600+ languages add a configuration entry to your settings/local.py like so:
DOCUMENTS_LANGUAGE_CHOICES = [('eng', 'English'), ('deu', 'German')]
to make the list translatable import ugettext_lazy and enclose the language name with _():
from django.utils.translation import ugettext_lazy as _
DOCUMENTS_LANGUAGE_CHOICES = [('eng', _('English')), ('deu', _('German'))]
2015-01-14 02:22:47 -04:00
Roberto Rosario
fd2286393d
Don't depend on data not available at DB init time
2015-01-05 02:02:01 -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
81a85e6de8
Document type, folder and tags API serializer now return a numeric count of the documents contained instead of a link to the document list API endpoint
2014-12-13 05:03:15 -04:00
Roberto Rosario
741ac66bd9
Inline the document type information in the document structure
2014-12-13 04:53:19 -04:00
Roberto Rosario
84493b7a72
PEP8 Cleanups
2014-11-11 14:58:37 -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
ab555ddaff
Include the label in the document serializer
2014-10-30 11:02:25 -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
dd35196492
Improve API view to retreive documents of a type
2014-10-07 14:52:11 -04:00
Roberto Rosario
b709426043
Add id to the document serializer, add required=False to the document type <-> document serialierz relation
2014-09-21 23:15:55 -04:00
Roberto Rosario
364376f04a
Specify document type fields and add the id field
2014-09-21 19:22:48 -04:00
Roberto Rosario
e522da3632
Add retrieving all documents of document type via API
2014-09-21 15:22:12 -04:00
Roberto Rosario
2e4cd173c6
Add document type detail API endpoint
2014-09-21 15:13:56 -04:00
Roberto Rosario
133eb2d094
Allow new document version to be created without having to specify the document
2014-07-24 00:37:52 -04:00
Roberto Rosario
e168898248
Make API writable
2014-07-22 02:32:06 -04:00
Roberto Rosario
3bed82fc16
PEP8 cleanup, unused imports, missing imports, style cleanups
2014-07-10 02:45:19 -04:00
Roberto Rosario
c7a3afc35a
Add serializers, document api endpoints, rename url parameter for clarity
2014-07-09 14:24:32 -04:00
Roberto Rosario
a40fe3719b
Rename the resources.py module to serializers.py
2014-07-08 23:47:52 -04:00