#22195 closed Cleanup/optimization (fixed)

Use constants to define built-in tags

Reported by: russellm Owned by: Elvard
Component: Core (System checks) Version: 1.7-alpha-1
Severity: Normal Keywords:
Cc: timmartin, tomas.ehrlich@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Via discussion on django-developers:

The code for system checks currently uses freeform strings to register against tags (e.g., @register('compatibility')).

This is potentially prone to error, since you can easily mistype the string, and then the check won't get caught by the tag.

Internally, we should be using constants for built-in tags.

Attachments (1)

check-constants.diff (4.0 KB) - added by Elvard 11 months ago.
Added constants for check tags.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 12 months ago by timmartin

  • Cc timmartin added

Changed 11 months ago by Elvard

Added constants for check tags.

comment:2 Changed 11 months ago by Elvard

  • Cc tomas.ehrlich@… added
  • Has patch set
  • Owner changed from nobody to Elvard
  • Status changed from new to assigned

comment:3 Changed 11 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 32e62374506827723423471a115e6b25313ed887:

[1.7.x] Fixed #22195 -- Used constants to define built-in tags for check framework.

Thanks Elvard for the patch.

Backport of b513fa5fc6 from master

Note: See TracTickets for help on using tickets.
Back to Top