PyUp Safety actively tracks 262,542 Python packages for vulnerabilities and notifies you when to upgrade.
----- * Django 3.1a1 / Bootstrap 4.5 / Knockout 3.5 support. * `MultipleKeyGridWidget`_ allows to edit many to many relationships for Django models. * ``PageContext`` to inject view title / client data / client routes / custom scripts to templates via ``TemplateResponse``. * ``App.renderValue`` supports jQuery elements / nested arrays / objects / strings HTML rendering. * ``App.renderNestedList`` supports optional unwrapping of single top DOM node. * Improved Bootstrap popovers support with jQuery ``.getPopoverTip()`` / ``.getVisiblePopovers()`` / ``.closeVisiblePopovers()`` plugins. * Support for nested components in formsets.js (empty_form) 'anonymous_template' Knockout binding. * ``UrlPath`` class for automatic ``re_path()`` generation with positional named keyword arguments.
----- * ``django-jinja`` dependency is off by default, may be removed in the future. * ``TemplateContext`` class is used to manage client-side data injection. * Less dependency on ``DJK_MIDDLEWARE``. * Templates / selenium test improvements.
----- * bdist wheel fix. * PyPi readme fix.
----- * Dropped Django<=1.10 support. Added Django 2.2 support. * Dropped IE9..10 support. * Current request ``.view_title`` is stored in the ``.resolver_match``. * ``bs_collapse()`` Jinja2 macro supports setting the initial collapse state ('out' / 'in') and Bootstrap card type. * Implemented ``App.OrderedHooks`` class used to execute ``App.initClientHooks`` in proper order. * ``grid.js``: cleaned up init / shutdown ``.applyBindings()`` / ``.cleanBindings()`` / ``.runComponent()`` / ``.removeComponent()`` code for ``App.ko.Grid`` and related classes. * ``grid.js``: Implemented action ``meta_list`` preload. * Refactored views classes inheritance hierarchy. * middleware: refactored middleware classes inheritance hierarchy. * middleware: less intrusive, better compatibility with third party modules. * middleware: ``.djk_request()``_ ``.djk_view()`` methods are called only for ``DJK_APPS`` views by default. * middleware : ``json_response()`` shortcut method. * ``RendererModelForm`` ``.has_saved_instance()`` method to check whether current Django ModelForm has the bound and saved instance. * `ListQuerySet`_: implemented ``|`` ``+`` operators. * ``DjkJSONEncoder``: moved to ``tpl`` module. Encoding improvements. * Refactored forms module to forms package with base / renderers / validators modules. * HTTP response related classes / methods are moved to ``http`` module.
----- * Supports both `Bootstrap 4`_ and `Bootstrap 3`_ via pluggable djk_ui application. * Default rendering layouts for fields / forms / related forms / inline formsets, which can be customized by providing custom template or via inheriting from `Renderer`_ class. * Underscore.js templates support `template attributes merging`_ and `custom tags`_. * `Nested components`_ and `Sparse components`_. * `Nested serializer`_.
----- * Django 1.11 / Python 3.6 support. * Selenium testing commands fixes.
----- * Compatibility to 1.10+ new-style middleware (thanks to Melvyn Sopacua). * Fixed pagination when multiple filter field choices are seiected in views.ListSortingView.
----- Support of the ``'choices' filter`` option ``multiple_choices``: ``True`` in non-AJAX ``ListSortingView``. That allows to perform ``in`` field lookups for the selected field filter which was previously available only in AJAX `KoGridView`_. Large monolithic ``views.py`` split into smaller parts with symbols exported via module ``__init__.py`` for the convenience and compatibility. Alternative breadcrumbs layout of field filters widgets.
----- * Improvements in testing support: * ``AutomationCommands`` now uses yield to generate the sequence of opcodes and their args, resulting in cleaner code. * ``SeleniumCommands`` is reworked into ``BaseSeleniumCommands``. It supports: * Saving current database state to Django fixtures at the particular points of tests via `dump_data`_ command. That allows to skip already debugged parts of tests via `.has_fixture()`_ method, greatly reducing the time required to develop and debug long running Selenium tests. To make proper order (sequence) of stored / loaded fixtures, one has to define `fixtures_order`_ attribute of ``DjkTestCase`` derived class. * Automatic retry of the last Selenium commands execution in case current command is timed out when running at slow client due to DOM is not being updated in time. * css parsing / xpath string escaping. * ``SeleniumQueryCommands`` implements generic Selenium commands, including Django reverse url support for navigation bar, anchors and forms, which could be useful in any Django application. * ``DjkSeleniumQueryCommands`` implements additional Selenium commands related to django-jinja-knockout functionality, such as BootstrapDialog and Knockout.js grids / widgets support. forms.py ~~~~~~~~ * ``BootstrapModelForm`` always populates ``.request`` attribute for convenience. * ``CustomFullClean`` / ``StripWhilespaceMixin`` mixins for Django forms. middleware.py ~~~~~~~~~~~~~ * ``ContextMiddleware`` class: * Supports request mocking when running not under HTTP server, for example as shell command / celery task. * Supports request-time storage of lists / dicts of objects via `add_instance`_ / `yield_out_instances`_ methods. query.py ~~~~~~~~ * `FilteredRawQuerySet`_ supports Q expressions (Q objects) with relation mapping. views submodule ~~~~~~~~~~~~~~~ * ``BaseFilterView`` * ``filter_queryset()`` now supports args in addition to kwargs. That allows to use Django ``Q`` objects in grids and lists, although actual generation of ``Q`` objects is still limited to ``None`` value filtering. * ``None`` can be valid value of field filter query. It is mapped to ``is_null`` field lookup, also it uses Django ``Q.__or__`` operation in case ``None`` is presented in the list of field filter values. * Query filters now support ``in`` clause for drop-down ``choice`` filter. widgets.py ~~~~~~~~~~ * ``DisplayText`` field widget ``__init__()`` method now supports two types of ``get_text`` callback arguments: * ``get_text_method`` which binds passed function to DisplayText widget instance (self as first argument) * ``get_text_fn`` which uses unbound function (no self). If form that defined widget uses ``WidgetInstancsMixin`` and model field instance has ``get_str_fields()`` method implemented, such field will be auto-rendered via ``print_list_group()`` / ``print_bs_well()`` functions of ``tpl`` modile to produce structured output. ko_grid_body.htm ~~~~~~~~~~~~~~~~ * Fixed ``ko_grid_body()`` macro not including underscore.js templates copied with different ``template_id`` when these templates were called from related underscore.js templates. grid.js ~~~~~~~ * Reset filter now uses ``undefined`` value instead of ``null`` value because filtering by ``None`` value is now supported in `KoGridView`_. * ``App.ko.GridRow`` class ``display()`` method now automatically picks nested relation value from nested ``strFields`` value, when available. That allows to traverse nested ``get_str_fields()`` values automatically. See ``getDisplayValue()`` method for the implementation. * Allow to click nested elements of row cells when these are enclosed into anchors. * Allow to override grid callback action via viewmodel ``callback_action`` property. * Query filters now support multi-value ``in`` clause for values of drop-down ``choice`` filter. * Grid viewmodel ``deleted_pks`` key values are processed first in ``App.ko.Grid.updatePage()``. That allows to delete old row and add new row with the same ``pkVal`` at once (forced update). * ``App.ko.Grid`` class ``.setFiltersChoices()`` method simplifies programmatic filtering of grid at client-side, for example from the parsed querystring. plugins.js ~~~~~~~~~~ ``$.linkPreview`` now has separate inclusion filter for local urls and exclusion filter for remote urls, which minimizes the possibility of preview glitches due to wrong guess of resource type.
----- * ``ContentTypeLinker`` - added method to return html representation of content types framework related object (html link with the description by default). * `FilteredRawQuerySet`_ now supports more precise ``.count()`` method to calculate the length of raw queryset. * `ListQuerySet`_ implements large part of queryset methods for the lists of Django model instances. Such lists are created by Django queryset ``.prefetch_related()`` method. * Auto-highlight bootstrap navs which have 'auto-highlight' css class at client-side. * ``bs_tabs()`` Jinja2 macro which simplifies generation of bootstrap tabs. Bootstrap tabs now support automatic switching via window.location.hash change. * ``ListSortingView`` improvements: * Supports graceful handling of error reporting, producing in-place messages instead of just rising an exception. * ``.get_filter_args()`` / ``.get_no_match_kwargs()`` methods are implemented to generate macro arguments used in `bs_list.htm`_ Jinja2 template. This allows to override default messages for field filters / no match reports in the grid classes. * `KoGridView`_ has multiple improvements: * ``decimal`` field filter is renamed to ``number`` as now it supports both Django model ``DecimalField`` and ``IntegerField``. * Django model ``IntegerField`` is now bound either to ``choices`` type filter, when it has non-empty ``choices`` attribute, or to ``number`` type filter to select range of values, otherwise. * Action handlers do not require to return default viewmodel ``view`` name manually, now it's being done automatically (when viewmodel ``view`` name is not specified). * ``get_default_grid_options()`` method was renamed to shorter ``get_grid_options()`` method. * ``grid_options`` may be defined as class attribute, not having to always define ``get_grid_options()`` method which is more verbose (but is more flexible). * ``discover_grid_options()`` method was implemented to populate grid ``fkGridOptions`` which are used to setup foreign key filter fields automatically (when possible). That allows to reduce boilerplate data in ``grid_options`` / ``get_grid_options()``, especially when using nested foreign key filters. ``fkGridOptions`` nested dictionary still can be specified manually as the part of ``get_grid_options()`` result, in complex cases (eg. DB or view kwargs based options). * Enable quick selection / deselection of currently displayed grid rows when ``selectMultipleRows`` is ``true``. * `ForeignKeyGridWidget`_ also autodetects foreign key filter ``fkGridOptions``. * ``SendmailQueue`` supports extension of ``add()`` / ``flush()`` methods via ioc class. * ``SendmailQueue`` may be used to send uncaught exception emails when running in production mode.
----- * To be released on PyPI.