Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #22193 -- Made hint a truly optional arugment on check messages.

Thanks to Thomas Güttler for the suggestion.
  • Loading branch information...
commit 21d8175242273a2371bd9374994bacdd118309d3 1 parent 5679fce
@freakboy3742 freakboy3742 authored
Showing with 3 additions and 7 deletions.
  1. +1 −1  django/core/checks/messages.py
  2. +2 −6 docs/topics/checks.txt
View
2  django/core/checks/messages.py
@@ -15,7 +15,7 @@
@python_2_unicode_compatible
class CheckMessage(object):
- def __init__(self, level, msg, hint, obj=None, id=None):
+ def __init__(self, level, msg, hint=None, obj=None, id=None):
assert isinstance(level, int), "The first argument should be level."
self.level = level
self.msg = msg
View
8 docs/topics/checks.txt
@@ -78,12 +78,8 @@ Constructor arguments are:
``hint``
A single-line string providing a hint for fixing the problem. If no hint
- can be provided, or the hint is self-evident from the error message, a
- value of ``None`` can be used::
-
- Error('error message') # Will not work.
- Error('error message', None) # Good
- Error('error message', hint=None) # Better
+ can be provided, or the hint is self-evident from the error message, the
+ hint can be omitted, or a value of ``None`` can be used.
``obj``
Optional. An object providing context for the message (for example, the
Please sign in to comment.
Something went wrong with that request. Please try again.