Commit Graph

36 Commits

Author SHA1 Message Date
Jesaja Everling
0b2406d616 Added DocumentTypeFilenameSerializer to display Quick links inline 2017-02-14 19:56:11 +02: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
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
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