def s3_include_debug_css():
 request = current.request
 folder = request.folder
 appname = request.application
 settings = current.deployment_settings
 theme = settings.get_theme()
 location = current.response.s3.theme_location
 css_cfg = ('%s/modules/templates/%s%s/css.cfg' % (folder, location, theme))
 try:
  f = open(css_cfg, 'r')
 except:
  raise HTTP(500, ('Theme configuration file missing: modules/templates/%s%s/css.cfg' % (location, theme)))
 files = f.readlines()
 files = files[:(-1)]
 include = ''
 for file in files:
  if (file[0] != '#'):
   include = ('%s\n<link href="/%s/static/styles/%s" rel="stylesheet" type="text/css" />' % (include, appname, file[:(-1)]))
 f.close()
 return XML(include)

def s3_include_debug_css ( ) : request = current . request folder = request . folder appname = request . application settings = current . deployment_settings theme = settings . get_theme ( ) location = current . response . s3 . theme_location css_cfg = ( '%s/modules/templates/%s%s/css.cfg' % ( folder , location , theme ) ) try : f = open ( css_cfg , 'r' ) except : raise HTTP ( 500 , ( 'Theme configuration file missing: modules/templates/%s%s/css.cfg' % ( location , theme ) ) ) files = f . readlines ( ) files = files [ : ( - 1 ) ] include = '' for file in files : if ( file [ 0 ] != '#' ) : include = ( '%s\n<link href="/%s/static/styles/%s" rel="stylesheet" type="text/css" />' % ( include , appname , file [ : ( - 1 ) ] ) ) f . close ( ) return XML ( include )
generates html to include the css listed in /modules/templates/<template>/css .