Answer the question
In order to leave comments, you need to log in
How to make validation of Widget.render method?
From documentation:
render(name, value, attrs=None)
Returns the HTML for the widget as a Unicode string. This method must be implemented in child classes. Otherwise, a NotImplementedError exception will be thrown.
No one guarantees that the received value will be correct, so the implementation of the method in child classes must provide appropriate validation.
Answer the question
In order to leave comments, you need to log in
Apparently it means that value is not necessarily the correct value of the desired type. For example, a date widget may receive a number.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question