Adds import admin view
This commit is contained in:
parent
61c2d2a36a
commit
6eab1fdd6d
6 changed files with 123 additions and 0 deletions
|
@ -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"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue