Add a simple changelog to the events #26
@@ -198,7 +198,7 @@
|
||||
<a role="button" href="#collapseStatusLog" data-toggle="collapse"
|
||||
data-parent="#log-accordion" aria-expanded="true"
|
||||
aria-controls="collapseStatusLog">
|
||||
Status-Log
|
||||
Status-Flags
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
@@ -60,7 +60,11 @@ def render_event_changelog(event):
|
||||
subchanges = json.loads(change.content)
|
||||
for subchange in subchanges:
|
||||
field_label = event._meta.get_field(subchange['field']).verbose_name
|
||||
if len(subchange['refer']) + len(subchange['current']) > 20:
|
||||
try:
|
||||
is_long_strings = (len(subchange['refer']) + len(subchange['current'])) > 20
|
||||
except TypeError:
|
||||
is_long_strings = False
|
||||
if is_long_strings:
|
||||
separator1 = u'<br />'
|
||||
separator2 = u'<br />'
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user