~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to services/serveservice

  • Committer: Matt Giuca
  • Date: 2009-02-25 03:04:08 UTC
  • mto: This revision was merged to the branch mainline in revision 1119.
  • Revision ID: matt.giuca@gmail.com-20090225030408-5e13v4felqc4aybr
(almost) all HTML pages updated: Moved <h1>s outside of the ivle-padding div.
    Added new <h1>s to pages which didn't have any, and reduced <h1s> down to
    <h2s> if they didn't represent the page heading.

h1s now represent the top-level heading of a page. The new style sheet styles
them specially, designed to appear directly underneath the tab bar. Therefore,
they need to appear outside of any padding.

util.py: Removed the <h1> from the default-generated terms of service page.
    (All other TOS pages should follow). There is now a <h1> at the top of the
    TOS template page instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
           determine_file_type(filename) in ivle.conf.app.server.interpreters:
114
114
            throw_error('is-executable', {'path': filename})
115
115
 
116
 
        if not download and (
117
 
            (ivle.conf.app.server.blacklist_served_filetypes and \
 
116
        if (ivle.conf.app.server.blacklist_served_filetypes and \
118
117
                determine_file_type(filename) in \
119
118
                ivle.conf.app.server.served_filetypes_blacklist) or \
120
119
            (ivle.conf.app.server.served_filetypes_whitelist and \
121
120
                determine_file_type(filename) not in \
122
 
                ivle.conf.app.server.served_filetypes_whitelist)):
 
121
                ivle.conf.app.server.served_filetypes_whitelist):
123
122
            throw_error('forbidden')
124
123
 
125
124
if zipmode:
139
138
 
140
139
    print cjson.encode({'type': zip_mimetype,
141
140
                        'name': zipfilename})
142
 
 
143
 
    stream = zipfile
144
 
    stream.seek(0)
 
141
    print zipfile.getvalue()
145
142
else:
146
 
 
147
143
    print cjson.encode({'type': determine_file_type(filename),
148
144
                        'name': os.path.basename(filename)})
149
 
    stream = open(filename)
150
 
    
151
 
next = stream.read(1024)
152
 
while next:
153
 
    sys.stdout.write(next)
154
 
    next = stream.read(1024)
 
145
    print open(filename).read()