def with_inline_css(html_without_css):
 css_filepath = settings.NOTIFICATION_EMAIL_CSS
 if (not css_filepath.startswith('/')):
  css_filepath = file_path_finder(settings.NOTIFICATION_EMAIL_CSS)
 if css_filepath:
  with open(css_filepath, 'r') as _file:
   css_content = _file.read()
  html_with_inline_css = pynliner.fromString(((('<style>' + css_content) + '</style>') + html_without_css))
  return html_with_inline_css
 return html_without_css

def with_inline_css ( html_without_css ) : css_filepath = settings . NOTIFICATION_EMAIL_CSS if ( not css_filepath . startswith ( '/' ) ) : css_filepath = file_path_finder ( settings . NOTIFICATION_EMAIL_CSS ) if css_filepath : with open ( css_filepath , 'r' ) as _file : css_content = _file . read ( ) html_with_inline_css = pynliner . fromString ( ( ( ( '<style>' + css_content ) + '</style>' ) + html_without_css ) ) return html_with_inline_css return html_without_css
returns html with inline css if the css file path exists else returns html with out the inline css .