diff --git a/bookwyrm/models/import_job.py b/bookwyrm/models/import_job.py index 18aad6d88..060f11ede 100644 --- a/bookwyrm/models/import_job.py +++ b/bookwyrm/models/import_job.py @@ -58,6 +58,16 @@ class ImportJob(models.Model): """And how many pending items??""" return self.pending_items.count() + @property + def successful_item_count(self): + """How many found a book?""" + return self.items.filter(book__isnull=False).count() + + @property + def failed_item_count(self): + """How many found a book?""" + return self.items.filter(fail_reason__isnull=False).count() + class ImportItem(models.Model): """a single line of a csv being imported""" diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index 7e6afbc6b..893669694 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -11,7 +11,7 @@ from django.utils.translation import gettext_lazy as _ env = Env() env.read_env() DOMAIN = env("DOMAIN") -VERSION = "0.4.5" +VERSION = "0.4.6" RELEASE_API = env( "RELEASE_API", diff --git a/bookwyrm/templates/settings/imports/imports.html b/bookwyrm/templates/settings/imports/imports.html index 57c0c73f3..b027e6a4d 100644 --- a/bookwyrm/templates/settings/imports/imports.html +++ b/bookwyrm/templates/settings/imports/imports.html @@ -1,6 +1,7 @@ {% extends 'settings/layout.html' %} {% load i18n %} {% load utilities %} +{% load humanize %} {% block title %}{% trans "Imports" %}{% endblock %} @@ -54,6 +55,12 @@