def robots():
 if os.path.exists(os.path.join(settings.STATIC_FOLDER, 'robots.local.txt')):
  robots_file = 'robots.local.txt'
 else:
  robots_file = 'robots.txt'
 return send_from_directory(settings.STATIC_FOLDER, robots_file, mimetype='text/plain')

def robots ( ) : if os . path . exists ( os . path . join ( settings . STATIC_FOLDER , 'robots.local.txt' ) ) : robots_file = 'robots.local.txt' else : robots_file = 'robots.txt' return send_from_directory ( settings . STATIC_FOLDER , robots_file , mimetype = 'text/plain' )
serves the robots .