Personal wiki notebook (not under development)

File_preview_page.py 670B

123456789101112131415161718192021222324
  1. from Tags import Html, Head, Title, Body, Img, Div, A
  2. class File_preview_page( Html ):
  3. def __init__( self, file_id, filename, quote_filename ):
  4. Html.__init__(
  5. self,
  6. Head(
  7. Title( filename ),
  8. ),
  9. Body(
  10. A(
  11. Img( src = u"/files/image?file_id=%s" % file_id, style = "border: 0;" ),
  12. href = u"/files/download?file_id=%s&quote_filename=%s&preview=False" % ( file_id, quote_filename ),
  13. ),
  14. Div(
  15. A(
  16. u"download %s" % filename,
  17. href = u"/files/download?file_id=%s&quote_filename=%s&preview=False" % ( file_id, quote_filename ),
  18. ),
  19. ),
  20. ),
  21. )