Fix message icons and show messages on login view

This commit is contained in:
Jens Langhammer
2018-11-23 09:44:22 +01:00
parent 095a5c0268
commit e9e6f632e3
3 changed files with 22 additions and 1 deletions

View File

@ -13,6 +13,8 @@ https://docs.djangoproject.com/en/2.1/ref/settings/
import importlib
import os
from django.contrib import messages
from passbook import __version__
from passbook.lib.config import CONFIG
@ -66,6 +68,16 @@ INSTALLED_APPS = [
'passbook.tfa',
]
# Message Tag fix for bootstrap CSS Classes
MESSAGE_TAGS = {
messages.DEBUG: 'primary',
messages.INFO: 'info',
messages.SUCCESS: 'success',
messages.WARNING: 'warning',
messages.ERROR: 'danger',
}
REST_FRAMEWORK = {
# Use Django's standard `django.contrib.auth` permissions,
# or allow read-only access for unauthenticated users.