2014-01-20 10:45:21 +08:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from django.core import checks
|
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
|
|
|
|
class ModelRaisingMessages(models.Model):
|
|
|
|
@classmethod
|
|
|
|
def check(self, **kwargs):
|
|
|
|
return [
|
2016-02-13 00:36:46 +08:00
|
|
|
checks.Warning('First warning', hint='Hint', obj='obj'),
|
|
|
|
checks.Warning('Second warning', obj='a'),
|
|
|
|
checks.Error('An error', hint='Error hint'),
|
2014-01-20 10:45:21 +08:00
|
|
|
]
|