A collection of Django patches and extensions to give more of the features and functionality that I want or expect from Django.
Currently aimed only at Django 1.11
django_more contains field and classes for Django that do not require any patching and can be used directly.
_Placing django_more into Django INSTALLED_APPS will automatically invoke django_types.patchtypes() - only necessary for OrderByField makemigrations
django_enum patches Django to add EnumFields, with enum state information in migrations to allow for consistent migrations compatible with postgres and mysql.
Enumwith support for database enum fields.
_Placing django_enum into Django INSTALLED_APPS will automatically invoke patch_enum() and django_types.patchtypes()
django_types patches Django to add support for custom database types to be used within migrations.
Not intended to be used directly, but by other reusable apps adding fields that rely on the additional functionality.
_Apps dependent on this should check for ProjectState.add_type() support, and if not present apply this with patchtypes()
django_cte patches Django to add CTE based functionality.
Not included in distributions until out of WIP state
_Placing django_cte into Django INSTALLED_APPS will automatically invoke patchcte()
patchy is class based monkey patching package used by the other django-more modules to apply their patches in a consistent and safe manner that is hopefully less fragile to Django core changes.
super()to functions and methods that have been patched in, allowing calls the methods they replaced.
EnumFieldforces choice values to string so behaviour is unambiguous and works with Django Rest Framework
NullCharFieldthat treats and saves blank values as nulls
EnumFieldnow serialises to text value of Enum member
EnumFieldnow accepts strings that represent an Enum member as valid values
EnumFieldalter operations with a missing argument now correctly accepted
OrderByFielduses dependencies to prevent field creation order issues.
OrderByFieldnow matches all _order_with_respectto functionality.
EnumFieldto break on cascade.
EnumFieldare stringified so that migrations don't break if Enums are relocated.