diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-06-30 17:26:44 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-06-30 17:26:44 +0200 |
commit | 726713f95f91fa83a8e1473625162ae831309952 (patch) | |
tree | 2b8ab152e92a95948e9a038ebcef815bfd56aa38 /ishtar_common/management/commands/ishtar_excute_admin_tasks.py | |
parent | fd21739351daf697188329948492c65b1a9bd7e6 (diff) | |
parent | 483fcd46fb60a597959bfde9d00bde4cc1822cd2 (diff) | |
download | Ishtar-726713f95f91fa83a8e1473625162ae831309952.tar.bz2 Ishtar-726713f95f91fa83a8e1473625162ae831309952.zip |
Merge branch 'master' into develop
Diffstat (limited to 'ishtar_common/management/commands/ishtar_excute_admin_tasks.py')
-rw-r--r-- | ishtar_common/management/commands/ishtar_excute_admin_tasks.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ishtar_common/management/commands/ishtar_excute_admin_tasks.py b/ishtar_common/management/commands/ishtar_excute_admin_tasks.py new file mode 100644 index 000000000..3fe66ad3b --- /dev/null +++ b/ishtar_common/management/commands/ishtar_excute_admin_tasks.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from django.core.management.base import BaseCommand, CommandError + +from ishtar_common import models + + +class Command(BaseCommand): + help = "./manage.py ishtar_execute_admin_tasks\n\n"\ + "Launch pending administration tasks." + + def handle(self, *args, **options): + for task in models.AdministrationTask.objects.filter(state='S').all(): + task.execute() |