Opened 11 years ago

Closed 11 years ago

#22195 closed Cleanup/optimization (fixed)

Use constants to define built-in tags

Reported by: Russell Keith-Magee Owned by: Tomáš Ehrlich
Component: Core (System checks) Version: 1.7-alpha-1
Severity: Normal Keywords:
Cc: Tim Martin, 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 Tomáš Ehrlich 11 years ago.
Added constants for check tags.

Download all attachments as: .zip

Change History (4)

comment:1 by Tim Martin, 11 years ago

Cc: Tim Martin added

by Tomáš Ehrlich, 11 years ago

Attachment: check-constants.diff added

Added constants for check tags.

comment:2 by Tomáš Ehrlich, 11 years ago

Cc: tomas.ehrlich@… added
Has patch: set
Owner: changed from nobody to Tomáš Ehrlich
Status: newassigned

comment:3 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

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