Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bread-and-pepper/django-userena
Browse files Browse the repository at this point in the history
  • Loading branch information
Michał Jaworski committed Jan 9, 2015
2 parents 26e5571 + ddcaa61 commit 540ab96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions userena/management/commands/check_permissions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.core.management.base import NoArgsCommand, BaseCommand
from optparse import make_option
from django.utils.encoding import smart_text

from userena.models import UserenaSignup

Expand All @@ -21,7 +22,7 @@ class Command(NoArgsCommand):
default=False,
help="Displays that it's testing management command. Don't use it yourself."),
)

help = 'Check that user permissions are correct.'
def handle_noargs(self, **options):
permissions, users, warnings = UserenaSignup.objects.check_permissions()
Expand All @@ -35,7 +36,7 @@ def handle_noargs(self, **options):
self.stdout.write("Added permission: %s\n" % p)

for u in users:
self.stdout.write("Changed permissions for user: %s\n" % u)
self.stdout.write("Changed permissions for user: %s\n" % smart_text(u, encoding='utf-8', strings_only=False))

for w in warnings:
self.stdout.write("WARNING: %s\n" %w)
Expand Down

0 comments on commit 540ab96

Please sign in to comment.