Skip to content

Commit 728ba14

Browse files
author
Richard Jones
committed
oops
1 parent 01ce0fc commit 728ba14

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ Fixed:
1010
- fix CGI editCSV action to handle metakit's integer itemids
1111
- apply fix for "remove" links from Klamer Schutte
1212
- added permission check on "remove" link while I was there..
13+
- applied CSV fix for python2.3 (sf bug 790363)
14+
- fixed form padding in LHS menu (sf bug 790502)
15+
- fixed upgrading docs for timezones (sf bug 790498)
16+
- set the content type on page templates (can have XML templates now)
1317

1418

1519
2003-08-08 0.6.0

roundup/cgi/templating.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import sys, cgi, urllib, os, re, os.path, time, errno
1+
import sys, cgi, urllib, os, re, os.path, time, errno, mimetypes
22

33
from roundup import hyperdb, date, rcsv
44
from roundup.i18n import _
@@ -116,7 +116,9 @@ def get(self, name, extension=None):
116116

117117
# compile the template
118118
self.templates[src] = pt = RoundupPageTemplate()
119-
pt.write(open(src).read())
119+
# use pt_edit so we can pass the content_type guess too
120+
content_type = mimetypes.guess_type(filename)[0] or 'text/html'
121+
pt.pt_edit(open(src).read(), content_type)
120122
pt.id = filename
121123
pt.mtime = time.time()
122124
return pt

0 commit comments

Comments
 (0)