django_evolution.support

Constants indicating available Django features.

Module Attributes

supports_index_together

Index names changed in Django 1.5, with the introduction of index_together.

supports_indexes

Whether new-style Index classes are available.

supports_q_comparison

Whether Q() objects can be directly compared.

supports_f_comparison

Whether F() objects can be directly compared.

supports_constraints

Whether new-style Constraint classes are available.

supports_db_table_comments

Whether database table comments are available.

supports_migrations

Whether built-in support for Django Migrations is present.

Functions

supports_index_feature(attr_name)

Return whether Index supports a specific attribute.

django_evolution.support.supports_index_together = True

Index names changed in Django 1.5, with the introduction of index_together.

django_evolution.support.supports_indexes = True

Whether new-style Index classes are available.

Django 1.11 introduced formal support for defining explicit indexes not bound to a field definition or as part of index_together/unique_together.

Type:

bool

django_evolution.support.supports_q_comparison = True

Whether Q() objects can be directly compared.

Django 2.0 introduced this support.

Type:

bool

django_evolution.support.supports_f_comparison = True

Whether F() objects can be directly compared.

Django 2.0 introduced this support.

Type:

bool

django_evolution.support.supports_constraints = True

Whether new-style Constraint classes are available.

Django 2.2 introduced formal support for defining explicit constraints not bound to a field definition.

django_evolution.support.supports_db_table_comments = False

Whether database table comments are available.

Django 4.2 introduced formal support for setting comments attached to tables.

Support may vary by database backend.

New in version 2.3.

Type:

bool

django_evolution.support.supports_migrations = True

Whether built-in support for Django Migrations is present.

This is available in Django 1.7+.

django_evolution.support.supports_index_feature(attr_name)

Return whether Index supports a specific attribute.

Parameters:

attr_name (unicode) – The name of the attribute.

Returns:

True if the attribute is supported on this version of Django. False if it is not.

Return type:

bool