<s> import click <EOL> from . . models import User , Role <EOL> @ click . command ( ) <EOL> @ click . option ( '<STR_LIT>' , help = '<STR_LIT>' , prompt = True ) <EOL> @ click . option ( '<STR_LIT>' , help = '<STR_LIT>' , prompt = True ) <EOL> @ click . option ( '<STR_LIT>' , help = '<STR_LIT>' , prompt = True , hide_input = True , <EOL> confirmation_prompt = True ) <EOL> @ click . option ( '<STR_LIT>' , help = '<STR_LIT>' , prompt = True ) <EOL> def cli ( name = None , email = None , password = None , role = None ) : <EOL> "<STR_LIT>" <EOL> role , created = Role . objects . get_or_create ( name = role ) <EOL> if all ( [ name , email , password ] ) : <EOL> user = User . createuser ( name , email , password , roles = [ role ] ) <EOL> else : <EOL> user = "<STR_LIT>" <EOL> click . echo ( user ) </s>
