]> git.openstreetmap.org Git - osqa.git/blob - forum/management/commands/module_command.py
Reintegrate merge cacheimp -> trunk.
[osqa.git] / forum / management / commands / module_command.py
1 from django.core.management.base import BaseCommand, CommandError
2
3 class Command(BaseCommand):
4
5     def handle(self, *args, **options):
6
7         for path in args:
8             m = __import__('forum_modules.%s' % path, globals(), locals(), ['forum_modules'])
9
10             if hasattr(m, 'run'):
11                 run = getattr(m, 'run')
12                 if callable(run):
13                     run()