Revision 004cc109 astakos/im/management/commands/activateuser.py
b/astakos/im/management/commands/activateuser.py | ||
---|---|---|
35 | 35 |
|
36 | 36 |
from django.core.management.base import BaseCommand, CommandError |
37 | 37 |
|
38 |
from astakos.im.admin.functions import activate |
|
38 | 39 |
from astakos.im.models import AstakosUser |
39 | 40 |
|
40 | 41 |
|
41 | 42 |
class Command(BaseCommand): |
42 |
args = "<user_id or email> [user_id or email] ..."
|
|
43 |
args = "<user id or email> [user id or email] ..."
|
|
43 | 44 |
help = "Activates one or more users" |
44 | 45 |
|
45 | 46 |
def handle(self, *args, **options): |
... | ... | |
63 | 64 |
self.stderr.write(msg) |
64 | 65 |
continue |
65 | 66 |
|
66 |
user.is_active = True |
|
67 |
user.save() |
|
67 |
activate(user) |
|
68 | 68 |
|
69 | 69 |
self.stdout.write("Activated '%s'\n" % (user.email,)) |
Also available in: Unified diff