Move importers into module
This commit is contained in:
parent
1f0c4f86c2
commit
754ccaedd6
8 changed files with 16 additions and 10 deletions
|
@ -9,8 +9,8 @@ from django.template.response import TemplateResponse
|
|||
from django.utils.decorators import method_decorator
|
||||
from django.views import View
|
||||
|
||||
from bookwyrm import forms, goodreads_import, librarything_import, models
|
||||
from bookwyrm.importer import Importer
|
||||
from bookwyrm import forms, models
|
||||
from bookwyrm.importers import Importer, LibrarythingImporter, GoodreadsImporter
|
||||
from bookwyrm.tasks import app
|
||||
|
||||
# pylint: disable= no-self-use
|
||||
|
@ -41,10 +41,10 @@ class Import(View):
|
|||
|
||||
importer = None
|
||||
if source == "LibraryThing":
|
||||
importer = librarything_import.LibrarythingImporter()
|
||||
importer = LibrarythingImporter()
|
||||
else:
|
||||
# Default : GoodReads
|
||||
importer = goodreads_import.GoodreadsImporter()
|
||||
importer = GoodreadsImporter()
|
||||
|
||||
try:
|
||||
job = importer.create_job(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue