Django-datatable-view

Latest version: v2.1.6

Safety actively analyzes 630305 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

0.9.0beta.1

This is a transition release to get people to 1.0, which brings a lot of syntax changes for table declaration on the python view, adopting a strategy that looks a lot like Django's forms framework,
or django-rest-framework's serializers.

0.9 will continue to offer backwards-compatible datatable declaration with the help of a ``LegacyConfigurationDatatableView`` as a baseclass. ``DatatableView`` will presume that the modern configuration style is being used and will raise errors accordingly.

``wheel`` installation is also possible now.

The live demo site at http://django-datatable-view.appspot.com will continue to operate WITHOUT this beta release, so experimenting with interactive documentation will require that you run the included example project, which includes a 0.9 migration guide. See the main README.md for quick instructions to get the example project running locally.

0.8.2

Important future note
This is the last planned release for the 0.8 series! 0.9 and 1.0 will arrive simultaneously sometime during the next couple of weeks, and the entire declaration process for datatableview options has been modernized.

0.9 will include all of the existing "legacy" configuration code from the 0.8 releases, powered by brand new internals. 0.9 will be a no-fuss update, but if you plan to jump up to 1.0, you will need to following the forthcoming migration guide to get away from these "legacy" delcaration syntaxes.

Release notes

This release fixes a number of internal issues for newer versions of Django, most notably the tests! With the introduction of Django's AppConfig system, the hack we've been using (keeping a testing-only app with testing-only models nested inside of the main datatableview app) was broken by a change concerning which app label Django thought the model belonged to. The tests themselves were doing okay, had they not been failing during the fixture loading process.

PamelaM has added initial support for including Travis testing into the repository, which is long overdue for a repository that has been gaining popularity over the last couple of years. I will commit to keeping up with it since, as they sometimes say, an untested app is considered broken by default.

Another Django 1.7 bug with related model fields was fixed, also thanks to PamelaM.

Other miscellaneous changes:

* The ``datatableview.utils.FIELD_TYPES`` dictionary is now a ``defaultdict(list)`` (davidfischer-ch)
* PEP-8 spacing changes (davidfischer-ch)
* Added a ``queryset.distinct()`` to get around some funny ``Q()`` math (davidfischer-ch)
* Added/fixed various utf-8 encoding declarations on source files (davidfischer-ch)
* Preemptive fixes for Django 1.8 and 1.9 import locations (greenbender)
* Corrected string coercion when ugettext strings were being used as the starting point for looking up a method name (akx)

0.8.1

This release fixes a Django >=1.7 compatibility bug where ORM query lookups would traverse a m2m relationship and incorrectly discover the manager to be a callable value function.

A small translation fix was provided, a wasteful ``count()`` query removed, ``NullBooleanField`` is now added to the 'boolean' FIELD_TYPES, and we fixed a documentation typo that referred users to the wrong javascript callback name.

0.8.0

This release modifies the way model fields are detected for ORM queries when submitting a search. Previously, the approach was primarily hard-coded to support only the core Django fields that served as base classes for all others, but this approach failed to provide any value for third-party fields that were built from scratch.

As of this release, ``datatableview.utils`` contains a dictionary ``FIELD_TYPES`` that contains keys for the major field categories, and maps each one to a list of fields that can be treated identically in ORM query terms. This dictionary can be extended by importing it and appending new fields to a category.

The default registration dictionary looks like this:

python
FIELD_TYPES = {
'text': [models.CharField, models.TextField, models.FileField, models.GenericIPAddressField],
'date': [models.DateField],
'boolean': [models.BooleanField],
'integer': [models.IntegerField, models.AutoField],
'float': [models.FloatField, models.DecimalField],

No direct search ORM queries make sense against these field types
'ignored': [models.ForeignKey],
}


If a field type used in a table but isn't found in any of these categories, the old familiar exception will be raised stating that it is an unhandled field type. The correct solution is to import this registry and append the field class:

python
from datatableview.utils import FIELD_TYPES
from netfields.fields import InetAddressField
FIELD_TYPES['text'].append(InetAddressField)


In the future, looking towards the full 1.0 release, we would like to offer a more sophistocated field type registration that allows the new field to also declare what unique ORM extensions it offers, in the way that a ``CharField`` offers ``__icontains``, or ``InetAddressField`` offers ``__net_contains``, etc. Until 1.0, we will be limited to offering this simple registration that limits the field categories to those already listed.

0.7.3

This release fixes an exception that is raised when using Django 1.7 release candidate, involving the removal of the deprecated ``StrAndUnicode`` utility base class.

0.7.2

This release fixes an issue involving ``verbose_name`` values wrapped in a proxy function used by
Django to defer instantiation of an underlying object. These proxy values could not go through the ``re`` framework without raising errors about "expecting a string or buffer".

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.