diff --git a/django/contrib/auth/management/commands/createsuperuser.py b/django/contrib/auth/management/commands/createsuperuser.py
index 4169da2..ce483de 100644
a
|
b
|
from django.contrib.auth.management import get_default_username
|
11 | 11 | from django.core import exceptions |
12 | 12 | from django.core.management.base import BaseCommand, CommandError |
13 | 13 | from django.db import DEFAULT_DB_ALIAS |
14 | | from django.utils.encoding import force_str |
| 14 | from django.utils.encoding import force_str, force_text |
15 | 15 | from django.utils.six.moves import input |
16 | 16 | from django.utils.text import capfirst |
17 | 17 | |
… |
… |
class Command(BaseCommand):
|
82 | 82 | # Get a username |
83 | 83 | while username is None: |
84 | 84 | if not username: |
85 | | input_msg = capfirst(self.username_field.verbose_name) |
| 85 | input_msg = force_text(capfirst(self.username_field.verbose_name)) |
86 | 86 | if default_username: |
87 | 87 | input_msg = "%s (leave blank to use '%s')" % ( |
88 | 88 | input_msg, default_username) |
… |
… |
class Command(BaseCommand):
|
109 | 109 | field = self.UserModel._meta.get_field(field_name) |
110 | 110 | user_data[field_name] = options.get(field_name) |
111 | 111 | while user_data[field_name] is None: |
112 | | raw_value = input(force_str('%s: ' % capfirst(field.verbose_name))) |
| 112 | raw_value = input('%s: ' % force_text(capfirst(field.verbose_name))) |
113 | 113 | try: |
114 | 114 | user_data[field_name] = field.clean(raw_value, None) |
115 | 115 | except exceptions.ValidationError as e: |