You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anton Nikulin edited this page Jun 23, 2015
·
1 revision
class MyClass(SomeParentClass):
default_messages = {'msg': 'this is default message'}
def __init__(self):
messages = {}
for c in reversed(self.__class__.__mro__):
messages.update(getattr(c, 'default_error_messages', {}))
messages.update(error_messages or {})