I'm currently implementing some System Checks of my own, and noticed that Django recommends using hardcoded error identifiers, like so:
Error(
'an error',
hint='A hint.',
obj=checked_object,
id='myapp.E001',
)
I thought that maybe this is merely serving tutorial purposes, but turns out that's actually how they do it.
From the same code above, I noticed that they use a prefix scheme for identifying the type of message that is being created (e.g. E for Error, W for Warning, C for Critical, etc).
But I don't understand the numbering system. You just enter any three digit number and that's it? What happens if there's a collision? Has anyone come across a better paradigm to manage the error codes?