def METHOD_NAME(self):
    self.status('Generating settings.py... ')
    template = get_template('tom_setup/settings.tmpl')
    rendered = template.render(self.context)
    # TODO: Ugly hack to get project name
    settings_location = os.path.join(BASE_DIR, os.path.basename(BASE_DIR), 'settings.py')
    if not os.path.exists(settings_location):
        msg = 'Could not determine settings.py location. Writing settings.py out to {}. Please copy file to \
               the proper location after script finishes.'.format(settings_location)
        self.stdout.write(self.style.WARNING(msg))
    with open(settings_location, 'w+') as settings_file:
        settings_file.write(rendered)
    self.ok()