root/cherokee/trunk/admin/ModuleFile.py

Revision 1981, 0.8 kB (checked in by alo, 3 months ago)

--

Line 
1 from Form import *
2 from Table import *
3 from ModuleHandler import *
4
5 NOTE_IO_CACHE = 'Enables an internal I/O cache that improves performance.'
6
7 HELPS = [
8     ('modules_handlers_file', "Static Content")
9 ]
10
11 class ModuleFile (ModuleHandler):
12     PROPERTIES = [
13         'iocache'
14     ]
15
16     def __init__ (self, cfg, prefix, submit_url):
17         ModuleHandler.__init__ (self, 'file', cfg, prefix, submit_url)
18
19     def _op_render (self):
20         txt = ''
21
22         table = TableProps()
23         self.AddPropCheck (table, "Use I/O cache", "%s!iocache" % (self._prefix), True, NOTE_IO_CACHE)
24
25         txt += '<h2>File Sending</h2>'
26         txt += self.Indent(table)
27         return txt
28
29     def _op_apply_changes (self, uri, post):
30         self.ApplyChangesPrefix (self._prefix, ['iocache'], post)
31
Note: See TracBrowser for help on using the browser.