Commit c461f283 authored by Daniel Klaffenbach's avatar Daniel Klaffenbach

Drop Python2 support from management command

Closes #7
parent 2d9db56f
......@@ -5,6 +5,7 @@ from django.contrib.auth import get_user_model
from django.db.models.signals import pre_save
from .ldap import Ldap
def set_attributes_from_ldap(sender, instance, **kwargs):
l = Ldap()
username = getattr(instance, instance.USERNAME_FIELD)
......@@ -3,7 +3,7 @@ from __future__ import unicode_literals
import getpass
from import BaseCommand
from django.contrib.auth import get_user_model
from django.utils.six import moves
class Command(BaseCommand):
help = "Used to create a superuser without a usable password."
......@@ -23,7 +23,7 @@ class Command(BaseCommand):
username = options.get('username')
if not username:
current_user = getpass.getuser()
input_user = moves.input('Username [{}]: '.format(current_user))
input_user = input('Username [{}]: '.format(current_user))
if not input_user:
username = current_user
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment