Corrected the issue when audit log when using django Django==2.0.1 (#166)

* Corrected the issue when audit log when using django Django==2.0.1

* Quick fix
This commit is contained in:
Afsalms 2018-02-28 20:17:27 +05:30 committed by Ryan Castner
parent 1c8d60b596
commit fced0a6dd8

View file

@ -9,6 +9,7 @@ try:
from django.urls.exceptions import NoReverseMatch
except ImportError:
from django.core.urlresolvers import NoReverseMatch
from django.utils.safestring import mark_safe
MAX = 75
@ -67,6 +68,7 @@ class LogEntryAdminMixin(object):
value = [i, field] + (['***', '***'] if field == 'password' else changes[field])
msg += '<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>' % tuple(value)
msg += '</table>'
msg = mark_safe(msg)
return msg
msg.allow_tags = True
msg.short_description = 'Changes'