From d433a636abfc040891dde68aa9e5f81b30549134 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Marek=20St=C4=99pniowski?= <marek@stepniowski.com>
Date: Thu, 18 Sep 2008 15:00:58 +0200
Subject: [PATCH] Added --force option to importbooks command.

---
 apps/catalogue/management/commands/importbooks.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/apps/catalogue/management/commands/importbooks.py b/apps/catalogue/management/commands/importbooks.py
index 22dd237f7..d1dac54e4 100644
--- a/apps/catalogue/management/commands/importbooks.py
+++ b/apps/catalogue/management/commands/importbooks.py
@@ -12,6 +12,8 @@ class Command(BaseCommand):
         make_option('--verbosity', action='store', dest='verbosity', default='1',
             type='choice', choices=['0', '1', '2'],
             help='Verbosity level; 0=minimal output, 1=normal output, 2=all output'),
+        make_option('--force', action='store_true', dest='force', default=False,
+            help='Overwrite previously imported files with the same id')
     )
     help = 'Imports books from the specified directories.'
     args = 'directory [directory ...]'
@@ -22,6 +24,7 @@ class Command(BaseCommand):
         self.style = color_style()
 
         verbosity = int(options.get('verbosity', 1))
+        force = options.get('force')
         show_traceback = options.get('traceback', False)
 
         # Start transaction management.
-- 
2.20.1