Browse files

Print out how many lectures will be left after updates

  • Loading branch information...
1 parent 678ddd9 commit d2f8fc00654809ad42ef2d8ca3a056d6b9b2e114 @adamcik committed Aug 24, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 plan/scrape/management/commands/lectures.py
View
7 plan/scrape/management/commands/lectures.py
@@ -75,8 +75,13 @@ def handle(self, *args, **options):
if buffer:
print ' | '.join(buffer)
+ lecutre_count = Lecture.objects.filter(
+ course__semester__year__exact=semester.year,
+ course__semester__type=semester.type).count()
+
print '---------------------'
- print '%d lectures' % len(to_delete)
+ print 'Lectures left %d' % (lecutre_count - len(to_delete))
+ print 'Going to delete %d lectures' % len(to_delete)
if options['delete'] or raw_input('Delete? [y/N] ').lower() == 'y':
to_delete.delete()

0 comments on commit d2f8fc0

Please sign in to comment.