mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-27 13:14:24 -04:00
fix snapshot icon caching and ordering
This commit is contained in:
parent
fc5d99b4b4
commit
59d5423483
3 changed files with 6 additions and 6 deletions
|
@ -12,6 +12,7 @@ from ..config import ARCHIVE_DIR, ARCHIVE_DIR_NAME
|
|||
from ..system import get_dir_size
|
||||
from ..util import parse_date, base_url, hashurl
|
||||
from ..index.schema import Link
|
||||
from ..index.html import snapshot_icons
|
||||
from ..extractors import get_default_archive_methods, ARCHIVE_METHODS_INDEXING_PRECEDENCE
|
||||
|
||||
EXTRACTORS = [(extractor[0], extractor[0]) for extractor in get_default_archive_methods()]
|
||||
|
@ -125,6 +126,9 @@ class Snapshot(models.Model):
|
|||
return tags_str
|
||||
return cache.get_or_set(cache_key, calc_tags_str)
|
||||
|
||||
def icons(self) -> str:
|
||||
return snapshot_icons(self)
|
||||
|
||||
@cached_property
|
||||
def bookmarked(self):
|
||||
return parse_date(self.timestamp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue