old_contents: __author__ = 'lwz'
  
  from WebElements.Display import Label
  from WebElements.Layout import Horizontal
  from WebElements.DOM import Div
  from uiwiget import CompleteDom, RoundCornerPanel
  
  
  def create():
      page = CompleteDom()
      page.setTitle('Logtoeye Report Generated by WebElements')
  
      visit_hori_box = Horizontal()
      visit_hori_box.addClass('center-row')
      page.addChildElement(visit_hori_box)
  
      visit_round_div = RoundCornerPanel('Visit Volume Last Day')
      visit_label = Label()
      visit_label.setProperty('text', '1000/ip')
      visit_label.addClass('green-big-label')
      visit_round_div.addChildElement(visit_label)
      site_label = Label()
      site_label.addClass('black-big-label')
      site_label.setProperty('text', 'www.logtoeye.com')
      visit_round_div.addChildElement(site_label)
      visit_hori_box.addChildElement(visit_round_div)
  
      img_box = Div()
      img_box.addClass('img-placeholder')
      visit_hori_box.addChildElement(img_box)
  
      return page.__str__()
  
  
  def write(page_str):
      f = open('templates/report_preview.html', 'w')
      f.write(page_str)
      f.flush()
      f.close()
      print 'report created!'
  
  
  if __name__ == "__main__":
      write(create())
new_contents: #!/usr/bin/python
  # -*- coding: utf-8 -*-
  
  # format keyshort in sublime text2: ctrl+shift+alt+t
  # powered by SublimePythonTidy
  
  __author__ = 'lwz'
  
  from WebElements.Display import Label
  from WebElements.Layout import Horizontal
  from WebElements.DOM import Div
  from uiwiget import CompleteDom, RoundCornerPanel
  # from os import path
  
  def create():
      page = CompleteDom()
      page.setTitle('Logtoeye Report Generated by WebElements')
  
      visit_hori_box = Horizontal()
      visit_hori_box.addClass('center-row')
      page.addChildElement(visit_hori_box)
  
      visit_round_div = RoundCornerPanel('Visit Volume Last Day')
      visit_label = Label()
      visit_label.setProperty('text', '1000/ip')
      visit_label.addClass('green-big-label')
      visit_round_div.addChildElement(visit_label)
      site_label = Label()
      site_label.addClass('black-big-label')
      site_label.setProperty('text', 'www.logtoeye.com')
      visit_round_div.addChildElement(site_label)
      visit_hori_box.addChildElement(visit_round_div)
  
      img_box = Div()
      img_box.addClass('img-placeholder')
      visit_hori_box.addChildElement(img_box)
  
      return page.__str__()
  
  
  def write(page_str):
      f = open('templates/report_preview.html', 'w')
      f.write(page_str)
      f.flush()
      f.close()
      print 'report created!'
  
  
  if __name__ == '__main__':
      write(create())
  
subject: edit in sublime text2