comparison roundup/htmltemplate.py @ 167:a49c8a2ddd26

Added time logging and file uploading to the templates.
author Richard Jones <richard@users.sourceforge.net>
date Mon, 30 Jul 2001 08:12:17 +0000
parents 717f12e6ccf2
children 3c19bc818711
comparison
equal deleted inserted replaced
166:d469fb3beda1 167:a49c8a2ddd26
1 # $Id: htmltemplate.py,v 1.14 2001-07-30 06:17:45 richard Exp $ 1 # $Id: htmltemplate.py,v 1.15 2001-07-30 08:12:17 richard Exp $
2 2
3 import os, re, StringIO, urllib, cgi, errno 3 import os, re, StringIO, urllib, cgi, errno
4 4
5 import hyperdb, date 5 import hyperdb, date
6 6
708 w = client.write 708 w = client.write
709 try: 709 try:
710 s = open(os.path.join(templates, classname+'.newitem')).read() 710 s = open(os.path.join(templates, classname+'.newitem')).read()
711 except: 711 except:
712 s = open(os.path.join(templates, classname+'.item')).read() 712 s = open(os.path.join(templates, classname+'.item')).read()
713 w('<form action="new%s">'%classname) 713 w('<form action="new%s" method="POST" enctype="multipart/form-data">'%classname)
714 for key in form.keys(): 714 for key in form.keys():
715 if key[0] == ':': 715 if key[0] == ':':
716 value = form[key].value 716 value = form[key].value
717 if type(value) != type([]): value = [value] 717 if type(value) != type([]): value = [value]
718 for value in value: 718 for value in value:
721 w(replace.go(s)) 721 w(replace.go(s))
722 w('</form>') 722 w('</form>')
723 723
724 # 724 #
725 # $Log: not supported by cvs2svn $ 725 # $Log: not supported by cvs2svn $
726 # Revision 1.14 2001/07/30 06:17:45 richard
727 # Features:
728 # . Added ability for cgi newblah forms to indicate that the new node
729 # should be linked somewhere.
730 # Fixed:
731 # . Fixed the agument handling for the roundup-admin find command.
732 # . Fixed handling of summary when no note supplied for newblah. Again.
733 # . Fixed detection of no form in htmltemplate Field display.
734 #
726 # Revision 1.13 2001/07/30 02:37:53 richard 735 # Revision 1.13 2001/07/30 02:37:53 richard
727 # Temporary measure until we have decent schema migration. 736 # Temporary measure until we have decent schema migration.
728 # 737 #
729 # Revision 1.12 2001/07/30 01:24:33 richard 738 # Revision 1.12 2001/07/30 01:24:33 richard
730 # Handles new node display now. 739 # Handles new node display now.

Roundup Issue Tracker: http://roundup-tracker.org/