2017-05-21 3 views
1

내 장고 관리에서 메시지 프레임 워크를 사용하는 오류 메시지는 danger 클래스로 생성됩니다. 메시지가 그 위에 승인 기호 녹색 보이는 그러나 : admin/css/base.css로 볼 때 오류 클래스가 error하지 danger처럼Django 관리자가 "위험"부트 스트랩으로 실패합니까?

enter image description here

, 그것은 보인다.

danger으로 표시됩니까? 어떻게 변경할 수 있습니까?

답변

3

위험 메시지 번호는입니다. 당신이 사용할 수있는 것은 하나 warning 또는 error입니다 : 죄송합니다

https://docs.djangoproject.com/en/1.11/ref/contrib/messages/#message-levels

DEBUG Development-related messages that will be ignored (or removed) 
     in a production deployment 
INFO Informational messages for the user 
SUCCESS An action was successful, e.g. “Your profile was updated successfully” 
WARNING A failure did not occur but may be imminent 
ERROR An action was not successful or some other failure occurred 
+1

. 고맙습니다. 부트 스트랩의'위험 '과 섞여있다. – iTayb