1
0
Fork 0
mirror of synced 2024-06-21 11:50:17 +12:00

refactor: Remove setup_django from index

This commit is contained in:
Cristian 2020-12-11 17:36:31 -05:00
parent e82161a768
commit ce53b0220c

View file

@ -18,7 +18,6 @@ from ..util import (
ExtendedEncoder,
)
from ..config import (
setup_django,
ARCHIVE_DIR_NAME,
SQL_INDEX_FILENAME,
JSON_INDEX_FILENAME,
@ -246,7 +245,6 @@ def write_main_index(links: List[Link], out_dir: Path=OUTPUT_DIR) -> None:
@enforce_types
def load_main_index(out_dir: Path=OUTPUT_DIR, warn: bool=True) -> List[Link]:
"""parse and load existing index with any new links from import_path merged in"""
setup_django(out_dir, check_db=True)
from core.models import Snapshot
try:
return Snapshot.objects.all()