Features
* Added 'get_courrier_type' endpoint that return a 'courrier type' for a given type_dossier
* Added url parameter 'type_dossier_detaille' to 'create_dossier' to post it in the request body
* Replaced the way 'type fichier' is defined: now looks into 'XXX_type_raw' for file 'XXX'
Fixes
* Url components are now encoded
* Pylint warnings
* Loging do not raise an error when 'files' var is empty in 'create_dossier'
Tests
* Added 2 new errors tests to 'test_create_dossier'
* Added 'test_get_courrier_type' to test endpoint 'get_courrier_type'
* Fixed pylint warnings
Features:
* A connector now can be associated with 'collectivites',
and each of them can have one 'guichet'.
A 'collectivite' have a name and an openADS technical identifier
A 'guichet' allow to define hours and days for when its 'collectivite' is "open"
* Each of those entities have a view to CRUD it
* For entity ForwardFile:
- Added association with a connector, and eventually a 'collectivite'
- Added ForwardFiles 'size' field
- Added updating fields 'content_type', 'file_hash' and 'size' on save()
- Added custom validation on save()
* For entity AtrealOpenads:
- Added permissions on each endpoint
- Added 'email' field support for each type of 'demandeur'
- 'numero_dossier' is now required in the url for some endpoints (previously was a GET param)
- Added 'upload_user_files' as an endpoint (but can still be used as a method with request=None)
- The 'upload_user_files()' method now only handle forward file that have status='pending'
Fixes:
* Added "*args" and "**kwargs" arguments to some connector endpoint methods
* Added 'verbose_name' and 'ordering' on each entity META
* Added decorator '@force_encoded_string_output' to prevent utf-8 issues with python2
* Added __repr__, __str__ and __unicode__ functions to each entities
* Added database indexes for each entity
* Commented out useless JSON schema imports
* Removed unused variable assignations
Refactoring:
* Moved utilities functions to utils.py file
* Added a BaseModel to provide some default functions for Models
* Added enum/translations of hard-coded values for ForwardFile 'upload_status' field
Tests:
* Added test for each entity
* Added tests files specific to utilities, forms and views
* Total code coverage is 99% with only 10 statement missed
Features:
* replaced the loging of json payload with the use of a DictDumper that lazy truncate strings too long
* homogenize error messages
Fixes:
* changed the signature of 'check_file_dict()' to match other functions and fix a bug
* changed the signature of 'upload2ForwardFile()' to force input for 'type_fichier' argument
Refactoring:
* removed dead code in 'upload_user_files()'
* using 'basestring' instead of testing for 'str' and 'unicode'
* renamed 'requerant' by 'demandeur'
* removed useless and maybe problematic 'join()' (forgotten from the previous commit)
* added more comments
Tests:
* 100% test coverage!
* fixed failing tests
* added tests for every function
* completed missing tests (mostly for exceptions)
* added more comments
* added the lines of missing statement in the coverage report
Feature:
* JSON Schema input validation enabled (again)
Fixes:
* utf-8 decode error fixed: added unicode to litterals
* removed useless and maybe problematic 'str()' forced casting
* remove useless and maybe problematic 'join()' on list of file ids
Refactoring:
* property 'extra_debug_enabled' removed (not used since some commits)
* in function 'normalize()' only cast to 'unicode' if value is not already 'unicode'