django-modern-rpc v0.11.0 Release Notes

Release Date: 2018-04-25 // about 6 years ago
  • Improvements

    • โšก๏ธ Django 2.0 is now officially supported. Tox and Travis default config have been updated to integrate Django 2.0 in existing tests environements.
    • ๐Ÿ“š Method's documentation is generated only if needed and uses Django's @cached_property decorator
    • ๐Ÿ“š HTML documentation default template has been updated: Bootstrap 4.1.0 stable is now used, and the rendering has been improved.

    API Changes

    • ๐Ÿšš Class RPCRequest has been removed and replaced by method execute_procedure(name, args, kwargs) in RPCHandler class. This method contains common logic used to retrieve a RPC method, execute authentication predicates to make sure it can be run, execute the concrete method and return the result.
    • ๐Ÿ“š HTML documentation content is not anymore marked as "safe" using django.utils.safestring.mark_safe(). You have to use Django decorator safe in your template if you display this value.

    Settings

    The kwargs dict passed to RPC methods can have customized keys (#18). Set the following values:

    • settings.MODERNRPC_KWARGS_REQUEST_KEY
    • settings.MODERNRPC_KWARGS_ENTRY_POINT_KEY
    • settings.MODERNRPC_KWARGS_PROTOCOL_KEY
    • settings.MODERNRPC_KWARGS_HANDLER_KEY

    to override dict keys and prevent conflicts with your own methods arguments.

    โšก๏ธ Other updates

    • โœ… Many units tests have been improved. Some tests with many calls to LiveServer have been splitted into shorter ones.