Commit Graph
41 Commits
Author SHA1 Message Date
Roberto Rosario 8b9e605e0b When changing document types, don't delete the old metadata that is
also found in the new document type. GitLab issue #421.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-08-24 19:44:08 -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 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 b58fa7e241 Return metadata type lookup values as list of unicode not list of strings.
Fixed GitLab issue #310, thank for @fordguo for the find and fix suggestion.
2017-02-03 16:20:45 -04:00
Roberto Rosario 516920f833 Be more explicit about which requied metadata type is missing. 2016-05-12 01:33:10 -04:00
Roberto Rosario 59624d75cb Fix GitLab issue #250 "Empty optional lookup metadata trigger validation error". Thanks to LeVon Smoker for the find and for the proposed fix.
Reference: https://groups.google.com/forum/#!topic/mayan-edms/VUGRl4xX-1c
2016-02-09 13:00:45 -04:00
Roberto Rosario 79c5a103a2 Fix GitLab issue #243, "System allows a user to skip entering values for a required metadata field while uploading a new document". 2016-01-12 02:40:47 -04:00
Roberto Rosario e57080b06d Style updates. 2015-10-19 01:21:43 -04:00
Roberto Rosario 7392e80fc2 PEP8 Cleanups. 2015-08-24 20:55:45 -04:00
Roberto Rosario 1d7f447dad Raise validation error without specifying the field as this code can be called for a collection of instances. 2015-08-23 22:44:47 -04:00
Roberto Rosario 9599a3f8ab Split metadata validators in validators and parsers. Move document and upload wizard metadata validation logic to model. Add metadata tests. 2015-08-20 04:37:49 -04:00
Roberto Rosario 60bc327756 Improve SourceColumn workflow by allowing explicit functions as columns. Remove usage of encapsulate. Move instances of 'extra_columns' to SourceColumn. 2015-08-16 14:26:41 -04:00
Roberto Rosario 7cae9dd18e Update the smart link app to use Django templating language. gh-issues #151. 2015-07-28 02:44:33 -04:00
Roberto Rosario 0a0a92116e Get rid of eval in metadata type default and lookup fields. gh-issue #151. 2015-07-23 02:49:29 -04:00
Roberto Rosario 58d919d173 Initial commit to remove use of eval. gh-issue #151. 2015-07-22 23:19:43 -04:00
Roberto Rosario e891fe9525 PEP8 cleanups and code style cleanups. 2015-07-10 17:19:36 -04:00
Roberto Rosario f4bcab2341 Rename metadata type title field to label. 2015-07-07 23:25:05 -04:00
Roberto Rosario 0e81ea2ab8 Avoid triggering migration creation using functions for choices and validators choices. 2015-07-07 21:21:08 -04:00
Roberto Rosario 78198f3398 Smart settings refactor 2015-06-22 21:04:06 -04:00
Roberto Rosario 26d64c45f5 Add the @python_2_unicode_compatible to all models. Closes issue #67 2015-04-01 02:40:19 -04:00
Roberto Rosario d59ea3ede2 Add from __future__ import unicode_literals, issue #37 2015-01-19 04:06:40 -04:00
Roberto Rosario f5e1adedfa Add field to set validation function separately from the lookup field 2015-01-14 15:50:41 -04:00
Roberto Rosario 35821df7ee Add TODO reminder 2015-01-03 12:17:36 -04:00
Roberto Rosario 82bedefff6 Add unicode method, update and optimize validation code 2014-12-08 19:34:40 -04:00
Roberto Rosario 704abb7059 Use related_name 'metadata' to access document types' metadata types 2014-12-08 18:37:54 -04:00
Roberto Rosario 5050c7319c Remove preemptive document metadata selection 2014-12-08 18:33:57 -04:00
Roberto Rosario 4aa84b778c Only allow one instance of a metadata type per document 2014-12-02 00:43:56 -04:00
Roberto Rosario 8194e898a0 Make the title field of the MetatadaType model a required field 2014-11-11 04:23:31 -04:00
Roberto Rosario 8a54e2bde4 Add flag to allow signals to bypass metadata validation 2014-11-03 00:09:58 -04:00
Roberto Rosario 5ca3684712 Reduce number of queries for document metadata retrieval 2014-11-02 23:41:12 -04:00
Roberto Rosario d92bd67331 Add validation to block removal of required metadata types from a document 2014-10-30 03:20:37 -04:00
Roberto Rosario 95a27df1e3 Change the way metadata types are associated to a document type, add required boolean field to the association 2014-10-30 02:24:12 -04:00
Roberto Rosario 6eb6c43807 Automatically the appropiate metadata types when the document's type is changed 2014-10-28 02:01:59 -04:00
Roberto Rosario 21d51accec Make sure the metadata being added is allowed 2014-10-27 23:21:13 -04:00
Roberto Rosario 92c76d9f33 Issue #56, Remove Metadata Sets 2014-10-21 17:14:31 -04:00
Roberto Rosario 8bac1525be PEP8 cleanups 2014-10-08 19:39:16 -04:00
Roberto Rosario 06dd1b3368 Issue #39, Explicitly captalize string now that they are not capitalized blindly by the templates 2014-10-02 01:17:27 -04:00
Roberto Rosario e9717d9bdd Add reminder to add functionality 2014-07-20 17:25:15 -04:00
Roberto Rosario 66fd17a3fb Remove the translatable text manipulation, add remarks 2014-07-20 16:55:30 -04:00
Roberto Rosario 5e3d5c7fcb Use metadata model's related name to address a document's metadata instances 2014-06-25 03:01:27 -04:00
Roberto Rosario ec1745b50b Initial changes to support the new Django 1.6 project structure 2014-06-15 13:13:21 +02:00