我收到以下错误
unsupported format character 'a' (0x61) at index 16
def send_notification_email(sender, **kwargs):
change = sender
print "=========================================="
mail_admins(subject="model %(model) has been changed by %(user)" %
{'model':change.content_type, 'user': change.user},
message = render_to_string('change_email.html', { 'change': change }) )
有什么建议吗?
答案 0 :(得分:9)
您忘记了格式说明符。
%(model)s