#20895 closed Cleanup/optimization (fixed)
Make check management command warn about BooleanFields without default value.
Reported by: | Owned by: | ||
---|---|---|---|
Component: | Core (Management commands) | Version: | 1.6-beta-1 |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
As suggested by Collin Anderson in the django-developers group:
The new ./manage check command is for helping people upgrade to a new version of django. https://docs.djangoproject.com/en/dev/ref/django-admin/#check
django1.6 changes models.BooleanField() to not default to False any more. This has already bitten me a few times. https://docs.djangoproject.com/en/dev/releases/1.6/#booleanfield-no-longer-defaults-to-false
Can we add a warning about BooleanFields without default values to the "check" command?
Change History (9)
comment:1 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 11 years ago
Owner: | changed from | to
---|
comment:4 by , 11 years ago
Severity: | Normal → Release blocker |
---|---|
Type: | New feature → Cleanup/optimization |
Marking this as a release blocker; it isn't technically a release blocker, but it's something that won't be much use if we don't land it before the release, so we should give it some focus ASAP. I'm also reclassifiying as a cleanup, rather than a new feature, because it's really just enhancing the attention on an existing change, using a facility that didn't exist at the time the change was committed.
comment:5 by , 11 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:6 by , 11 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
Version: | → 1.6-beta-1 |
Left comments on PR.
comment:7 by , 11 years ago
Updated pull request following Tim's comments. Writing tests is complicated by the fact that many of the models in the tests have BooleanFields without default values. I'm not sure of the best way to proceed. I've left more details on the pull request.
https://github.com/django/django/pull/1466#issuecomment-22533957
comment:8 by , 11 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
I've written a patch for this. I still have to write tests, then I will create a pull request.
https://github.com/alasdairnicol/django/tree/ticket_20895_check_boolean_field