#NEWLINE# def create_user( self , username , password = None , is_staff = False , is_admin = False ) : #NEWLINE# #INDENT# from django.contrib.auth.models import User #NEWLINE# ( user , created ) = User . objects . get_or_create ( username = username , email = ( '%s@example.com' % username ) , is_superuser = is_admin ) #NEWLINE# user . is_staff = is_staff #NEWLINE# user . set_password ( password ) #NEWLINE# user . save ( ) #NEWLINE# return user