mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 14:44:29 -04:00
fix: Remove unused imports
This commit is contained in:
parent
bc116c25f8
commit
b3ec170e39
3 changed files with 3 additions and 10 deletions
|
@ -2,7 +2,6 @@ __package__ = 'archivebox.core'
|
||||||
|
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
from contextlib import redirect_stdout
|
from contextlib import redirect_stdout
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
|
|
|
@ -33,4 +33,4 @@ def get_icons(snapshot: Snapshot) -> str:
|
||||||
*link_tuple(link, 'media_path')[:2], any((out_dir / canon['media_path']).glob('*')),
|
*link_tuple(link, 'media_path')[:2], any((out_dir / canon['media_path']).glob('*')),
|
||||||
*link_tuple(link, 'git_path')[:2], any((out_dir / canon['git_path']).glob('*')),
|
*link_tuple(link, 'git_path')[:2], any((out_dir / canon['git_path']).glob('*')),
|
||||||
canon['archive_org_path'], (out_dir / 'archive.org.txt').exists(),
|
canon['archive_org_path'], (out_dir / 'archive.org.txt').exists(),
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,7 +6,6 @@ from contextlib import redirect_stdout
|
||||||
from django.shortcuts import render, redirect
|
from django.shortcuts import render, redirect
|
||||||
|
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.db.models import Q
|
|
||||||
from django.views import View, static
|
from django.views import View, static
|
||||||
from django.views.generic.list import ListView
|
from django.views.generic.list import ListView
|
||||||
from django.views.generic import FormView
|
from django.views.generic import FormView
|
||||||
|
@ -16,13 +15,8 @@ from core.models import Snapshot
|
||||||
from core.utils import get_icons
|
from core.utils import get_icons
|
||||||
from core.forms import AddLinkForm
|
from core.forms import AddLinkForm
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
from ..index import load_main_index, load_main_index_meta
|
|
||||||
from ..config import (
|
from ..config import (
|
||||||
OUTPUT_DIR,
|
OUTPUT_DIR,
|
||||||
VERSION,
|
|
||||||
FOOTER_INFO,
|
|
||||||
PUBLIC_INDEX,
|
PUBLIC_INDEX,
|
||||||
PUBLIC_SNAPSHOTS,
|
PUBLIC_SNAPSHOTS,
|
||||||
PUBLIC_ADD_VIEW
|
PUBLIC_ADD_VIEW
|
||||||
|
@ -125,7 +119,7 @@ class AddView(UserPassesTestMixin, FormView):
|
||||||
|
|
||||||
def get_context_data(self, *args, **kwargs):
|
def get_context_data(self, *args, **kwargs):
|
||||||
context = super().get_context_data(*args, **kwargs)
|
context = super().get_context_data(*args, **kwargs)
|
||||||
context["title"]: "Add URLs"
|
context["title"] = "Add URLs"
|
||||||
return context
|
return context
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
|
@ -149,4 +143,4 @@ class AddView(UserPassesTestMixin, FormView):
|
||||||
"stdout": ansi_to_html(add_stdout.getvalue().strip()),
|
"stdout": ansi_to_html(add_stdout.getvalue().strip()),
|
||||||
"form": AddLinkForm()
|
"form": AddLinkForm()
|
||||||
})
|
})
|
||||||
return render(template_name=self.template_name, request=self.request, context=context)
|
return render(template_name=self.template_name, request=self.request, context=context)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue