In [1]: Order.objects.all().delete()
---------------------------------------------------------------------------
DatabaseError Traceback (most recent call last)
<ipython-input-1-2dbc0623de24> in <module>()
----> 1 Order.objects.all().delete()
/.../env/local/lib/python2.7/site-packages/django/db/models/query.pyc in delete(self)
508
509 collector = Collector(using=del_query.db)
--> 510 collector.collect(del_query)
511 collector.delete()
512
/.../env/local/lib/python2.7/site-packages/django/db/models/deletion.pyc in collect(self, objs, source, nullable, collect_related, source_attr, reverse_dependency)
175 if not sub_objs:
176 continue
--> 177 field.rel.on_delete(self, field, sub_objs, self.using)
178
179 # TODO This entire block is only needed as a special case to
/.../env/local/lib/python2.7/site-packages/django/db/models/deletion.pyc in CASCADE(collector, field, sub_objs, using)
15 def CASCADE(collector, field, sub_objs, using):
16 collector.collect(sub_objs, source=field.rel.to,
---> 17 source_attr=field.name, nullable=field.null)
18 if field.null and not connections[using].features.can_defer_constraint_checks:
19 collector.add_field_update(field, None, sub_objs)
/.../env/local/lib/python2.7/site-packages/django/db/models/deletion.pyc in collect(self, objs, source, nullable, collect_related, source_attr, reverse_dependency)
173 else:
174 sub_objs = self.related_objects(related, new_objs)
--> 175 if not sub_objs:
176 continue
177 field.rel.on_delete(self, field, sub_objs, self.using)
/.../env/local/lib/python2.7/site-packages/django/db/models/query.pyc in __nonzero__(self)
128 return bool(self._result_cache)
129 try:
--> 130 iter(self).next()
131 except StopIteration:
132 return False
/.../env/local/lib/python2.7/site-packages/django/db/models/query.pyc in _result_iter(self)
116 raise StopIteration
117 if len(self._result_cache) <= pos:
--> 118 self._fill_cache()
119
120 def __nonzero__(self):
/.../env/local/lib/python2.7/site-packages/django/db/models/query.pyc in _fill_cache(self, num)
873 try:
874 for i in range(num or ITER_CHUNK_SIZE):
--> 875 self._result_cache.append(self._iter.next())
876 except StopIteration:
877 self._iter = None
/.../env/local/lib/python2.7/site-packages/django/db/models/query.pyc in iterator(self)
289 klass_info = get_klass_info(model, max_depth=max_depth,
290 requested=requested, only_load=only_load)
--> 291 for row in compiler.results_iter():
292 if fill_cache:
293 obj, _ = get_cached_row(row, index_start, db, klass_info,
/.../env/local/lib/python2.7/site-packages/django/db/models/sql/compiler.pyc in results_iter(self)
761 if self.query.select_for_update and transaction.is_managed(self.using):
762 transaction.set_dirty(self.using)
--> 763 for rows in self.execute_sql(MULTI):
764 for row in rows:
765 if resolve_columns:
/.../env/local/lib/python2.7/site-packages/django/db/models/sql/compiler.pyc in execute_sql(self, result_type)
816
817 cursor = self.connection.cursor()
--> 818 cursor.execute(sql, params)
819
820 if not result_type:
/.../env/local/lib/python2.7/site-packages/django/db/backends/util.pyc in execute(self, sql, params)
38 start = time()
39 try:
---> 40 return self.cursor.execute(sql, params)
41 finally:
42 stop = time()
/.../env/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.pyc in execute(self, query, params)
335 query = self.convert_query(query)
336 try:
--> 337 return Database.Cursor.execute(self, query, params)
338 except Database.IntegrityError, e:
339 raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
DatabaseError: no such table: stock_stocktransaction