1
0
Fork 0

Adds import admin view

This commit is contained in:
Mouse Reeve 2022-11-01 18:59:04 -07:00
parent 61c2d2a36a
commit 6eab1fdd6d
6 changed files with 123 additions and 0 deletions

View file

@ -48,6 +48,15 @@ class ImportJob(models.Model):
"""items that haven't been processed yet"""
return self.items.filter(fail_reason__isnull=True, book__isnull=True)
@property
def item_count(self):
"""How many books do you want to import???"""
return self.items.count()
def pending_item_count(self):
"""And how many pending items??"""
return self.pending_items.count()
class ImportItem(models.Model):
"""a single line of a csv being imported"""