Personal wiki notebook (not under development)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

File_preview_page.py 670B

1234567891011121314151617181920212223
  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. )