Commit Graph

10 Commits

Author SHA1 Message Date
Emmanuel Cazenave 253fc22a15 adapt chunk read to binary data (#39533) 2020-02-04 17:27:19 +01:00
Emmanuel Cazenave 436022883a open file in binary mode (#39533) 2020-02-04 17:26:51 +01:00
Emmanuel Cazenave 5b788a5dff grab HTMLParser from six and adapt initialization to py3 (#39533) 2020-02-04 17:21:41 +01:00
Emmanuel Cazenave 37534c6980 use six types when calling isinstance() (#39533) 2020-02-04 17:19:16 +01:00
Emmanuel Cazenave 90bdb52e90 use python_2_unicode_compatible for objects representation (#39533) 2020-02-04 17:13:50 +01:00
Emmanuel Cazenave 090e4d2bc3 use force_text() instead of unicode() (#39533) 2020-02-04 17:09:09 +01:00
Michael Bideau a951f062f0 Refactoring: fix most of the (many) 'flake8' complaints 2019-08-22 16:02:06 +00:00
Michael Bideau afcca49f53 Refactoring: fix most of the (many many) 'pylint' complaints 2019-08-22 14:44:52 +00:00
Michael Bideau 2786bc29e7 License: prepended license text to most files 2019-08-21 15:02:33 +00:00
Michael Bideau 990f1fb7bc Added 'guichet' (planned availability), added CRUD views for each entity, many fixes and refactoring
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
2019-08-20 17:00:12 +00:00