parameters: ()
docstring: Renders server configurations.
docstring_summary: Renders server configurations.
docstring_tokens: Renders server configurations .
function: def render_confs():
      """
      Renders server configurations.
      """
      require('settings', provided_by=['production', 'staging'])
  
      with settings(warn_only=True):
          local('mkdir confs/rendered')
  
      # Copy the app_config so that when we load the secrets they don't
      # get exposed to other management commands
      context = copy.copy(app_config.__dict__)
      context.update(app_config.get_secrets())
  
      for service, remote_path, extension in app_config.SERVER_SERVICES:
          template_path = _get_template_conf_path(service, extension)
          rendered_path = _get_rendered_conf_path(service, extension)
  
          with open(template_path,  'r') as read_template:
  
              with open(rendered_path, 'wb') as write_template:
                  payload = Template(read_template.read())
                  write_template.write(payload.render(**context))
function_tokens: def render_confs ( ) : require ( 'settings' , provided_by = [ 'production' , 'staging' ] ) with settings ( warn_only = True ) : local ( 'mkdir confs/rendered' ) # Copy the app_config so that when we load the secrets they don't # get exposed to other management commands context = copy . copy ( app_config . __dict__ ) context . update ( app_config . get_secrets ( ) ) for service , remote_path , extension in app_config . SERVER_SERVICES : template_path = _get_template_conf_path ( service , extension ) rendered_path = _get_rendered_conf_path ( service , extension ) with open ( template_path , 'r' ) as read_template : with open ( rendered_path , 'wb' ) as write_template : payload = Template ( read_template . read ( ) ) write_template . write ( payload . render ( * * context ) )