def init(provider=None):
if os.path.exists(DEPLOY_YAML):<EOL><INDENT>_yellow("<STR_LIT>")<EOL>cont = prompt("<STR_LIT>", default="<STR_LIT>")<EOL>if cont.strip().lower() == "<STR_LIT>":<EOL><INDENT>return None<EOL><DEDENT><DEDENT>_green("<STR_LIT>")<EOL>_green("<STR_LIT>")<EOL>django_settings = prompt(<EOL>"<STR_LIT>",<EOL>default="<STR_LIT>",<EOL>validate=_validate_django_settings<EOL>)<EOL>managepy = prompt(<EOL>"<STR_LIT>",<EOL>default="<STR_LIT>",<EOL>validate=_validate_managepy<EOL>)<EOL>requirements = prompt(<EOL>"<STR_LIT>",<EOL>default="<STR_LIT>",<EOL>validate=_validate_requirements<EOL>)<EOL>pyversion = prompt("<STR_LIT>", default="<STR_LIT>")<EOL>static_url = prompt("<STR_LIT>", default="<STR_LIT>")<EOL>media_url = prompt("<STR_LIT>", default="<STR_LIT>")<EOL>if not provider:<EOL><INDENT>provider = prompt("<STR_LIT>",<EOL>validate=_validate_providers)<EOL><DEDENT>site = {}<EOL>additional_site = {}<EOL>if provider == "<STR_LIT>":<EOL><INDENT>applicationid = prompt("<STR_LIT>", validate=r'<STR_LIT>')<EOL>instancename = prompt("<STR_LIT>"<EOL>"<STR_LIT>", validate=r'<STR_LIT>')<EOL>databasename = prompt("<STR_LIT>", validate=r'<STR_LIT>')<EOL>sdk_location = prompt("<STR_LIT>",<EOL>default="<STR_LIT>",<EOL>validate=r'<STR_LIT>'  <EOL>)<EOL>additional_site.update({<EOL>'<STR_LIT>': applicationid,<EOL>'<STR_LIT>': instancename,<EOL>'<STR_LIT>': databasename,<EOL>'<STR_LIT>': sdk_location,<EOL>})<EOL>site = {<EOL>'<STR_LIT>': '<STR_LIT>'<EOL>}<EOL><DEDENT>elif provider == "<STR_LIT>":<EOL><INDENT>application_name = prompt("<STR_LIT>")<EOL>site = {<EOL>'<STR_LIT>': application_name<EOL>}<EOL><DEDENT>else:<EOL><INDENT>database = prompt("<STR_LIT>", default="<STR_LIT>")<EOL>site = {<EOL>'<STR_LIT>': database,<EOL>}<EOL><DEDENT>admin_password = prompt("<STR_LIT>",<EOL>validate=_validate_admin_password<EOL>)<EOL>import random<EOL>SECRET_KEY = '<STR_LIT>'.join([random.SystemRandom().choice('<STR_LIT>') for i in range(<NUM_LIT:50>)])<EOL>SECRET_KEY = "<STR_LIT:'>" + SECRET_KEY + "<STR_LIT:'>"<EOL>site.update({<EOL>'<STR_LIT>': pyversion,<EOL>'<STR_LIT>': django_settings,<EOL>'<STR_LIT>': managepy,<EOL>'<STR_LIT>': requirements,<EOL>'<STR_LIT>': static_url,<EOL>'<STR_LIT>': media_url,<EOL>'<STR_LIT>': provider,<EOL>'<STR_LIT>': admin_password,<EOL>'<STR_LIT>': SECRET_KEY,<EOL>})<EOL>site.update(additional_site)<EOL>_create_deploy_yaml(site)<EOL>return site<EOL>
Runs through a questionnaire to set up your project's deploy settings