Adds more fields to import admin table and ticks version
This commit is contained in:
parent
3f2f718878
commit
40e9428b49
4 changed files with 25 additions and 4 deletions
|
@ -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"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue