Backward-incompatible changes for released versions are listed here (for 0.5 onwards.)
- Added support for Django 4.2 and 5.0.
- Added support for Python 3.12.
- Dropped the
VERSION
and__version__
attributes. To check the version of the package, useimportlib.metadata.version("django-typed-models")
(docs / backport).
- Dropped support for Django 3.1.
- Some apps using typedmodels may generate new migrations, due to #68 - these are harmless and don't actually change anything in your database.
No backward-incompatible changes. Added support for Django 4.x
- Dropped support for djangoes older than 3.1
- Fields on concrete typed models must now have
null=True
. Previously the null=True was added automatically (#39) - If you defer the
type
field (viaqueryset.only()
orqueryset.defer()
), typedmodels will no longer automatically cast the model instances from that queryset.
- Dropped Python 2 support
- Added support for django 2.2 and 3.0, and dropped support for <2.2.
Removed shims for unsupported django versions (now supports 1.11+)
Fields defined in typed subclasses no longer get null=True
added silently.
- If the field has a default value, we will use the default value instead of
None
for other types. You may need to either addnull=True
yourself, or create a migration for your app. - If the field doesn't have a default value, a warning is logged and the
null=True
is added implicitly. This will be removed in typedmodels 0.9.
This release removes some magic around manager setup. Managers are now inherited using the normal Django mechanism.
If you are using a custom default manager on a TypedModel subclass, you need to make sure it is a subclass of TypedModelManager. Otherwise type filtering will not work as expected.
This import path no longer works, as recent Django changes make it impossible:
from typedmodels import TypedModel
Instead, use:
from typedmodels.models import TypedModel