Repository navigation
v0.22.1 - Model rules read translated verbose_name; auth fields counted
Model rules read translated verbose_name; auth fields counted.
Fixed
-
Count the fields Django's auth bases give a custom user model
(#267).
A model built onAbstractBaseUser,PermissionsMixinorAbstractUser
now inherits their fields (password,last_login,is_superuser,
groups,user_permissions, and the profile fields ofAbstractUser) in
both parsers, sodriftno longer reports them as migrated but no longer
declared. A workspace class with the same name still wins, a field the
model sets toNone(username = None) stays removed, and an abstract
parent's own field now overrides the same field from its ancestors. -
VS Code rules DOL011 / DOL014 / DOL015 read past nested calls.
CharField(max_length=100, verbose_name=_("Name"), null=True)was never
matched: the rules scanned the call with([^()]*), which stops at the
paren inside_("Name"). i18n-wrapped fields escaped thenull=True,
missing-max_lengthandTextField(max_length=)checks. All three now use
the samereadCallArgshelper DOL013 already used. -
Parser: ignore Django field examples inside model docstrings. Both the
CLI and VS Code now keep those examples out of the model's field list. -
suggest-indexes: only propose indexes on local columns
(#252).
Many-to-many and reverse relation lookups still appear in usage counts,
but no longer produce invalidMeta.indexessuggestions. Django field imports
that use an alias keep their original field type in both parsers. -
Recognize directly imported Django field types (#250).
The CLI and VS Code parsers now recognizeGeneratedFieldand PostgreSQL
fields such asArrayField,HStoreField, range fields, and
SearchVectorField. Schema drift checks can now match those declarations
to their migrations.