1 # -*- coding: utf-8 -*-
2 # This file is part of EduMed, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 from django.core.management.base import BaseCommand
8 class Command(BaseCommand):
9 help = 'Republishes all lessons.'
11 def handle(self, **options):
12 from catalogue.models import Lesson
13 from curriculum.models import Level
15 for lesson in Lesson.objects.all():
16 print 'Republishing: %s' % lesson.title
17 lesson.republish(repackage_level=False)
19 print 'Rebuilding levels...'
20 for level in Level.objects.all():
21 level.build_packages()