|
@@ -10,12 +10,11 @@ from django.shortcuts import redirect
|
|
|
|
|
|
|
|
from django_object_actions import DjangoObjectActions, action
|
|
from django_object_actions import DjangoObjectActions, action
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-from api.auth import get_or_create_api_token
|
|
|
|
|
-
|
|
|
|
|
from archivebox.misc.util import parse_date
|
|
from archivebox.misc.util import parse_date
|
|
|
|
|
+
|
|
|
from .abid import ABID
|
|
from .abid import ABID
|
|
|
|
|
|
|
|
|
|
+
|
|
|
def highlight_diff(display_val: Any, compare_val: Any, invert: bool=False, color_same: str | None=None, color_diff: str | None=None):
|
|
def highlight_diff(display_val: Any, compare_val: Any, invert: bool=False, color_same: str | None=None, color_diff: str | None=None):
|
|
|
"""highlight each character in red that differs with the char at the same index in compare_val"""
|
|
"""highlight each character in red that differs with the char at the same index in compare_val"""
|
|
|
|
|
|
|
@@ -37,6 +36,8 @@ def highlight_diff(display_val: Any, compare_val: Any, invert: bool=False, color
|
|
|
))
|
|
))
|
|
|
|
|
|
|
|
def get_abid_info(self, obj, request=None):
|
|
def get_abid_info(self, obj, request=None):
|
|
|
|
|
+ from archivebox.api.auth import get_or_create_api_token
|
|
|
|
|
+
|
|
|
try:
|
|
try:
|
|
|
#abid_diff = f' != obj.ABID: {highlight_diff(obj.ABID, obj.abid)} ❌' if str(obj.ABID) != str(obj.abid) else ' == .ABID ✅'
|
|
#abid_diff = f' != obj.ABID: {highlight_diff(obj.ABID, obj.abid)} ❌' if str(obj.ABID) != str(obj.abid) else ' == .ABID ✅'
|
|
|
|
|
|