﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32868	Add system check or warning for model fields shadowing methods / other attributes	Adam Johnson	nobody	"It's possible to create a field name that replaces a Model method, for example:

{{{
from django.db import models


class Book(models.Model):
    delete = models.BooleanField(default=False)
}}}

Instances of this model then cannot be deleted with `instance.delete()`. (They can be with `Model.delete(instance)`, but that's a really rare way of using a method so I expect most developers would not think of that.)

Django could warn about this, at least for some key names that sound like feasible field names, e.g. `delete`, `save`, `pk`, `clean`, ...

It's already not possible to create a field called `check` since the system check `models.E020` warns if the `Model.check()` method has been replaced, added in #23615. We could see this ticket as an extension of that, ""reserving"" more names that Django may depend on."	New feature	closed	Core (System checks)	dev	Normal	wontfix		Carlton Gibson	Unreviewed	0	0	0	0	0	0
