summaryrefslogtreecommitdiff
path: root/yaksh/management
diff options
context:
space:
mode:
authorCruiseDevice2019-01-04 11:44:23 +0530
committerCruiseDevice2019-01-04 11:53:15 +0530
commitd16d3fa6be39394bd39ae5da960f8013ffbe45ca (patch)
tree688e32e86dc842dde925bdb0b9911562dbef2bf5 /yaksh/management
parentc8d11463dc174765db45ef465b3a628175d367c3 (diff)
downloadonline_test-d16d3fa6be39394bd39ae5da960f8013ffbe45ca.tar.gz
online_test-d16d3fa6be39394bd39ae5da960f8013ffbe45ca.tar.bz2
online_test-d16d3fa6be39394bd39ae5da960f8013ffbe45ca.zip
Fix PEP8 and improve formatting
Diffstat (limited to 'yaksh/management')
-rw-r--r--yaksh/management/commands/create_moderator.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/yaksh/management/commands/create_moderator.py b/yaksh/management/commands/create_moderator.py
index b6bbc50..3ec012e 100644
--- a/yaksh/management/commands/create_moderator.py
+++ b/yaksh/management/commands/create_moderator.py
@@ -32,17 +32,22 @@ class Command(BaseCommand):
try:
user = User.objects.get(username=uname)
except User.DoesNotExist:
- raise CommandError('User "{0}" does not exist'.format(
- uname)
+ raise CommandError(
+ 'User "{0}" does not exist'.format(uname)
)
if user in group.user_set.all():
- self.stdout.write(self.style.WARNING('User "{0}" is '
- 'already a Moderator'.format(uname)
- ))
+ self.stdout.write(
+ self.style.WARNING(
+ 'User "{0}" is already'
+ ' a Moderator'.format(uname)
+ )
+ )
else:
user.profile.is_moderator = True
user.profile.save()
- self.stdout.write(self.style.SUCCESS(
- 'Successfully added User "{0}"'
- ' to Moderator group'.format(uname)
- ))
+ self.stdout.write(
+ self.style.SUCCESS(
+ 'Successfully added User "{0}"'
+ ' to Moderator group'.format(uname)
+ )
+ )